1.1.0 ā€¢ Published 6 years ago

doctor-cli v1.1.0

Weekly downloads
4
License
MIT
Repository
github
Last release
6 years ago

doctor-cli

CircleCI

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

  šŸ¤’
1.1.0

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago