npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@brokkai/bug-bot-linux-x64

v0.6.2

Published

Brokk Bug Bot native binary for linux/x64

Readme

Brokk Bug Bot

This standalone project now lives in BrokkAi/brokk-town/bots/bug-bot. Build and test from this directory; see RELEASING.md for its independent suffix-tag releases.

Find new bugs in a repository and file useful GitHub issues. bbb follows the same Go CLI, no-config discovery, managed workspace, and shared ACP runner pattern as issue-bot (bib) and release-bot (brb).

The LLM decides whether a finding duplicates an existing issue. It compares root causes, triggering inputs, behavior, and discussion across open and closed issues. There are no title similarity thresholds or bug fingerprint rules.

Install and run

Install with npm (Node.js 18+; no Go toolchain required):

npm install -g @brokkai/bug-bot
bbb /path/to/your-repo

For a single invocation, use npx --yes @brokkai/bug-bot. Keep npm optional dependencies enabled: they supply the native Linux/macOS x64 or arm64 binary.

Or install a native binary with its SHA-256 checksum verified:

curl -fsSL https://raw.githubusercontent.com/BrokkAi/bug-bot/master/install.sh | sh

The installer puts bbb in ~/.local/bin; add that directory to PATH. Set INSTALL_DIR to change the destination. To pin a version, download the script and run sh install.sh v0.1.0.

With Go 1.27.1 or newer:

go install github.com/BrokkAi/bug-bot/cmd/bbb@latest

Go installs bbb in GOBIN, or $(go env GOPATH)/bin by default. From a source checkout:

make build
./bin/bbb /path/to/your-repo
./bin/bbb /path/to/your-repo --plain
./bin/bbb once /path/to/your-repo --dry-run
./bin/bbb once /path/to/your-repo --focus "parser and input validation"
./bin/bbb /path/to/your-repo --max-issues 2 --label bug
./bin/bbb /path/to/your-repo --only-on-change
./bin/bbb /path/to/your-repo --model YOUR_MODEL_ID --effort low
./bin/bbb /path/to/your-repo --model SCAN_MODEL_ID --review-model REVIEW_MODEL_ID --review-effort high
./bin/bbb status /path/to/your-repo
./bin/bbb report /path/to/your-repo --status dry_run > findings.md
./bin/bbb version
./bin/bbb retry /path/to/your-repo --once

Source builds require Go 1.27.1. To install the local source as bbb, run go install ./cmd/bbb and put your Go bin directory on PATH. Running bbb from inside any target repository discovers its remote and default branch. A Git URL also works. Flags can precede or follow the repository argument.

bbb version prints the embedded release tag. Local builds report dev; binaries installed with go install ...@version report the module version.

Runtime requirements: Git, authenticated gh with repository/issue read and issue creation access, and an authenticated ACP agent. By default it uses an installed codex-acp, falling back to npx --yes @agentclientprotocol/codex-acp. Explicit --agent commands are used as supplied; repeat --agent-arg for arguments.

Starting bbb authorizes unattended local investigation, test execution, and creation of issues for the selected repository. --dry-run performs discovery and review, prints the proposed issue bodies, and saves them without filing.

Terminal dashboard

Interactive runs show a live dashboard by default. It fits the current terminal or tmux pane, adjusts when the pane is resized, and keeps the repository and current task visible. Each pane still runs one repository.

bbb /path/to/repo           # live dashboard in an interactive terminal
bbb /path/to/repo --plain   # scrolling console output and agent transcript
bbb /path/to/repo --json    # structured logs for tools and log collectors

The overview shows the repository, branch and commit, scan stage, active tool, uptime, attempt budget, and next check or retry countdown. Larger panes also show the discovery and review model and reasoning effort, and the investigation focus.

Saved counts cover findings in the configured repository/branch state, including the current scan: found, filed, duplicate, pending, dry run, and skipped (invalid, uncertain, or stale). Run counters start at zero each time the process starts: completed scans, attempts, agent starts, tools, and error log events. A discovered finding is counted as filed only after publication is confirmed. Findings restored after restarting are included in saved totals.

  • 1, 2, 3 or Tab: switch between overview, findings, and activity.
  • ↑ / ↓ or k / j: browse findings or scroll activity.
  • Enter: inspect the selected finding, issue URL, reproduction, and review.
  • Esc: return from finding details. Page Up / Page Down scroll details.
  • g / G: jump to the start/end; G resumes following live activity.
  • q or Ctrl+C: stop the bot and its active agent, then restore the terminal.

The finding browser shows the latest 200 findings, while totals include all saved findings. The activity view keeps recent output; full agent transcripts remain under the state directory. On exit, a short summary and new finding URLs stay in the terminal. once exits after its scan, and dry runs also print proposed finding details on exit.

Piped input, redirected stderr, and TERM=dumb use scrolling output automatically. --plain and --json disable the dashboard and are mutually exclusive. NO_COLOR disables dashboard colors. status, report, version, and help keep their existing output and never open the dashboard.

How it works

  1. Fetch the target branch into a managed clone and make an isolated detached worktree for the scan. The original checkout and uncommitted work are preserved. An optional operator setup command prepares the worktree at the start of each attempt, before any agent runs.
  2. Download all open and closed issues and their comments with pagination. Give the investigator the complete snapshot and recent scan summaries so it can avoid known bugs and explore new areas on subsequent scans.
  3. Have the agent inspect source and run relevant checks. Each candidate must include a root cause, source paths, concrete reproduction, expected/actual behavior, and observed evidence or a precise code proof. Zero findings is valid.
  4. Start separate LLM review sessions to verify the evidence and compare each candidate against the issue history. Large histories are supplied in batches; every issue and comment is included, and each response must identify all issue numbers it reviewed. A duplicate verdict links the existing report in local state. Uncertain and invalid findings are saved without filing.
  5. Refresh issues before publication. New or edited reports go back to the LLM for comparison. Recheck the detached scan worktree and tracked files. The remote branch may advance normally while the pinned commit is reviewed; each report identifies that exact commit. An optional operator verifier can provide an additional gate.
  6. Create issues sequentially, including reproduction, evidence, and the review explanation. Each newly created issue is available to the next candidate's LLM review, including candidates from the same scan.

Closed issues count as known reports, including fixed, duplicate, or rejected bugs. The reviewer is instructed to treat a regression of an existing report as belonging to that report. The bot does not reopen or comment on it.

The default is at most three issues per scan, a two-hour attempt budget, and another scan 30 minutes after completion, even if the commit is unchanged. Recent summaries guide exploration; this is not a claim of exhaustive coverage. With only_on_change (--only-on-change), the daemon still fetches at each poll but starts no investigation while the branch commit matches the last completed scan for the same dry-run setting; the dashboard reports the unchanged branch and the next check. A completed scan is one whose findings were all reviewed, including a scan with zero findings; a scan discarded because the branch advanced does not count. Switching from dry-run to publication permits a new scan of the same commit. Saved state from earlier versions scans once to establish the baseline. Uncertain publications, pending retries and exhausted budgets are handled before this check, and once always runs. This is a polling policy, not a claim that the revision was exhaustively investigated; use once to rescan after changing focus or model settings. once runs or resumes one scan and exits. Failed scans retain their candidates, workspace, and diagnostics; retries wait at least 15 minutes and run on the next poll, with three attempts before requiring retry. Agent startup failures are retried in place three times within about a minute, since nothing has been prompted yet; persistent setup errors then stop the daemon without consuming an attempt. After reconciling any uncertain issue publications, each poll or one-shot invocation checks for an advanced branch before enforcing the saved revision’s attempt budget or retry delay. A new revision archives pending findings as stale, retains their evidence and workspace, and starts a separate scan with a fresh budget. An unchanged exhausted revision remains blocked until retry.

Duplicate handling and interrupted requests

Semantic duplicate detection is an LLM judgment, so it is not a guarantee. Incomplete history, malformed review responses, and uncertain comparisons stop publication. Same-title reports still reach the LLM: identical wording can hide different bugs, and different wording can describe the same bug.

Every planned issue gets a random request ID, saved before sending its create request and embedded as a hidden comment in the issue body. This ID identifies one publication attempt; it is not derived from bug content or used to classify duplicates. After a crash or lost response, bbb looks for that ID and records the existing issue. If its outcome is unknown and the ID is not visible, it refuses to send another create request. Run once to try reconciliation again. If it never appears, inspect GitHub and the saved state before repairing the pending entry; retry intentionally cannot blindly resend an ambiguous request.

Confirmed HTTP rejections, such as validation or permission failures, keep the candidate pending. Correct the request or access problem, then run once to resume, or retry --once if the attempt budget is exhausted. Timeouts, server errors, and incomplete responses still require marker reconciliation. Older versions saved every create error as ambiguous; those existing posting entries still require inspection when no marker appears.

A per-repository local lock coordinates instances across branches and config paths using the same state home. Different machines/accounts and simultaneous human reports cannot be locked atomically with GitHub issue creation. Run one active bbb per repository to avoid that race.

Brokk Town worker service

bbb worker --socket PATH serves one-shot bug scan operations to Brokk Town over a private Unix-domain socket. The socket is mode 0600; the endpoint is private to the local service, and the process exits after Town requests shutdown.

Worker protocol v1 uses standard-library HTTP with JSON messages:

  • GET /v1/initialize returns the protocol range, bot identity, release version, and capabilities. Town requires bug-scan as well as common run and progress capabilities.
  • POST /v1/runs accepts one strict JSON task and responds with contiguous newline-delimited JSON events: progress, optional typed result, and error, canceled, or complete.
  • POST /v1/shutdown asks the service to stop after the current stream.

Version and capability negotiation happen before work starts. Town does not read this bot's private state files; issue and review outcomes are explicit protocol results when applicable, while GitHub remains the durable source for receipts. The schemas are independent of the Unix HTTP transport, allowing an authenticated TLS transport to be added later without changing worker semantics.

Optional configuration

bbb --config bug-bot.json loads a strict JSON object. No file is loaded or generated implicitly. Paths, including local mirror remotes such as ./mirror.git or ./published:mirror.git, are resolved relative to the configuration file. See bug-bot.example.json.

{
  "remote": "https://github.com/OWNER/REPO.git",
  "branch": "main",
  "directory": "var/checkout",
  "state_directory": "var/state",
  "poll": "30m",
  "timeout": "2h",
  "retry_delay": "15m",
  "attempts": 3,
  "max_issues": 3,
  "focus": "",
  "labels": [],
  "dry_run": false,
  "only_on_change": false,
  "agent": {"command": ["codex-acp"]}
}

Labels are optional and added only to new issues; they never filter the history. Use labels that already exist in the target repository. github.host supports Enterprise, and github.repo (OWNER/REPO) identifies a local mirror's GitHub repository. agent also supports environment, auth_method, mode, model, and effort, with selection handled by the shared ACP runner.

Discovery uses agent.model and agent.effort (--model, --effort). Evidence validation and every duplicate-review batch, including reviews after issue history changes and reviews of pending findings resumed from a saved scan, use review_model and review_effort (--review-model, --review-effort). Each omitted review setting inherits the discovery setting; CLI flags override JSON, and blank values are rejected. For example, adding "review_model": "REVIEW_MODEL_ID" to the configuration keeps discovery on agent.model while review uses REVIEW_MODEL_ID. Review runs with the same agent command, environment, workspace, retries, timeout, and publication gates. A review model or effort the adapter does not offer stops the scan with a setup error before any review prompt; pending findings stay pending and never fall back to the discovery selection. Progress logs carry stage=discovery or stage=review with the effective model and effort.

verify accepts an argument array, such as ["/opt/checks/verify-bug"], executed in the scan worktree with BUG_COMMIT and JSON BUG_FINDING in its environment. Keep operator verifiers outside the writable worktree. A nonzero exit blocks filing.

