Skip to main content

CLI Reference

Commands

bouncerfox scan [paths...]

Main scanning command. Scans files or directories for AI agent configuration issues. Defaults to current directory.

bouncerfox scan .
bouncerfox scan CLAUDE.md .mcp.json
bouncerfox scan . --format json --severity high --verbose

Flags:

FlagDefaultDescription
--format, -ftableOutput format: table, json, sarif
--severity, -s(from config)Severity floor: critical, high, warn, info
--config, -c(auto-discovered)Path to config file (overrides auto-discovery)
--max-findings0 (unlimited)Cap total findings
--github-commentfalsePost PR comment and check run (requires GITHUB_TOKEN)
--pr-number(auto-detected)PR number for GitHub integration
--target(auto-detected)Override scan target identity
--trigger(auto-detected)Override trigger detection: ci or local
--offline-behavior(auto)Behavior when platform is unreachable: warn or fail-closed. Auto: fail-closed in CI, warn locally.
--dry-run-uploadfalsePreview upload payload without sending
--strip-pathsfalseSend filenames only (no full paths) in upload
--anonymousfalseStrip all identifying info from upload
--no-cachefalseSkip config cache (always pull fresh from platform)
--group-byfileGroup findings by: file, rule, severity
--verbose, -vfalseShow code frames with context lines
--no-colorfalseDisable colors and Unicode symbols

bouncerfox rules

List all registered rules with their ID, severity, category, and description.

bouncerfox rules

bouncerfox init

Generate a default .bouncerfox.yml in the current directory. Fails if the file already exists.

bouncerfox init

bouncerfox auth

Authenticate with the BouncerFox platform. Opens a browser to the platform dashboard, then prompts you to paste your API key. Saves the key to ~/.config/bouncerfox/credentials.

note

The platform is currently in development. For now, set BOUNCERFOX_API_KEY as an environment variable instead.

bouncerfox auth

bouncerfox config refresh

Clear the cached platform config. Useful when org-level rules have changed and you want to pull fresh config on the next scan.

bouncerfox config refresh

bouncerfox completion [shell]

Generate shell completion scripts for bash, zsh, fish, or powershell.

bouncerfox completion bash > /etc/bash_completion.d/bouncerfox
bouncerfox completion zsh > "${fpath[1]}/_bouncerfox"

bouncerfox version

Print the installed version.

bouncerfox version

Exit Codes

CodeMeaning
0No findings at or above severity threshold (or pass/informational verdict from platform)
1One or more findings found (or fail verdict from platform)
2Scanner error (or platform unreachable in fail-closed mode)

Environment Variables

VariableDescription
BOUNCERFOX_API_KEYPlatform API key. Enables connected mode (config pull, upload, verdict).
BOUNCERFOX_PLATFORM_URLPlatform API base URL (default: https://api.bouncerfox.dev)
BOUNCERFOX_CONFIG_DIRConfig directory override (default: ~/.config/bouncerfox)
BOUNCERFOX_TARGETOverride scan target identity
GITHUB_TOKENRequired for --github-comment
NO_COLORDisable colors and Unicode (any value)
GITHUB_ACTIONSAuto-detected in GitHub Actions
CIAuto-detected in CI environments
GITHUB_SHACommit SHA (auto-detected)
GITHUB_REF_NAMEBranch name (auto-detected)
GITHUB_REPOSITORYRepository (auto-detected)
GITHUB_EVENT_PATHEvent payload path (auto-detected)

Limits

LimitValue
Max file size1 MB
Max scannable files500
Max JSON nesting depth10 levels
Scan timeout5 minutes