The checked command line
checked runs Check’d from your terminal and your CI pipeline. It imports your API docs, starts runs, streams their progress, prints the AI report and findings, and exits non-zero when a run misses its release gates, so a pipeline can stop a bad release.
It does what the app does, with the same plan limits and usage: a run started from the CLI counts against your workspace’s session and monthly allowance exactly like one started in the browser.
Install
Needs Node.js 20 or newer. Install it globally, or run it with npx without installing.
npm install -g @checked/cli
npx @checked/cli --help
Sign in
On your own machine, checked login shows a short code and opens the browser. Check the code matches, approve, and the terminal is signed in as you for 90 days. The sign-in is saved in your user config directory, readable only by you. checked logout revokes it on the server and removes it.
checked login checked whoami checked projects list
On a server or in CI, use a workspace API key instead: create one under Settings, API keys and set it as CHECKED_API_KEY. A key belongs to one workspace and can read results, import specs and start runs there; it cannot change workspace settings. To save a key on a machine, pipe it in: echo "$KEY" | checked login --with-key.
| Variable | What it does |
|---|---|
| CHECKED_API_KEY | Workspace API key (tfy_...). Takes precedence over a saved sign-in. |
| CHECKED_API_URL | The API to use. Defaults to https://getchecked.twelveai.app. |
| CHECKED_PROJECT | Default project ref, so you can leave out --project. |
| CHECKED_ENV | Default environment name or id for runs. |
| CHECKED_WORKSPACE | Default workspace slug, when you are in more than one. |
| NO_COLOR | Turns colour off. Colour is also off whenever the output is not a terminal. |
Commands
| Command | What it does |
|---|---|
| checked login | Sign in by approving a code in the browser (or --api-key / --with-key) |
| checked logout | Revoke and forget the saved sign-in |
| checked whoami | Who you are signed in as, and your workspaces |
| checked projects list | Your projects and their last run |
| checked envs list | A project’s environments |
| checked import <file|url> | Import OpenAPI, Swagger, Postman, Insomnia, HAR, GraphQL or cURL; shows what it found and asks first (--yes in CI) |
| checked run | Start a run, follow it live, exit non-zero when release gates fail |
| checked runs list | show | watch | report | results | rerun-failed | cancel | Look into runs, re-run what failed |
| checked findings list | show | Failed tests and scan findings with evidence and fixes |
| checked issues list | show | Issues (today the same as findings) |
| checked scan <url> | A website health scan |
| checked usage | This session’s and this month’s usage |
| checked open | Open a run or project in the browser |
Projects and runs take their ref (as in the app’s URLs, for example payments-kqzxm and hbtqwpmz) or their number. Every command takes --json for scripts; results go to stdout and progress to stderr, so JSON output stays clean. Run checked <command> --help for the options.
A typical session
checked import openapi.yaml --project your-project-ref checked run --project your-project-ref --env Staging --depth critical checked findings list --project your-project-ref --severity high checked findings show r123 checked runs report <run-ref> checked scan https://example.com checked usage
Importing your API
checked import takes a file or a URL: OpenAPI 3, Swagger 2, Postman, Insomnia, HAR, GraphQL (a live endpoint is read by introspection), cURL commands or a plain list of endpoints. It shows what it found (format, endpoint count, how many fit your plan, a sample) and asks before saving. In CI, pass --yes; --dry-run only looks. Endpoints merge by method and path, so test history stays linked; --replace swaps the whole list.
Runs and release gates
checked run starts a run on the project’s default environment (or --env) and follows it live. API projects run their test suites; --depth critical runs the most important tests only, which is quicker and uses less allowance. Website projects run a health scan by default; --kind explore starts the AI explorer where your plan includes it.
When the run ends, the CLI evaluates the project’s release gates (pass rate, critical and high defects, and any others you set in the project) and exits with a code your pipeline can use. Defect counts can change when the AI report lands a minute later; --wait-report 2m waits for it before judging. --no-gates uses the run’s own pass or fail instead. --no-wait starts the run and returns at once with its ref.
| Exit code | Meaning |
|---|---|
| 0 | Done; for runs, the release gates were met |
| 1 | The run finished but failed its release gates |
| 2 | The run errored or was cancelled |
| 3 | Timed out waiting (the run keeps going) |
| 4 | Usage limit reached for this session or month, or the plan lacks the feature |
| 5 | Not signed in, or the key is invalid |
| 6 | Not found, or not allowed |
| 7 | Rate limited |
| 64 | Wrong command-line arguments |
| 70 | Could not reach the API, or another error |
CI examples
GitHub Actions
# .github/workflows/checked.yml
name: Check’d
on: [push]
jobs:
checked:
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: 20
- name: Run the Check’d tests
env:
CHECKED_API_KEY: ${{ secrets.CHECKED_API_KEY }}
run: npx -y @checked/cli run --project your-project-ref --depth critical --timeout 20mGitLab CI
# .gitlab-ci.yml (set CHECKED_API_KEY as a masked CI/CD variable)
checked:
image: node:20
script:
- npx -y @checked/cli run --project your-project-ref --depth critical --timeout 20mThe run keeps going on the server if the job is cancelled or times out; open it with checked open <run-ref>.
Usage and limits
Starting runs, scans and re-runs uses your workspace’s allowance, the same as in the app. When the current session’s allowance is used up, commands that start work stop with exit code 4 and say when it resets, for example: You have used this session’s allowance on Starter. It refreshes in 3 hours. Reading results, reports and findings is free. checked usage shows where you stand.
AI assistants
The MCP server gives Claude Code, Cursor and VS Code the same abilities as tools. See AI assistants (MCP).