Using the CLI
Basic Usage
threadlines checkUsing npx? For non-interactive environments (CI/CD, AI assistants), use: npx --yes threadlines check
By default, Threadline auto-detects your environment:
- CI with PR/MR: Reviews all changes in the PR (source vs target branch)
- CI push (no PR): Reviews the last commit only
- Local development: Reviews staged/unstaged changes
Review Options
Review a Commit
threadlines check --commit abc123defReviews a specific commit in isolation.
Review a File
threadlines check --file src/api/users.tsReviews the entire file (all lines treated as additions). Useful for onboarding new threadlines to existing files.
Review a Folder
threadlines check --folder src/apiReviews all files in the folder recursively.
Review Multiple Files
threadlines check --files src/file1.ts src/file2.tsReviews multiple specified files.
Result Filtering
By default, Threadline only shows items that need attention. Use the --full flag to see all results:
threadlines check --fullThis shows compliant, attention, and not_relevant items. Can be combined with any review option:
threadlines check --commit abc123 --fullExit Codes
Threadline uses exit codes for CI/CD integration:
- 0: All checks passed (no attention items)
- 1: One or more attention items found
Use this in your CI/CD pipelines to fail builds when standards aren't met.
Other Options
threadlines check --api-url http://your-server.comOverride the default server URL (default: http://localhost:3000).