BeeraSafe

Bolt CLI for terminal and VS Code

Install once, log in, then run and build from any terminal — including VS Code.

Last updated · September 2026

On this page

The Bolt CLI brings the same autonomous authorized-testing loop to your terminal: one prompt in, arranged output out. No browser needed. In VS Code, open the integrated terminal and use the same commands.

Prerequisites: account, then tokens

  1. Create your account

    Sign up and sign in through the web workspace first — the CLI has no signup of its own.

  2. Top up tokens

    Bolt runs draw from your prepaid balance. Check it with bolt balance after login; runs fail with Insufficient token balance when empty.

  3. Sign in from the terminal

    bolt signin opens your browser and hands the terminal a token. Every CLI run bills your balance exactly like a workspace run.

Install

Install for usersbash
npm install -g bolt-sec
bolt --help
Install from this repo (contributors)bash
npm install -g ./cli
bolt --help

./cli is the CLI folder inside the BeeraSafe repo. Use it when you have the code checked out. End users install the published package bolt-sec instead. Requires Node 18+. No other dependencies. Or run without installing: npx bolt-sec run "..." --target example.com.

Log in once

Sign in through your browserbash
bolt signin
bolt auth status
bolt balance

bolt signin is the whole flow: the terminal shows a short code (like WDJB-MJHT) and opens your browser, you enter the code and approve there, and the terminal picks up its token by itself. No password is ever typed into your shell, no local server is involved, and it works over SSH and in containers — with --no-browser you open the printed link yourself.

The code expires after 10 minutes and each approval mints exactly one token; approving twice or polling twice cannot double-mint. The token is long-lived (90 days), stored at ~/.bolt/config.json with mode 600. --url is only needed for local dev or self-hosted backends (defaults to your last login, else BOLT_URL, else https://bolt.beerasafe.com). Server mints it at POST /api/cli/device/token and accepts it as Authorization: Bearer on /api/generate and dashboard reads. Env overrides: BOLT_URL, BOLT_TOKEN.

There is no password path and no headless credential flag: a typed password would sit in shell history and the process list. bolt login and bolt signin are the same device flow — if you are already signed in on the web, the browser opens with the code prefilled and one approval signs the terminal in. Over SSH, add --no-browser and open the printed URL wherever your browser lives.

Run and build

Autonomous runbash
bolt run "get admin endpoints on subdomains of tesla.com" --target tesla.com
Build tools to diskbash
bolt build "nmap NSE script to detect exposed admin logins" --target tesla.com --out ./bolt-out

bolt build extracts fenced CODE blocks and saves each file (*.nse, *.py, *.sh) into --out (default ./bolt-out). Bolt does read-only checks server-side and writes complete scripts; you execute them from your own Kali/WSL.

Agent loop: let the model work the terminal

One-shot agent runbash
bolt run "refactor src/auth.ts to use the new session store" --tools
bolt -p "what does this repo do?"

With --tools (or -p print mode), the model reads, lists, and searches your project, asks before editing files or running shell commands, and feeds each result back into the next step — up to 8 iterations (--max-iters N, max 32). Reads, directory lists, and searches run free; writes, edits, and shell commands ask once or for the session; destructive commands are refused outright and everything mutating stays inside the directory you started in. Every write/edit is backed up under ~/.bolt/backups first (bolt undo <path> restores). Without a terminal to ask (-p, pipes), mutations are denied unless you pass --allow-all.

Machine-readable output and budgets

JSON output and token budgetbash
bolt run "get admin endpoints" --target tesla.com --format json --output out.json
bolt run "triage this dump" --mode defensive -f big.log --budget 8000

--format json prints one JSON document (answer, session, mode, target) on stdout with status on stderr, so pipes stay parseable; --output <file> also saves the final answer. --budget N refuses before spending when the estimated input exceeds N tokens — nothing is sent. bolt help run lists every flag.

Health, completions, export, undo

Operate the CLIbash
bolt doctor
bolt completion bash >> ~/.bashrc
bolt export <session-id> --format sarif --output findings.sarif
bolt undo src/auth.ts

bolt doctor checks node, auth, backend reachability, WSL, and clipboard, and exits non-zero on failure. bolt completion covers bash, zsh, fish, and powershell. bolt export writes md for humans, json for scripts, and sarif (GitHub code-scanning compatible) for CI. bolt undo restores the last backup of a file the agent wrote or edited.

Press Esc during any run to stop it — the session turn is saved and you land back at the prompt. If your balance runs out, the run stops at once with the remaining balance and the top-up link instead of hanging.

Interactive mode and sessions

REPL plus session resumebash
bolt
bolt run "is this phish real?" --mode defensive -f ./mail.eml -c
bolt session list

Bare bolt opens an interactive agent on the Bolt backend only — no providers, no model picker. Type @path to attach a file inline (Tab completes paths). / lists commands with Tab completion, /agents lists task agents (sweep, probe, build, plan, validate, triage), /agent <name> arms one for the next prompt, /init explores the project and writes BOLT.md, /resume picks a saved session back up, /retry re-runs the last prompt, /export saves the session (md|json|sarif), /undo restores a file, /doctor runs pre-flight checks, /tools toggles local tools, /copy copies the last answer, /models shows the backend. Sessions persist under ~/.bolt/sessions; -c continues the latest, -s resumes one by id, and --file is repeatable.

VS Code

  • Open the integrated terminal (Ctrl+`) and run the same bolt commands — no extension required.
  • Keep the repo open beside the terminal: generated files land in ./bolt-out for review before running.
  • Use --evidence ./alert.json to attach case files without pasting.
Same boundary as the workspace
Test only systems you are authorized to assess. The CLI refuses BeeraSafe-owned targets and stays non-destructive: no DoS, no data modification, no persistence. Server-side execution is read-only; active scripts run on your machine.
Not logged in?

Run bolt login (bolt signin works too) and approve in the browser. Check bolt auth status afterwards.

Something looks off?

Run bolt doctor. It names the fix for node, auth, backend, WSL, and clipboard issues.

The agent overwrote my file?

Run bolt undo <path> (or /undo <path> in the REPL). Every write/edit is backed up under ~/.bolt/backups first.

No code files saved?

The run produced prose, not fenced code. Re-ask as a build task (bolt build ...) and check the code tab equivalent in raw output.

401 Authentication required?

Token expired or revoked. Run bolt login again to mint a fresh token.

The model didn't touch my files?

Writes, edits, and shell commands need approval: answer the terminal prompt, allow for the session, or pass --allow-all. In print mode and pipes, mutations are denied without --allow-all.

Permission denied outside the project?

Writes, edits, and the shell are sandboxed to the directory where you started bolt. Start bolt from the project root instead.

The browser did not open?

Add --no-browser to print the sign-in link and code instead, then open the link wherever your browser lives and enter the code there. No port forwarding is needed.

The approval page showed a request I did not start?

Do not approve it, and close the tab. Only the terminal showing the matching code can ever use an approval, so nothing is shared.

Was this page helpful?