3.0.1 • Published 10 months ago

@checkup/cli v3.0.1

Weekly downloads
128
License
MIT
Repository
github
Last release
10 months ago

@checkup/cli

A CLI that provides health check information about your project.

CI Build Version Downloads/week License

Usage

Install checkup CLI globally:

Using yarn:

$ yarn global add @checkup/cli

Using npm:

$ npm install -g @checkup/cli

Using volta:

$ volta install @checkup/cli

Configuration

First use the config generator to create a config file in your project's directory:

$ checkup generate config

The checkup CLI is now available to run. Use the run command to run Checkup against your project directory:

$ checkup run .

Checkup is designed to be completely configurable via a configuration object.

You can also specify an explicit path to a configuration via the command line, which will override any configurations found in any .checkuprc.* files

$ checkup --config /some/path/to/my/config/.checkuprc

The configuration object has the following properties:

Plugins

Plugins are collections of Checkup tasks that are intended to be configured and run. Conceptually, they're very similar to eslint plugins, which themselves contain a collection of eslint rules to run.

Check out some existing plugins:

Plugins can be authored by anyone, and configured to run for any codebase. Checkup comes with a plugin generator, making it easy to generate the scaffolding needed.

To generate a plugin, run:

$ checkup generate plugin checkup-plugin-foo

To configure plugins, use the plugins key in your configuration file, which contains a list of plugin names.

{
  "plugins": ["checkup-plugin-foo"]
}

Tasks

Tasks are the core primitive that Checkup uses to gather data for the Checkup report.

To generate a task, run the following in the plugin directory you want to add the task to:

$ checkup generate task example-task

Checkup Command (alias checkup run)

checkup run PATH

A CLI that provides health check information about your project

checkup run [paths..] [options]

Options:
      --help             Show help                                        [boolean]
      --version          Show version number                              [boolean]
  -e, --exclude-paths    Paths to exclude from checkup. If paths are provided via
                         command line and via checkup config, command line paths
                         will be used.                                      [array]
  -c, --config-path      Use the configuration found at this path, overriding
                         .checkuprc if present.             [default: ".checkuprc"]
      --config           Use this configuration, overriding .checkuprc if present.
  -d, --cwd              The path referring to the root directory that Checkup will
                         run in                                [default: (default)]
      --category         Runs specific tasks specified by category. Can be used
                         multiple times.                                    [array]
      --group            Runs specific tasks specified by group. Can be used
                         multiple times.                                    [array]
  -t, --task             Runs specific tasks specified by the fully qualified task
                         name in the format pluginName/taskName. Can be used
                         multiple times.                                    [array]
  -f, --format           Use a specific output format          [default: "summary"]
  -o, --output-file      Specify file to write JSON output to.        [default: ""]
  -l, --list-tasks       List all available tasks to run.                 [boolean]
  -p, --plugin-base-dir  The base directory where Checkup will load the plugins
                         from. Defaults to cwd.

See code: src/commands/run.ts

Generate Command

Checkup comes with a few generators to help generate Checkup plugins and tasks.

checkup generate plugin PLUGIN_NAME PATH

Generate a checkup plugin.

checkup generate plugin <name> [options]

Generates a checkup plugin project

Positionals:
  name  Name of the plugin (eg. checkup-plugin-myplugin)   [required] [default: ""]

Options:
      --help      Show help                                               [boolean]
      --version   Show version number                                     [boolean]
  -d, --defaults  Use defaults for every setting                          [boolean]
  -p, --path      The path referring to the directory that the generator will run
                  in                                                 [default: "."]

checkup generate task TASK_NAME PATH

Generate a task within a Checkup plugin.

checkup generate task <name> [options]

Generates a checkup task within a project

Positionals:
  name  Name of the task (foo-task)                        [required] [default: ""]

Options:
      --help      Show help                                               [boolean]
      --version   Show version number                                     [boolean]
  -d, --defaults  Use defaults for every setting                          [boolean]
  -p, --path      The path referring to the directory that the generator will run
                  in                                                 [default: "."]

checkup generate actions ACTION_NAME PATH

Generate a task actions within a Checkup plugin.

checkup generate actions <name> [options]

Generates checkup actions within a project

Positionals:
  name  Name of the actions (foo-task-actions)             [required] [default: ""]

Options:
      --help      Show help                                               [boolean]
      --version   Show version number                                     [boolean]
  -d, --defaults  Use defaults for every setting                          [boolean]
  -p, --path      The path referring to the directory that the generator will run
                  in                                                 [default: "."]

See code: src/commands/generate.ts

3.0.1

10 months ago

3.0.0

11 months ago

2.2.0

1 year ago

2.0.5

1 year ago

2.0.4

1 year ago

2.1.0

1 year ago

2.0.3

2 years ago

2.0.2

2 years ago

2.0.1

2 years ago

2.0.0

2 years ago

2.0.0-beta.2

2 years ago

2.0.0-beta.1

2 years ago

2.0.0-beta.3

2 years ago

2.0.0-beta.0

2 years ago

1.4.2

2 years ago

1.4.1

2 years ago

1.4.0

2 years ago

1.2.0

3 years ago

1.3.0

2 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago

1.0.0-beta.14

3 years ago

1.0.0-beta.12

3 years ago

1.0.0-beta.13

3 years ago

1.0.0-beta.11

3 years ago

1.0.0-beta.10

3 years ago

1.0.0-beta.4

3 years ago

1.0.0-beta.5

3 years ago

1.0.0-beta.6

3 years ago

1.0.0-beta.7

3 years ago

1.0.0-beta.8

3 years ago

1.0.0-beta.9

3 years ago

1.0.0-beta.3

3 years ago

1.0.0-beta.2

3 years ago

1.0.0-beta.1

3 years ago

1.0.0-beta.0

3 years ago

0.13.3

3 years ago

0.13.2

3 years ago

0.13.1

3 years ago

0.13.0

3 years ago

0.12.1

3 years ago

0.12.0

3 years ago

0.11.1

3 years ago

0.11.0

3 years ago

0.10.0

3 years ago

0.9.0

3 years ago

0.8.2

3 years ago

0.8.1

3 years ago

0.8.0

3 years ago

0.7.4

4 years ago

0.7.3

4 years ago

0.7.2

4 years ago

0.7.1

4 years ago

0.7.0

4 years ago

0.6.1

4 years ago

0.6.0

4 years ago

0.5.0

4 years ago

0.4.0

4 years ago

0.3.2

4 years ago

0.3.1

4 years ago

0.3.0

4 years ago

0.2.3

4 years ago

0.2.2

4 years ago

0.2.1

4 years ago

0.2.0

4 years ago

0.1.3

4 years ago

0.1.2

4 years ago

0.1.1

4 years ago

0.1.0

4 years ago

0.0.14

4 years ago

0.0.13

4 years ago

0.0.12

4 years ago

0.0.11

4 years ago

0.0.10

4 years ago

0.0.9

4 years ago

0.0.8

4 years ago

0.0.7

4 years ago

0.0.6

4 years ago

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago