CLI Commands

syntaxvalid check

Run a full analysis on your codebase. This command analyzes all files in the current directory (or specified path) and outputs a TrustScore.

syntaxvalid check [path]

Options:
  --policy, -p    Path to policy.yaml file
  --format, -f    Output format (json, sarif, md)
  --output, -o    Output file path
  --local         Run local analysis only (no cloud)
  --cloud         Run cloud analysis (requires auth)
syntaxvalid check

Analyzes the current directory and outputs results to .syntaxvalid/report.json

syntaxvalid diff

Analyze only the changes in a git diff. This is useful for pre-commit hooks and PR analysis.

syntaxvalid diff [commit1] [commit2]

Options:
  --policy, -p    Path to policy.yaml file
  --format, -f    Output format (json, sarif, md)
  --output, -o    Output file path
  --staged        Analyze staged changes only
syntaxvalid diff HEAD~1 HEAD

Analyzes changes between the last two commits

syntaxvalid diff --staged

Analyzes only staged changes (useful for pre-commit hooks)

syntaxvalid init

Initialize a new SyntaxValid project. Creates a .syntaxvalid/ directory with a default policy.yaml file.

syntaxvalid init [project-name]

Options:
  --template, -t    Policy template (default, strict, lenient)
  --force, -f          Overwrite existing .syntaxvalid directory
syntaxvalid init

Creates a new SyntaxValid project in the current directory

Other Commands

syntaxvalid login

Authenticate with SyntaxValid. Opens your browser to complete authentication.

syntaxvalid login

syntaxvalid status

Check your authentication status and current plan limits.

syntaxvalid status

syntaxvalid version

Display the CLI version and check for updates.

syntaxvalid version