# @karcass/cli-service

> Cli service for karcass skeleton which helps to build simple CLI interfaces

Latest version **0.0.7** (published 2019-12-24) · MIT license · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install @karcass/cli-service
pnpm add @karcass/cli-service
yarn add @karcass/cli-service
bun add @karcass/cli-service
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2019-12-24 |
| First published | 2019-12-19 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 9.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Valeriy Shibanov |
| Maintainers | shibaon |
| Keywords | karcass |

## Links

- npm: https://www.npmjs.com/package/@karcass/cli-service
- Repository: https://github.com/karcass-ts/cli-service
- Homepage: https://github.com/karcass-ts/cli-service#readme
- Issues: https://github.com/karcass-ts/cli-service/issues
- npm.io page: https://npm.io/package/@karcass/cli-service

## Dependencies (1)

- [@karcass/container](https://npm.io/package/@karcass/container.md) 0.0.12

## Alternatives

- [jsforce](https://npm.io/package/jsforce.md) — 851.2K weekly downloads
- [react-native-qrcode-svg](https://npm.io/package/react-native-qrcode-svg.md) — 693.5K weekly downloads
- [@salesforce/plugin-data](https://npm.io/package/@salesforce/plugin-data.md) — 394.9K weekly downloads
- [@backstage/plugin-search-common](https://npm.io/package/@backstage/plugin-search-common.md) — 308.5K weekly downloads
- [@chain-registry/types](https://npm.io/package/@chain-registry/types.md) — 38.4K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2019-12-24
- 0.0.4 — 2019-12-22
- 0.0.3 — 2019-12-22
- 0.0.2 — 2019-12-19

## README

# @karcass/cli-service

CLI service for <a href="https://github.com/karcass-ts/karcass">karcass</a> skeleton which helps to build simple CLI interfaces

## Installation

```
npm install @karcass/cli-service
```

## Usage

With this code in `example.ts`:

```typescript
import { CliService, AbstractConsoleCommand } from '@karcass/cli-service'

const cliService = new CliService()

class SomeCommand extends AbstractConsoleCommand {
    public static meta = { name: 'do:some', description: 'Does some action' }
    public async execute() {
        console.log('It\'s just work!')
    }
}

cliService.run()
```

Executing &nbsp;`ts-node example.ts`&nbsp; will print:

```
=== Available commands: ===
  --help   Show this help
  do:some  Does some action
```

And executing of &nbsp;`ts-node example.js do:some`&nbsp; will print:

```
It's just work!
```

Also you can turn off default --help command behaviour by turning off corresponding setting:

```
const cliService = new CliService({ useDefaultHelpCommand: false })
```

---
_Source: https://npm.io/package/@karcass/cli-service · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
