# commands-not-found

> A CLI that shows install instructions for unrecognized commands across several Linux distributions

Latest version **0.0.3** (published 2022-01-05) · MIT license · 0 weekly downloads

## Install

```sh
npm install commands-not-found
pnpm add commands-not-found
yarn add commands-not-found
bun add commands-not-found
```

Provides the command `commands-not-found`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.3 |
| Published | 2022-01-05 |
| First published | 2021-12-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Unpacked size | 8.1 KB |
| Known vulnerabilities | 0 (+23 in 1 direct dependencies) |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Zachary Balder |
| Maintainers | zbo14 |
| Keywords | axios, cheerio, cli, command-not-found, linux, unix |

## Links

- npm: https://www.npmjs.com/package/commands-not-found
- Repository: https://github.com/zbo14/commands-not-found
- Homepage: https://github.com/zbo14/commands-not-found#readme
- Issues: https://github.com/zbo14/commands-not-found/issues
- npm.io page: https://npm.io/package/commands-not-found

## Dependencies (3)

- [axios](https://npm.io/package/axios.md) ^0.24.0
- [cheerio](https://npm.io/package/cheerio.md) ^1.0.0-rc.10
- [getopts](https://npm.io/package/getopts.md) ^2.3.0

## Alternatives

- [launchdarkly-js-client-sdk](https://npm.io/package/launchdarkly-js-client-sdk.md) — 2.5M weekly downloads
- [@elastic/elasticsearch](https://npm.io/package/@elastic/elasticsearch.md) — 2.1M weekly downloads
- [@c8y/client](https://npm.io/package/@c8y/client.md) — 15.3K weekly downloads
- [@signaldb/maverickjs](https://npm.io/package/@signaldb/maverickjs.md) — 1.7K weekly downloads
- [@bbc/http-transport-cache](https://npm.io/package/@bbc/http-transport-cache.md) — 1.2K weekly downloads

## Recent versions

- 0.0.3 (latest) — 2022-01-05
- 0.0.2 — 2021-12-11
- 0.0.1 — 2021-12-08

## README

# commands-not-found

[![js-standard-style](https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat)](https://standardjs.com/)

A CLI that shows install instructions for unrecognized commands across several Linux distributions.

Results are pulled from [command-not-found](https://command-not-found.com). In addition, `commands-not-found` supports querying multiple commands concurrently (see examples).

## Install

`npm i commands-not-found`

## Usage

**Tip:** create a shell alias (e.g. `cnf`) for `commands-not-found` to save keystrokes.

**Show install instructions for command on your distro:**

`commands-not-found dig`

stdout: "apt-get install knot-dnsutils" (on Ubuntu)

**Show install instructions for command on specific distro:**

`commands-not-found -d arch dig` or `commands-not-found --distro arch dig`

stdout: "pacman -S bind-tools"

*Supported distros:*

* alpine
* arch
* debian
* fedora
* kali
* raspbian
* ubuntu

**Show install instructions for multiple commands:**

`commands-not-found -d arch dig ncat nmap`

stdout: "pacman -S bind-tools nmap" (`ncat` is part of `nmap`)

**Show install instructions for commands in a file:**

*commands.txt:*

```
dig
ncat
nmap
socat
unbound
```

`commands-not-found -d arch @commands.txt`

stdout: "pacman -S bind-tools nmap socat unbound"

**Exit with error if command not found:**

`commands-not-found -e zzz dig ncat nmap`

stdout: ""
stderr: "Command not found: zzz"

Without the `-e` flag, `commands-not-found` logs the error and install instructions for other commands:

stdout: "pacman -S bind-tools nmap"
stderr: "Command not found: zzz"

## Test

`npm test`

**Note:** the test suite makes actual requests to [command-not-found](https://command-not-found.com).

## Lint

`npm run lint` or `npm run lint:fix`

## License

Licensed under [MIT](./LICENSE).

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