CLI Command Reference
Complete reference for the Tharos command-line interface.
Tharos CLI Reference
Tharos provides a unified CLI for managing security policies, running scans, and integrating with CI/CD pipelines.
Global Options
| Option | Description | Default |
|---|---|---|
-c, --config | Path to config file | ./tharos.yaml |
--json | Output results in JSON format | false |
-f, --format | Output format (text, json, sarif) | text |
--verbose | Enable verbose logging | false |
commands
tharos init
Initialize a new Tharos configuration in the current directory.
tharos initThis creates a tharos.yaml file and sets up git hooks in .git/hooks.
tharos check
Run a security check on the current project. By default, it checks all staged files if inside a git repo.
tharos check [options]Options:
--all: Check all files in the project, not just staged ones.--fix: Automatically apply "Magic Fixes" where possible.
tharos analyze <path>
Analyze a specific file or directory.
tharos analyze src/server.js
tharos analyze . --format sarif > results.sariftharos sync
Audit and self-heal the local Tharos setup.
tharos syncThis command audits:
- Git repository presence
- Tharos pre-commit hook integrity
tharos.yamlconfiguration- AI provider connectivity and keys
- Policy status
tharos version
Print the current version of Tharos.
tharos versionLast updated on