# @rushdigital/checklist-cli

> A command line tool to automate some coding standards checks

Latest version **1.0.0-rc.11** (published 2026-01-12) · CC-BY-NC-SA-4.0 license · 0 weekly downloads

## Install

```sh
npm install @rushdigital/checklist-cli
pnpm add @rushdigital/checklist-cli
yarn add @rushdigital/checklist-cli
bun add @rushdigital/checklist-cli
```

Provides the commands `checklist`, `checklist-cli`.

## Health

**Score 45/100 (D)** — status: stable.

Positive: no vulnerabilities.

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

## Facts

| | |
|---|---|
| Version | 1.0.0-rc.11 |
| Published | 2026-01-12 |
| First published | 2023-07-11 |
| Weekly downloads | 0 |
| License | CC-BY-NC-SA-4.0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | >=20.0.0 |
| Dependencies | 11 |
| Unpacked size | 307.5 KB |
| Known vulnerabilities | 0 (+28 in 1 direct dependencies) |
| Install scripts | no |
| Author | Mikhail Diatchenko |
| Maintainers | danurush, mikhail-rush |
| Keywords | checks, checklist, automation |

## Links

- npm: https://www.npmjs.com/package/@rushdigital/checklist-cli
- Repository: https://bitbucket.org/rushdigital/checklist-cli
- Homepage: https://bitbucket.org/rushdigital/checklist-cli#readme
- Issues: https://bitbucket.org/rushdigital/checklist-cli/issues
- npm.io page: https://npm.io/package/@rushdigital/checklist-cli

## Dependencies (11)

