-
Notifications
You must be signed in to change notification settings - Fork 0
CLI Reference
PenumbraForge edited this page Mar 29, 2026
·
1 revision
Scan files for secrets.
gate scan # Scan staged files (default)
gate scan --all # Scan entire repository
gate scan --staged # Scan staged files only
gate scan --changed # Scan files changed since last commit
gate scan src/ lib/ # Scan specific directories
gate scan config.js # Scan specific file
gate scan --verify # Verify if secrets are live
gate scan --interactive # Interactive remediation mode
gate scan --history 10 # Scan last 10 commits
gate scan --format json # JSON output
gate scan --format sarif # SARIF output (GitHub Code Scanning)
gate scan --entropy-threshold 4.5 # Custom entropy threshold
gate scan --no-color # Disable colored outputAuto-fix all findings by extracting secrets to .env.
gate fix # Fix all findings
gate fix --dry-run # Preview changes
gate fix --interactive # Fix one at a time
gate fix --undo # Restore from snapshotGenerate compliance reports.
gate report # Markdown report (stdout)
gate report --format html # HTML report
gate report --format json # JSON report
gate report --format sarif # SARIF 2.1.0 report
gate report --output report.html # Write to fileLaunch incident response workflow for leaked secrets.
Install git hooks.
gate install # Install pre-commit hook
gate install --pre-push # Also install pre-push hookInteractive project setup. Generates .gaterc and .gateignore with sensible defaults for your stack.
Show health check: hook status, config, last scan, rule count.
View and manage the local audit log.
gate audit # Show recent scans
gate audit --stats # Show statistics
gate audit --export json # Export as JSON
gate audit --export csv # Export as CSV
gate audit --verify # Verify integrity chain
gate audit --clear # Clear the audit logLocal secret encryption.
gate vault keygen # Generate vault key
gate vault encrypt <value> # Encrypt a value
gate vault decrypt <blob> # Decrypt a blob
gate vault encrypt-env # Encrypt .env valuesGenerate git history purge scripts.
gate purge # Generate git-filter-repo scriptShow version and check for updates.
Show all available commands.
| Flag | Description |
|---|---|
--help, -h
|
Show help for any command |
--no-color |
Disable colored output |
--format=FORMAT |
Output format (text, json, sarif) |
--key=value |
All flags support = syntax |
-- |
End of options (everything after is a file path) |
| Code | Meaning |
|---|---|
| 0 | Success, no findings |
| 1 | Findings detected or error |
| Variable | Description |
|---|---|
GATE_SKIP=1 |
Bypass pre-commit/pre-push hook |
GATE_ALLOW_MISSING=1 |
Allow commit when Gate binary not found |
GATE_NODE_PATH |
Explicit path to Node.js binary |
NO_COLOR=1 |
Disable color output |
DEBUG=1 |
Enable verbose error output |
FORTRESS_SIGNING_KEY |
Override HMAC signing key for rule verification |