# cli-complete

> Missed cli completion tool for node.js. Just place `cli-complete.js` into home directory to enable bash completion for your local application.

Latest version **0.1.1** (published 2015-06-25) · 0 weekly downloads

## Install

```sh
npm install cli-complete
pnpm add cli-complete
yarn add cli-complete
bun add cli-complete
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.1 |
| Published | 2015-06-25 |
| First published | 2015-06-25 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | yes |
| GitHub stars | 1 |
| Maintainers | rumkin |

## Links

- npm: https://www.npmjs.com/package/cli-complete
- Repository: https://github.com/rumkin/cli-complete
- Homepage: http://github.com/rumkin/cli-complete
- Issues: https://github.com/rumkin/cli-complete/issues
- npm.io page: https://npm.io/package/cli-complete

## Recent versions

- 0.1.1 (latest) — 2015-06-25
- 0.1.0 — 2015-06-25

## README

# Bash completion

Missed cli completion tool for node.js. Just place `cli-complete.js` into home directory to enable bash completion
for your local application.

# Install

Completion works only if installed globally because it writes file into `/etc/bash_completion.d/`.

```bash
npm install cli-completion -g
```

# Usage

Type `node` or `iojs` first then script name and after that use `[TAB]`.

```
> nodejs app[TAB] # -> app.js
> nodejs app.js serv[TAB] # -> server
```

Create `cli-completion.js` inside your project's directory. Example:

```javascript
if (process.argv.length === 3) {
    console.log("server generate dump");
}
```

Or using `cli-completion` helper:

```javascript
var complete = require('cli-complete');

complete({
    server: ['start', 'stop', 'reload'],
    generate: ['view', 'controller'],
    dump: true,
    restore: function(){
        // Output complete value
        console.log('today yesterday');
    }
})
```

# Note

Currently for unix systems only.

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