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

OptionDescriptionDefault
-c, --configPath to config file./tharos.yaml
--jsonOutput results in JSON formatfalse
-f, --formatOutput format (text, json, sarif)text
--verboseEnable verbose loggingfalse

commands

tharos init

Initialize a new Tharos configuration in the current directory.

tharos init

This 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.sarif

tharos sync

Audit and self-heal the local Tharos setup.

tharos sync

This command audits:

  • Git repository presence
  • Tharos pre-commit hook integrity
  • tharos.yaml configuration
  • AI provider connectivity and keys
  • Policy status

tharos version

Print the current version of Tharos.

tharos version

Last updated on

On this page