DOCS
Troubleshooting
self-update printed a curl command on Windows
On Windows PowerShell, curl is an alias for Invoke-WebRequest and rejects -fsSL. install.sh is not for Windows. balerx self-update and balerx version --check now print the PowerShell installer from the README. -ExecutionPolicy Bypass applies only to that one installer process:
Invoke-WebRequest "https://raw.githubusercontent.com/wrjewski/balerx/main/install.ps1" -OutFile install.ps1; powershell -ExecutionPolicy Bypass -File .\install.ps1https://balerxgate.com/install.ps1 is the same script, so irm https://balerxgate.com/install.ps1 | iex also works.
On macOS and Linux they still print:
curl -fsSL https://raw.githubusercontent.com/wrjewski/balerx/main/install.sh -o install.sh && sh install.shThe Release notes: line is unchanged. --json install_command matches this OS.
The installer says no release checksum was found
The current scanner version is 0.1.8. If the checksum download fails, install from source:
cargo install --git https://github.com/wrjewski/balerx.git --path balerx-sensor/crates/balerx-clibalerx is not found after install
On macOS and Linux the binary is $HOME/.local/bin/balerx. curl ... | sh runs in a child shell, so it cannot change the terminal you typed in. If that directory was not on PATH, run the export PATH="$HOME/.local/bin:$PATH" line the installer printed, and add that directory to your shell profile for new terminals.
On Windows the binary is %LOCALAPPDATA%\balerx\balerx.exe. irm https://balerxgate.com/install.ps1 | iex adds that folder to the current PowerShell process and to the saved user PATH, so balerx works in that same window. powershell -ExecutionPolicy Bypass -File .\install.ps1 updates that child process only. When it exits, this window does not have the new PATH until you open a new terminal.
If the command is still missing, run it by path: & "$env:LOCALAPPDATA\balerx\balerx.exe" scan on Windows, or "$HOME/.local/bin/balerx" scan on macOS and Linux.
Scan exits 1, 2, or 64
Exit 2 means at least one critical finding. Exit 1 means a high finding, you passed --fail-on and a finding is at or above that level, or you passed --fail-on-unreadable and a config file could not be read. Exit 64 means a usage or operator error (unknown flag, extra words, or a missing or invalid --baseline file). That is not a finding. The JSON or HTML report names the rule when the exit is 1 or 2. Start with the rule page linked from Scan.
Fixing common findings
HOOK-GAP-001
Guard hooks are not installed for Claude Code means the Claude Code config has no Balerx hook. The matching command uses the agent id:
balerx setup
balerx guard install claude-code
balerx guard install cursor
balerx guard status
balerx scanRun balerx setup when you have not chosen a policy yet. The install command is what clears HOOK-GAP-001.
claude-code is Claude Code. cursor is Cursor. balerx guard status shows whether those hooks are installed. balerx scan runs the check again. See Guard and HOOK-GAP-001.
CONFIG-001
Configuration file is empty means the file has no contents. VS Code can create an empty mcp.json. A UTF-8 BOM or whitespace alone is the same case. It is info, so balerx scan --fail-on high does not fail because of it. Delete the file, or add contents in that file's format, then run balerx scan again. VS Code mcp.json uses { "servers": {} }. Cursor, Claude, Windsurf, Cline, Roo, and Gemini JSON use { "mcpServers": {} }. Codex config.toml uses [mcp_servers] or [mcp_servers.<name>]. Claude Code settings.json and VS Code settings.json use {}. Aider, Continue, and Goose use YAML.
Configuration file is not valid JSON or not valid TOML means the file has a syntax error. That finding stays high and names the line and column. Fix the syntax and run balerx scan again. See CONFIG-001.
CONFIG-002
Configuration file could not be read means the scanner did not open a discovered file, or an explicit file argument. Restore read access and run balerx scan again, or pass --fail-on-unreadable in CI so an unread file fails the job. A parent directory that cannot be listed is not walked, so a file under it is not discovered. See CONFIG-002.
Upload says the URL or key is missing
Pass both --api-url and set BALERX_API_KEY, or pass --api-key - to read the key from stdin. The command refuses to guess a server.
Upload says a file is required
Pass at least one of --scan, --activity-log, or --lockfile.
The dashboard shows no machine
Upload the scan JSON. A local scan does not appear on its own. The hostname comes from the scan. A blank hostname is stored as unknown.
A trace does not appear
Check the key, the URL path /v1/traces, and the content type (application/json or protobuf). HTTP 400 means the body or content type was not valid OTLP/HTTP. HTTP 202 means the body was well-formed OTLP; read accepted and rejected in the JSON. HTTP 429 is a temporary ingest limit: wait the whole number of seconds in Retry-After (at least 1) and send the batch again. Do not treat 429 as a malformed body. A span older than 7 days or more than 10 minutes in the future is rejected and does not appear under Runs. The span needs an agent, tool, or model shape, or a name the mapper recognizes. The test body on the keys page is a known-good agent span. See Monitor trust model.
A viewer cannot create a key. Ask an owner or admin.
Guard allowed a call I expected it to deny
When the policy file is missing, Guard uses the built-in default. That default has fail_open: true, so invalid JSON allows the call. An evaluation that does not finish asks. A completed deny or ask is kept. A present empty or unreadable policy.yaml fails closed and returns ask. Confirm the file parses (balerx doctor), the rule is enabled: true, and the condition type matches the call. fail_open: true allows only after invalid JSON or an internal error, and that allow is written to the activity log and stderr. --preset strict writes fail_open: false. Paths such as ~/.ssh/../.ssh/id_rsa and a symlink to a key are matched after canonicalization.
How do I uninstall?
balerx uninstall prints the hook files it will edit, then asks. --yes skips the question. A pipe without --yes changes nothing and prints Run: balerx uninstall --yes.
balerx uninstall
balerx uninstall --yes
balerx uninstall --purge --yesA command is removed when it contains balerx and hook and it runs the balerx binary, or balerx.exe, with a separate hook argument. my-balerx-webhook.sh stays. Empty hook lists left behind are removed. Without --purge, ~/.balerx and the activity log stay, and the command says Policy and logs stay. Pass --purge to delete them. --purge deletes known files only: policy.yaml, policy.yaml.bak copies, planted canary files in ~/.balerx/canaries, canaries.json, and logs/activity.jsonl. Unknown files stay. The directory is removed only when it is empty afterward and its name is .balerx or balerx. A custom BALERX_DATA_DIR is never removed wholesale. Purge does nothing and exits nonzero when the home directory or the data directory is not an absolute path. Symlinks are left in place. The data directory is ~/.local/share/balerx on Linux, ~/Library/Application Support/balerx on macOS, and %LOCALAPPDATA%\balerx on Windows.
On macOS and Linux, $HOME/.local/bin/balerx is removed only when that file is the running binary. On Windows, purge deletes known data files and does not delete balerx.exe. It prints:
Remove-Item -Recurse -Force "$env:LOCALAPPDATA\balerx"and the PowerShell that removes %LOCALAPPDATA%\balerx from the user Path and the current process Path. A source build is removed by deleting the target directory. The command stays offline.
Can I run a scan in CI?
Yes. Write SARIF and use your code-scanning upload. The scanner still does not execute MCP servers.
balerx scan --sarif report.sarif --quiet