Skip to content

CLI Reference

Terminal window
harnix scan [path]
  • path is optional and defaults to ..
  • scan is the current command.

Include inline rationale per check in terminal output.

Terminal window
harnix scan . --verbose

Write report files to a custom output directory.

Terminal window
harnix scan . --output ./reports/harnix

Also supported:

Terminal window
harnix scan . --output=./reports/harnix

Skip one or more checks.

Terminal window
harnix scan . --skip agents-md,ci-pipeline
harnix scan . --skip agents-md --skip ci-pipeline

Run only the specified checks.

Terminal window
harnix scan . --only agents-md
harnix scan . --only agents-md,root-readme,documentation

--skip and --only are mutually exclusive.

Override repository type detection.

Terminal window
harnix scan . --type software
harnix scan . --type non-software

Limit recursive scanning of submodules/workspaces by depth.

  • 0 scans only the target repository.
  • 1 scans the target plus direct submodules/workspaces.
  • 2 includes one additional nested level, and so on.
  • If omitted, depth is unlimited (current behavior).
Terminal window
harnix scan . --depth 0
harnix scan . --depth 1
harnix scan . --depth=2

Harnix uses the following exit codes to indicate scan outcomes:

  • 0 — scan completed successfully, regardless of scores
  • 1 — an error occurred (invalid arguments, missing directory, malformed config file)

The exit code does not reflect the scan score. A repository scoring 0% still exits with code 0 because the scan itself succeeded. This design makes Harnix safe to use in CI pipelines where you want to capture results without failing the build on low scores.

Display the top-level help text with available commands:

Terminal window
harnix --help

Display scan-specific help with all flags and arguments:

Terminal window
harnix scan --help

Print the installed Harnix version:

Terminal window
harnix --version