BugCapsule developer docs

Stop reproducing bugs. Replay them.

BugCapsule turns a failure QA saw into a portable .bugcapsule file. You replay it against your real app code on a simulator, emulator or browser, verify your fix, and keep it as a regression test. This guide shows how to add the SDK to your app and how to use the bugcapsule CLI and the dashboard.

QA hits a bug ─► capsule captured, redacted on device, uploaded bugcapsule run <id> ─► REPRODUCED 3/3 fix the code ─► bugcapsule verify <id> ─► FIXED 5/5 bugcapsule regress add <id> ─► runs in CI

Pick your platform

Flutter

One package, bug_capsule. BLoC, Riverpod, Provider, GetX, MobX, Dio, package:http, GoRouter.

Dart · bug_capsule 0.4.1-beta.5

Android

Kotlin SDK with a Java-friendly API. Views, Compose, Jetpack Navigation, OkHttp, DataStore.

io.github.bugcapsule · 0.4.1-beta.4 · minSdk 23

iOS

Swift package with no dependencies. UIKit, SwiftUI, URLSession, UserDefaults, XCUITest replay.

SwiftPM · 0.4.1-beta.2 · iOS 15+

Web & React

Framework-neutral SDK plus React helpers. fetch, XHR, History API, web storage, Playwright replay.

@bugcapsule/web · 0.4.0-beta.2

How it fits together

Your app with the SDK uploads capsules to BugCapsule; you replay them with the CLI against your code and see them in the dashboard. Your app + SDK captures, redacts, uploads holds the SDK token (bcsdk) BugCapsule stores your capsules capture settings Dashboard browse, triage, share bugcapsule CLI your machine or CI (bcs_) upload pull · results replays a debug build
Your app only ever holds the SDK token, which can only send data. The CLI uses your project's secret key and replays capsules against a debug or test build on your own machine; production builds can never be driven into replay.

What you need

ItemLooks likeWhere it goes
SDK tokenbcsdk.v1.…Inside your app: the one value init needs. It carries the BugCapsule address and can only send data. Project Settings › Keys › SDK tokens.
CLI tokenpersonal or service tokenThe CLI and CI secrets only. Never ship it in an app.
API URLhttps://api.bugcapsule.combugcapsule login, and the advanced explicit setup (with a bci_… ingest key) for self-hosted or existing apps
Dashboard sign-inuser name + passwordThe web dashboard

How an integration goes

  1. Connect with one line, then add adapters

    Initialize with your SDK token, first thing, and wait for the two confirmations: configuration fetched, then first event or Capsule received. Init must run before your app reads storage, because during replay it restores the recorded state there. Then add the integrations for your HTTP client, router, storage and state.

  2. Build with the git commit pinned

    Pass BUGCAPSULE_GIT_SHA at build time. Without it a capsule is partial and bugcapsule run can't check out the code that failed.

  3. Name actions, track text, write assertions

    Semantic action ids, tracked text fields and check/fail assertions make more bugs replayable. Wrong behaviour that doesn't throw becomes a checkable failure.

  4. Hand the build to QA

    When something breaks, a capsule is captured, redacted on the device and uploaded automatically. QA can also press the capture button.

  5. Replay, fix, verify, keep

    bugcapsule run expects REPRODUCED; after your fix bugcapsule verify expects FIXED; bugcapsule regress add keeps it for CI. See verdicts.

→

New here? The quickstart takes you from an SDK token to a first REPRODUCED and a first FIXED.

Ground rules for every platform

Choose your next step