The CLI is the primary way to run erabot. The entire stack — four-layer detection, the agentic audit engine, and the verification gates — executes on your machine with your own model keys. Your source code never reaches erabot servers. The platform only ever receives the metadata you explicitly choose to sync.
erabot never sees your code
Detection and patch generation run locally; the analysis model runs at the endpoint you set, under your own key. Nothing reaches erabot.
Licensed tool
Requires an active plan (Pro or above), provisioned after a demo.
You need:
claude CLI on your PATH and an ANTHROPIC_API_KEY in your environment.GEMINI_API_KEY, run with --no-agentic.# the agentic engine shells out to the claude CLI — install it once
npm install -g @anthropic-ai/claude-code
# your model key (the audit's LLM calls run under this key)
export ANTHROPIC_API_KEY="<the key we give you, or your own>"The Docker image (provisioned to you) already bundles the claude CLI and the engine — nothing to install there.
After your demo we provision a self-contained Docker image for your org — it bundles the audit engine and the claude CLI, so there is nothing else to install. This is the recommended way to run the pilot.
# pull the image we provision to you
docker pull <your-registry>/erabot:pilot # or: docker load -i erabot-pilot.tar.gz
# verify
docker run --rm <your-registry>/erabot:pilot --versionPrefer a native install? We also provision a bundle that ships the engine with the CLI (a bare CLI wheel won't run on its own). Ask us for it if Docker isn't an option — then pip install the bundle and npm i -g @anthropic-ai/claude-code.
Two ways to authorize this machine. Pilots and air-gapped teams use a signed offline license — no account, no signup, and no call to erabot at all.
# Offline license (pilots / air-gapped): we issue you a signed token
export ERABOT_LICENSE="<the signed license we give you>"
# — or — an account plan, validated once against the control plane
erabot loginThe license is a signed token, verified locally against a public key baked into the CLI — it can't be forged and it never phones home. It carries your org name, tier, and an expiry. Set it as the ERABOT_LICENSE environment variable before you run the audit.
Point it at any repo or subdirectory. Start narrow — the code path where your LLM calls actually live — then widen.
# audit the current repo
erabot audit .
# scope to the hot path (recommended for a first run)
erabot audit ./services/chat
# use your REAL usage data — findings become measured, not modeled
erabot audit . --traffic ./your-traffic.json
# air-gapped: refuse to run unless the model endpoint is in your network
ANTHROPIC_BASE_URL=https://llm.your-vpc.internal erabot audit . --air-gapped
# detection-only, no agent (faster, uses Gemini)
erabot audit . --no-agenticHave real traffic? Pass --traffic a JSON of your measured usage (per call site: model, tokens/call, calls/month). The audit then uses your actual volume and token sizes instead of its estimates, and labels those findings “measured”. If you use Helicone or Langfuse, we can convert their export for you. Percentages don't change — the dollars become your real numbers.
Where the model runs. By default the audit calls Anthropic's public API under your key (the CLI prints the endpoint on every run). To keep everything on your network, point ANTHROPIC_BASE_URL at an in-VPC gateway and add --air-gapped — the run then refuses to start if that endpoint is a public cloud host.
Everything is written locally, to an erabot-audit/ folder that is yours to keep:
erabot-audit/
├── report.md human-readable cost report + findings
├── report.pdf the same report as a shareable PDF
├── report.html styled HTML (open + print to PDF anywhere)
├── agent-instructions.md hand to Claude Code to apply the fixes
├── patches/*.patch verified, git-apply-clean diffs
└── results.json machine-readable summaryThe Docker image generates report.pdf out of the box; on the pip install, add it with pip install 'erabot[pdf]'.
Apply the fixes with a coding agent that has full repo context:
claude "Apply the fixes in erabot-audit/agent-instructions.md"Review before you apply. The patches are suggestions, not merge-ready commits. erabot never edits your source — it only writes diffs to erabot-audit/. Read each diff, apply it on a branch, and run your test suite before merging. Treat a fix like any pull request from a new teammate: useful, but yours to verify.
Add --sync to publish a metadata-only summary (repo name, grade, finding counts, identified savings) to your organization's Fleet view. Never your code, never the diffs — just the numbers, so leads can see the whole estate in one place.
erabot audit . --syncThe audit is designed to be safe to run on a production codebase you don't want disturbed. These are guarantees enforced in the engine, not just promises:
Read-only on your source. The auditor produces diffs; it never edits, moves, or deletes your files. All output goes to the erabot-audit/ folder.
Your code stays on your machine. The audit runs locally. Source is sent only to the model provider you configured (e.g. Anthropic), under your own API key. Nothing reaches erabot’s servers — except the metadata-only summary you opt into with --sync.
Secrets are redacted before any model call. Every file is scrubbed of API keys, tokens, private keys, and PII before the auditor can see it. Secret files (.env, *.pem, credentials) aren’t read at all — only source files (.py/.ts/.tsx/.js/.jsx).
It cannot read outside the repo. The auditor works from an in-memory map of your source files. It has no ability to open arbitrary paths — no ~/.ssh, no /etc, nothing outside the directory you point it at.
No shell, no writes, no network. The audit agent has no tools to run commands, write files, or make its own network calls. The worst a hostile string planted in your code could do is suggest a bad fix in the report — which you review before applying.
Full data-handling policy, encryption, and retention are on /security.
Run the audit on every pull request and post the identified savings as a check. The same in-VPC guarantee holds — it runs on your own CI runners with your own keys.
# .github/workflows/erabot.yml (excerpt)
- run: npm install -g @anthropic-ai/claude-code
- run: pip install ./vendor/erabot-*.whl # the build provisioned to your org
- run: erabot audit .
env:
ERABOT_LICENSE: ${{ secrets.ERABOT_LICENSE }}
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}Full flag reference and API details are in the docs. Data-handling policy is on /security.