setup (default: none; set it in the --config file) accepts an argument array, such as ["/opt/checks/install-deps", "--frozen"], for preparing test prerequisites. It runs in the detached scan worktree with bbb's environment, like verify, plus BUG_COMMIT set to its HEAD, once at the start of every counted scan attempt before any agent runs, including attempts that resume review of pending findings. It does not repeat for review batches or agent startup retries, so a later attempt runs it again: keep it idempotent and tolerant of partial earlier runs. It may create untracked or ignored files, which discovery and review then see; it must exit zero and leave HEAD and tracked source unchanged. Any failure, including exceeding the shared timeout (which kills its process tree), consumes the attempt, keeps pending findings unpublished, saves a workspace setup failure and waits retry_delay from when it failed. Dry runs run it; status, report, waiting polls and reconciling an interrupted publication do not. Only the tail of its output is kept in the saved failure. Nothing it exports reaches the agent. Keep setup scripts outside the writable worktree; they run with the bot's own privileges. An empty array or blank executable is rejected.

State and execution

State defaults to $XDG_STATE_HOME/bug-bot or ~/.local/state/bug-bot, keyed by remote and branch. JSON state is replaced atomically with fsync; private session transcripts live under the state directory. status prints saved JSON without starting an agent. --json selects structured progress logs.

Export all retained findings as Markdown for later review or sharing:

bbb report --config bug-bot.json > findings.md
bbb report --config bug-bot.json --status dry_run > dry-run.md

report reads saved state without starting an agent or scan, or changing state. A repository argument and --branch use the same selection as other commands; --config avoids remote discovery and requires neither GitHub CLI nor an agent. The report includes every completed and active finding (without the dashboard's 200-entry limit), evidence, review, saved status, and any issue URL. Filter with --status pending|posting|submitted|duplicate|uncertain|invalid|dry_run|stale (select one value); omitting it includes all outcomes. Empty selections report no saved findings. Active findings show the scan's known commit; completed findings explicitly show commit unavailable because it is not retained. Internal checkout/state paths and publication request markers are omitted from report metadata; saved finding text is preserved.

Scan worktrees and reproduction files are retained for inspection. Manage their retention along with transcripts externally. Agent instructions prohibit fixes, commits, pushes, and direct GitHub writes; tracked source changes or a changed HEAD invalidate the scan. Evidence is independently reviewed by the LLM, not proof that tests are correct. As in the sibling bots, ACP permission requests are automatically approved and agent commands run with the account's OS rights. This is not a sandbox; use an appropriate account/container for the repository.

Development and packaging

make check build
./bin/bbb --help
python3 -m unittest discover -s scripts -p '*_test.py'
node --test --test-isolation=none npm/bbb.test.cjs

Tests use local Git fixtures and simulated ACP/GitHub outcomes; they do not run a paid model or create real issues. They cover semantic closed duplicates, same-title distinct bugs, concurrent reports, partial histories, source changes, dry runs, retries, ambiguous POSTs, receipt coverage, configuration, locks, progress snapshots, dashboard resizing, and terminal cleanup.

The inherited release workflow packages Linux/macOS amd64/arm64 archives with checksums. The npm launcher and packaging workflow target @brokkai/bug-bot and install bbb. See RELEASING.md for publication and verification.

API references: GitHub issues, issue comments.

Automatic releases

Push a new v* version tag to run the complete Publish packages pipeline: Linux/macOS checks, native GitHub assets, then all five npm packages from the same tag and commit. No manual package dispatch is needed. The package job runs only after native publication succeeds and validates package contents and local installs before uploading. It does not wait for npm's public index to update.

For recovery, rerun failed jobs or manually dispatch publish-packages.yml from the exact existing tag with publish=true. The default manual publish=false validates without uploading. Existing published bytes must match on retry. See RELEASING.md for details.

Contributing

See CONTRIBUTING.md and our Code of Conduct. Report vulnerabilities privately using SECURITY.md.

License

Licensed under Apache-2.0. See NOTICE for project attribution and licenses/README.md for dependency terms, third-party notices, and the license review process.