- [glob](https://npm.io/package/glob.md) ^11.1.0
- [yaml](https://npm.io/package/yaml.md) ^2.8.2
- [axios](https://npm.io/package/axios.md) 1.12.2
- [table](https://npm.io/package/table.md) ^6.9.0
- [yargs](https://npm.io/package/yargs.md) ^17.7.2
- [inquirer](https://npm.io/package/inquirer.md) ^8.2.7
- [module-alias](https://npm.io/package/module-alias.md) ^2.2.3
- [@fast-csv/parse](https://npm.io/package/@fast-csv/parse.md) ^4.3.6
- [@fast-csv/format](https://npm.io/package/@fast-csv/format.md) ^4.3.5
- [compare-versions](https://npm.io/package/compare-versions.md) ^5.0.3
- [source-map-support](https://npm.io/package/source-map-support.md) ^0.5.21

## Recent versions

- 1.0.0-rc.11 (latest) — 2026-01-12
- 1.0.0-rc.9 — 2025-11-17
- 1.0.0-rc.8 — 2025-07-28
- 1.0.0-rc.7 — 2024-09-02
- 1.0.0-rc.6 — 2024-04-26
- 1.0.0-rc.5 — 2024-02-12
- 1.0.0-rc.4 — 2023-11-17
- 1.0.0-rc.3 — 2023-07-11
- 1.0.0-rc.1 — 2023-07-11

## README

# Checklist CLI

A command line tool to automate running checklists on projects, e.g:

- following development standards, e.g. presense of a README.md
- release checklists
- etc.


## Installation

Requires Node.js 18 or above.

1. Install the tool (with global option):

Yarn:
```bash
yarn global add @rushdigital/checklist-cli
```
NPM:
```bash
npm install -g @rushdigital/checklist-cli
```

## Usage

1. Put your checklists into `checklists/` directory. 

You can also create a repository of checklists, so you can install from it by running: 

```
checklist-cli install
```

See "Checklists" section below for more details.

2. Run the tool

```
checklist-cli check --summary --reason
```

If you want to specify a subset of checklists use `--checklists` parameter, e.g:

```
checklist-cli check --summary --reason --checklists checklists/standard.yaml
```

### Commands

```
checklist-cli <command>
```

Commands:

- `config` - Configures the tool to be able to install shared checklists repository
- `install` - Installs checklists into the current directory
- `update` - Updates checklists in the current directory to latest version fron the shared repository
- `check` - Runs the checks in the current direcory
- `checklist [url]` - Fetches a checklist in a specified format and displays it
- `test <cmd>` - Helper to test commands locally

## Checklists

Checklists are defined in a `yaml` file that has the following structure:

```yaml
manifestVersion: "0.5"
metadata:
  checksVersion: "<version, e.g. 1.0.0>"
  about: <description>
  reportTitle: <title>
checks:
  - id: <id, e.g STD-005>
    description: <description>
    why: <reason>
    category: <category, e.g Documentation>
    notes: <internal notes>
    contexts:
      - <context, e.g. develop or release>
    tags:
      - <tag>
    automation:
      - <automation>
```

### Shared Repository

To create a shared repository of checklists:

1. Create a NPM package that contains your checklists in a `checklists/` directory. Example `package.json`:

```json
{
  "name": "my-checklists",
  "version": "0.0.1",
  "description": "My custom checklists",
  "files": [
    "checklists/**/*.yaml",
  ]
}
```

2. Publish that package to [npmjs.com](https://npmjs.com/) or push to a git repository

3. Install that package globally using `npm`:

From npm:

```
npm i -g my-checklists
```

Or from Git:

```
npm i -g git@github.com:<user>/my-checklists.git
```

4. Configure checklist to use that package:

```
checklist-cli config --add my-checklists
```

5. Now, when you need to add checklists to a project you can run the following command from the project directory:

```
checklist-cli install
```

It will show the list of available checklists to choose from and copy them to `checklists/` directory.

### Automation

An automation can have the following outcomes:

- `passed` - successfully checked
- `failed` - check not passed
- `skipped` - check is not applicable
- `pending` - manual check


The following automations are supported:

#### Shell automation

```yaml
shell: <command>
```

Also a shorthand notation is supported:
```yaml
<command>
```

Specifies a shell command which is used to perform the check. Command that returns exit code `0` indicates that the check has `passed`. Any other code indicates that the check `failed`. 

#### Conditional automation

```yaml
if:
  condition: <automation>
  then: <automation>
  else: <automation>
```

Also a shorthand notation is supported:

```yaml
condition: <automation>
then: <automation>
```

Rules:

- Condition is satisfied if its automation returns `passed`.
- Condition that is satisfied and does not have a `then` will result in `pending`. 
- Condition that is not satisfied and does not have an `else` will result in `skipped`. This is useful to create conditional manual checks.

#### "Outcome" automation

Specifies the outcome of the check

```yaml
outcome: <automation>
reason: <reason>
```

Useful for skipping or enforcing a manual check.

#### "Any" automation

```yaml:
any:
  - <automation>
  - <automation>
```

Also a shorthand notation is supported:

```yaml:
- <automation>
- <automation>
```

This automation is used implicily in the `automations:` block of the check.

Rules:

- If no automations then result will be `pending`.
- If one automation then result will be of that automation.
- If more than one automation:
  - if _any_ automation `passed` then overall result will be `passed`.
  - if _any_ automation `failed` then overall result will be `failed`.
  - if _any_ automation `skipped` then overall result will be `skipped`.
  - otherwise the overall result will be `pending`.

### Examples

```yaml
  - id: STD-001
    description: Ensure README.md exists which describes the project, how to build and deploy it.    
    automation:
      - shell: test -f README.md || test -f readme.md

  - id: STD-002
    description: The README file has been kept up to date
    why: To prevent document rot
    automation:
      - condition: test -f README.md

  - id: STD-003
    description: node_modules should be ignored
    automation:
      - condition: test -d node_modules
        then: grep -q node_modules .gitignor
```

## Security Updates

To fix security updates, in `develop` branch:

1. Run `npm audit` to check for vulnerabilities.
2. Run `npm run update:dependencies` to fix discovered vulnerabilities (if fixes are available) and update other dependencies.
3. Run `npm run tests` to ensure things are working as expected.
4. Run `npm audit` to check that vulnerabilities have been fixed.
5. Commit changes to the repository, adding details of the vulnerabilities that have been fixed to the commit message (CVE number and vulnerable packages).
6. Run `npm run version:next` to bump the version number and create a new tag.
7. Push to origin and wait for the the build pipeline to finish successfully.
8. Merge `develop` to `master` with Fast-forward strategy.
9. Push to origin and wait for the the build pipeline to publish a new version of the package to npm.

## Support 

If you find a bug or have a feature request please log it at https://bitbucket.org/rushdigital/checklist-cli/issues 

## About RUSH

![RUSH Logo](https://pbs.twimg.com/profile_images/1038898192580931585/2W_IH0XB_x96.jpg)

[RUSH](https://rush.co.nz/) was founded on a simple principle; the exhilarating feeling of solving a difficult problem, a feeling that is common in the challenging projects RUSH tackles. We’re committed to bringing this enthusiasm to our work as a forward-looking, tech-engaged business with the purpose statement: _We design and build technology to better serve humankind_.

Our ways of working have been tested in some of the most demanding and impactful projects, resulting in effective and elegant award-winning digital experiences that millions of people benefit from every day.

We strive for continuous improvement to refine our practices and processes - like this tool, created to automate repetitive tasks and make the teams' lives easier. If you'd like to join or learn more about RUSH's team of strategic thinkers, empathetic designers and technical mavericks visit [rush.co.nz/careers](https://rush.co.nz/careers)


## License

[CC-BY-NC-SA-4.0](https://creativecommons.org/licenses/by-nc-sa/4.0/)

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