# doctor-cli

> [![CircleCI](https://circleci.com/gh/mauriciomelo/doctor-cli/tree/master.svg?style=svg)](https://circleci.com/gh/mauriciomelo/doctor-cli/tree/master)

Latest version **1.1.0** (published 2018-06-15) · MIT license · 0 weekly downloads

## Install

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

Provides the command `doctor`.

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2018-06-15 |
| First published | 2018-05-27 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 8.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | Mauricio Melo |
| Maintainers | mauriciomelo |

## Links

- npm: https://www.npmjs.com/package/doctor-cli
- Repository: https://github.com/mauriciomelo/doctor-cli
- Homepage: https://github.com/mauriciomelo/doctor-cli#readme
- Issues: https://github.com/mauriciomelo/doctor-cli/issues
- npm.io page: https://npm.io/package/doctor-cli

## Dependencies (1)

- [chalk](https://npm.io/package/chalk.md) ^2.4.1

## Recent versions

- 1.1.0 (latest) — 2018-06-15
- 1.0.1 — 2018-05-27
- 1.0.0 — 2018-05-27

## README

# doctor-cli

[![CircleCI](https://circleci.com/gh/mauriciomelo/doctor-cli/tree/master.svg?style=svg)](https://circleci.com/gh/mauriciomelo/doctor-cli/tree/master)

Create a doctor command to help diagnose configuration issues of your projects.

## Install

```
npm i doctor-cli -g
```

## Usage

`title`: Title of the individual check.

`check`: Shell command that will evaluate to either success or error based on the exit code (exit 1 = error, exit 0 = success).

`fix`: Show a fix hint when check fails

##### Sample

Create a JSON file named `doctor.json` with the following content:

```
{
  "checks": [
    {
      "title": "Docker is running",
      "check": "docker ps"
    },
    {
      "title": "Is online",
      "check": "ping google.com -c 1"
    },
    {
      "title": "This will pass",
      "check": "exit 0"
    },
    {
      "title": "This will fail",
      "check": "exit 1"
    },
    {
      "title": "File.txt exists",
      "check": "test -f File.txt",
      "fix": "touch File.txt"
    }
  ]
}
```

Run `doctor`, the output should be similar to:

```
$ doctor
👩‍⚕️ Checking your system for configuration problems...


  ❌  File.txt exists
        Fix:
        touch File.txt

  ❌  This will fail

  ✅  This will pass

  ✅  Docker is running

  ✅  Is online

  🤒
```

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