Skip to content

Flags reference

A reference for the flags (options) available on each CLI subcommand. The set of flags differs by subcommand.

Available on every subcommand.

FlagValueDefaultDescription
--config <path>Path(auto-detected)Explicit path to contextlint.config.json
--cwd <path>PathCurrent directoryWorking directory used to resolve globs and paths
--helpShow help
--versionShow the version

If --config is omitted, contextlint walks up from --cwd looking for contextlint.config.json. For details, see Config auto-detection.

FlagValueDefaultDescription
[files...]Glob listFiles / glob patterns to validate. Overrides the config’s include
--format <format>human / jsonhumanOutput format
--watchRe-lint automatically when files change

For --format behavior see JSON output, and for --watch see Watch mode.

FlagValueDefaultDescription
--cwd <path>PathCurrent directoryOutput directory for the config file

There are no options beyond the interactive mode entered when running with no arguments.

FlagValueDefaultDescription
--outdir <path>PathThe config’s compile.outdir (or .claude/skills/contextlint)Output directory for SKILL.md
--dry-runPrint a summary of what would be generated without writing
FlagValueDefaultDescription
<file>Path (required)Source file whose impact is being analyzed
--format <format>human / jsonhumanOutput format
FlagValueDefaultDescription
<query>Path / ID (required)Query identifying the documents to extract
--depth <depth>Non-negative integer2Maximum depth for graph traversal
--format <format>human / jsonhumanOutput format
FlagValueDefaultDescription
--format <format>human / jsonhumanOutput format