CLI Reference
Commands
codygiene scan [path] [options]
Scan a repository and print results. This is the default command.
codygiene scan
codygiene scan ./src
codygiene scan --format json -o report.json
codygiene scan --fail-on high
Options:
| Option | Description |
|---|---|
--format <fmt> |
terminal (default), json, markdown, sarif |
--json |
Shorthand for --format json |
--markdown |
Shorthand for --format markdown |
--sarif |
Shorthand for --format sarif |
-o, --output <file> |
Write report to file instead of stdout |
--disable <ids> |
Comma-separated rule IDs to disable |
--enable <ids> |
Comma-separated rule IDs to enable (overrides disable) |
--include-investigate |
Include INVESTIGATE-tier findings |
--include-generated |
Analyze generated and vendored files (excluded by default) |
--fail-on <level> |
Exit non-zero if findings at or above severity exist |
--max-files <n> |
Limit analysis to first N eligible files (partial scan) |
--debug |
Print diagnostics to stderr |
-h, --help |
Show help |
-v, --version |
Show version |
--fail-on levels: critical, high, medium, low
codygiene baseline [path] [options]
Scan and save as a baseline snapshot for later comparison.
codygiene baseline
codygiene baseline ./my-repo
codygiene baseline --baseline-path ./codygiene-baseline.json
codygiene diff [path] [options]
Compare the current scan against a previously saved baseline.
codygiene diff
codygiene diff --fail-on new-high
--fail-on new-high exits non-zero if new high/critical findings or
regressions are found compared to the baseline.
codygiene verify <finding-id> [path] [options]
Verify a specific finding against the current scan. Shows whether the finding still exists and its score impact.
codygiene verify CH-SEC-010#4F92
codygiene verify CH-SEC-010#4F92 ./my-repo
codygiene rules [options]
List all registered rules.
codygiene rules
codygiene rules --category security
codygiene rules --format json
codygiene version
Show CLI, engine, and ruleset versions.
codygiene version
codygiene --version
codygiene help
Show the help text.
codygiene help
codygiene --help
Exit codes
| Code | Meaning |
|---|---|
| 0 | Success (findings are not errors by default) |
| 1 | --fail-on threshold met |
| 2 | Internal error (invalid arguments, scanner failure) |
Ordinary findings do not cause a non-zero exit unless --fail-on is used.
This makes CODYGIENE CI-compatible: a scan with findings still exits 0,
allowing you to decide your own quality gate.
Configuration files
.codygiene.json
Project-level configuration. Static and safe · no code execution.
.codygieneignore
Gitignore-like exclusion patterns. Files matching these patterns are excluded from analysis.
Environment variables
| Variable | Description |
|---|---|
NO_COLOR |
Disable colored output |
Examples
codygiene scan ./src
codygiene scan --format sarif -o codygiene.sarif
codygiene scan --fail-on high
codygiene scan --include-generated
codygiene baseline ./my-repo
codygiene diff ./my-repo
codygiene verify CH-SEC-010#4F92 ./my-repo
codygiene rules --category security
codygiene --version
All analysis runs locally on your machine. No source code is uploaded.
Spotted something wrong or missing? Send feedback