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 branch: Reviews all commits in the branch vs base
- CI without branch: Reviews the specific commit
- Local development: Reviews staged/unstaged changes
Review Options
Review a Branch
threadlines check --branch feature/new-featureReviews all commits in the branch cumulatively (later commits can fix earlier violations).
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 --branch feature/x --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).