Read, file and act on BetterBugs bug reports from your terminal, CI pipelines and coding agents.
npm install -g @betterbugs/cli
betterbugs auth login # log in through your browser
betterbugs list bugs --status open --since 7d
betterbugs get bug <id> # summary, environment and the most useful signals
betterbugs pull <id> # the whole report as files, for you or an agent
betterbugs comment <id> "Root cause: …"
betterbugs update <id> --status resolvedThe package installs the same CLI under three names: betterbugs, bbug and bb.
Use whichever you like day to day; scripts and docs use betterbugs.
npm (Node.js 20.18.1 or newer):
npm install -g @betterbugs/cliHomebrew:
brew install betterbugs/tap/betterbugsRun without installing:
npx @betterbugs/cli --helpget frames uses ffmpeg if it is installed; everything else needs nothing extra.
bbalready taken? If another tool (for example Babashka) ownsbb, npm may refuse to install over it.bbugandbetterbugsalways work, andbetterbugs alias installaddsbbas a shell alias instead.
betterbugs auth login # opens BetterBugs in your browser; click "Activate"
betterbugs whoamiFor CI and other non-interactive use, create a token (betterbugs create token, or in the web app under
Settings → Access tokens) and pass it on stdin. Tokens are never accepted as command-line arguments.
echo "$BETTERBUGS_TOKEN" | betterbugs auth login --tokenOn a machine without a browser, BETTERBUGS_NO_BROWSER=1 betterbugs auth login prints the URL to open elsewhere.
Pin a workspace and project for a repository so you don't have to pass --workspace / --project every time:
betterbugs init # writes ./.betterbugs.jsonRead bugs
list bugswith filters:--status,--since,--assignee,--filter <saved filter>,--watchfor live updatesget bug <id>, plusget console,get network,get steps,get env,get comments,get screenshots,get video,get replayand moreexport bugs --format jsonor--format csv
Work on bugs
comment <id> "text", with--at <ms>to point at a moment in the recordingupdate <id> --status resolved,--assignee,--priority, tagslink bug,move bug,archive bug,share bugpush <id> --to jira(also Linear, GitHub, GitLab, Asana, ClickUp, Trello, Notion, Azure DevOps, Basecamp, Zoho, ProofHub, Bugasura, Slack and Microsoft Teams)
File bugs
create bug --title … --attach file.har, or from a JSON payloadcreate bug --from-playwright test-results/files one report per failed Playwright test, with traces and screenshots--dedupe-keyupdates the same report on reruns instead of filing duplicates- Console logs, network logs and text attachments are redacted before upload
Debug and verify
repro <id> --framework playwrightgenerates a reproduction testcomment <id> --from-test-result result.jsonrecords that a fix was verifieddebug <id>,ask <id> "…"andgenerate stepsuse BetterBugs AI
Manage
Workspaces, projects, members, saved filters, recording links, integrations, webhooks, OAuth apps, access tokens and
billing. Run betterbugs --help or betterbugs <command> --help for everything.
betterbugs pull <id> writes the report to .betterbugs/<id>/ as plain files an agent can read: a README.md to start
from, the bug, environment, console log, network.har, steps, comments and screenshots. Credentials are redacted by
default.
Install the bundled agent skills (debug a bug, file a report, prove a fix) for Claude Code, Cursor, Codex or OpenCode:
betterbugs skills install # Claude Code
betterbugs skills install --target cursor,codexbetterbugs agent-context --json describes every command, flag, value and output shape as JSON.
- Add
--jsonfor stable JSON output. It is the default for read commands when stdout isn't a terminal. - Destructive commands ask for confirmation; pass
--yesin scripts. - Exit codes are stable:
0ok,1error,2usage,3not logged in,4forbidden or missing scope,5not found,6rate limited,7network,8plan limit,9validation,10partial,11not ready,13missing dependency,130cancelled.
Guides:
- CI recipes: GitHub Actions, GitLab CI and CircleCI
- Git hooks: check bug references in commit messages
- Cookbook: automation built on
--json
echo 'eval "$(betterbugs completion zsh)"' >> ~/.zshrc # after compinit
echo 'eval "$(betterbugs completion bash)"' >> ~/.bashrc
betterbugs completion fish > ~/.config/fish/conf.d/betterbugs.fishPowerShell: add betterbugs completion powershell | Out-String | Invoke-Expression to your $PROFILE.
betterbugs config set <key> <value>for your user config,--localfor./.betterbugs.json--profile <name>switches between saved logins (several accounts)betterbugs config set credential-store keychainkeeps tokens in the OS keychain instead of a filebetterbugs doctorchecks your setup
- Credentials are stored with owner-only permissions, or in the OS keychain if you opt in.
- Console logs, network logs and attachments are redacted before they are uploaded, printed or written to disk.
- Browser login uses PKCE and a callback bound to
127.0.0.1only. - Output to a terminal is stripped of escape sequences that bug data could carry.
betterbugs upgrade # npm install -g @betterbugs/cli@latest
betterbugs uninstall # removes saved logins and config, then the packageMIT