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 · package 0.4

Android

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

dev.bugcapsule · 0.3.0 · minSdk 23

iOS

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

SwiftPM · 0.3.0 · iOS 15+

Web & React

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

@bugcapsule/web · 0.3.0

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 ingest key (bci_) 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 public ingest key. 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 get from your BugCapsule team

ItemLooks likeWhere it goes
API URLhttps://api.bugcapsule.comSDK config and bugcapsule login
Ingest keybci_…Inside your app. Treat it as public.
Secret keybcs_…The CLI and CI secrets only. Never ship it in an app.
Dashboard sign-inuser name + passwordThe web dashboard

How an integration goes

  1. Add the SDK and initialize it first

    Init must run before your app reads storage, because during replay it restores the recorded state there. 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 your project keys to a first REPRODUCED and a first FIXED.

Ground rules for every platform