Quickstart
Checkup was created to optimize writing tasks that enable you to gather the information that's useful to you, and use that information to make decisions. Checkup allows you to:
- Create and manage Plugins
- Write Tasks
- Add Task Actions to provide calls to actions
- Utilize the SARIF output in external tools
Checkup can be used through the command line, or programmatically through the Node API.
Step 1: Install Checkup
Checkup has it's own CLI for running tasks, installable via npm or yarn.
- npm
- Yarn
npm i -D @checkup/cli
yarn add @checkup/cli --dev
The Node API, which provides a way to run tasks programmatically, can also be accessed through the @checkup/cli
package.
Step 2: Create a configuration file
Checkup uses a configuration file to define the plugins and tasks to run. You can create a configuration file by running the following command in the root of your project:
- npm
- Yarn
npx checkup generate config
yarn checkup generate config
This will generate a .checkuprc file in the current directory, with the following contents:
{
"$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json",
"excludePaths": [],
"plugins": [],
"tasks": {}
}
Config file options
excludePaths
: A list of paths to exclude from analysis.plugins
: A list of plugins to load.tasks
: A list of tasks to run.
Step 3: Add plugins
In order to run checkup, you must add plugins to your configuration file. Add plugins to your project by running the following command:
- npm
- Yarn
npm i -D checkup-plugin-example
yarn add checkup-plugin-example --dev
Then, edit the .checkuprc
file that was created and add the plugin to your configuration file:
{
"$schema": "https://raw.githubusercontent.com/checkupjs/checkup/master/packages/core/src/schemas/config-schema.json",
"excludePaths": [],
"plugins": ["checkup-plugin-example"],
"tasks": {}
}
Step 4: Run the CLI
Finally, run the CLI in the root of your project to run your tasks:
- npx
- Yarn
npx checkup run .
yarn checkup run .
Checkup will run the tasks in the configured plugins, and output the results to a SARIF file by default.
You can also analyze your results using a SARIF viewer. See analyzing results for more information.