Using the CLI

Basic Usage

threadlines check

Using 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-feature

Reviews all commits in the branch cumulatively (later commits can fix earlier violations).

Review a Commit

threadlines check --commit abc123def

Reviews a specific commit in isolation.

Review a File

threadlines check --file src/api/users.ts

Reviews the entire file (all lines treated as additions). Useful for onboarding new threadlines to existing files.

Review a Folder

threadlines check --folder src/api

Reviews all files in the folder recursively.

Review Multiple Files

threadlines check --files src/file1.ts src/file2.ts

Reviews multiple specified files.

Result Filtering

By default, Threadline only shows items that need attention. Use the --full flag to see all results:

threadlines check --full

This shows compliant, attention, and not_relevant items. Can be combined with any review option:

threadlines check --branch feature/x --full

Exit 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.com

Override the default server URL (default: http://localhost:3000).