Skip to main content

bugstweet 0.9.17 copy "bugstweet: ^0.9.17" to clipboard
bugstweet: ^0.9.17 copied to clipboard

Testers report bugs from inside your Flutter app as GitHub issues an AI coding agent can fix. Tester builds only: store builds never contain it.

bugsTweet #

bugsTweet

Your testers report bugs from inside your Flutter app, on the phone. They tap Ward, the bird on the screen, add a note if they like, and tap Send now. Each report arrives as a GitHub issue with everything a developer or an AI coding agent (Claude Code, Codex, Cursor and the like) needs to fix it.

  • Free: Ward, marks, long shots, notes, phone facts, retest, and one GitHub issue per report. No account and no server needed.
  • Pro, through the hosted bugsTweet service: the report a coding agent can fix. The service adds the taps before the bug, the last 30 seconds, the file and line, a draft test, a scenario, the app's state, a check for duplicates, the ten-second clip, and the agent's questions on the tester's phone. See bugstweet.com/pricing.
  • Your app's code is never changed.
  • Store builds never contain bugsTweet. Only tester builds do.

How it stays out of your app #

bugsTweet comes in two packages. You only ever add and type the first one.

  • bugstweet: the tool. You add it to your pubspec.yaml as a development package. It has no phone parts, and your app never uses its code, so nothing of it is packed into any build.
  • bugstweet_reporter: Ward and the phone parts testers use. You never add it. The tool adds it to tester builds only.

How a tester build is made:

  1. Your app gets one small file, .bugstweet/tester.dart. The folder name starts with a dot, so your normal code checks and IDE skip it.
  2. dart run bugstweet build copies your app to a cache folder on your computer, adds bugstweet_reporter to that copy only, and builds the tester app from the copy.
  3. For a store build, you run flutter build as always. Your app does not list bugstweet_reporter, so none of it can be packed into the store app.

What is inside each build (checked on Android and iPhone builds):

Inside the app Store build Tester build
bugsTweet code (Ward, screens, sending) no yes
bugsTweet phone parts (screenshot and shake listeners) no yes
Android "detect screen capture" permission no yes
iPhone motion permission text no yes

Set up (once per app) #

You need Flutter 3.38 or later.

Set up through your AI agent #

Copy this prompt into your coding agent (Claude Code, Codex, Cursor and the like), opened in your app's folder. It does the whole setup and asks you for one thing only: your GitHub token, which you paste into a file the agent never reads.

Set up bugsTweet in this Flutter app, so anyone using my test build (me, my testers, my clients) can tap Ward, the bird, and each report arrives as a GitHub issue. Do every step yourself. Ask me for one thing only: my GitHub token. If a command fails, stop, show me its exact message, and ask me before going on.

1. In the app folder, add the setup tool as a development package:
   flutter pub add --dev bugstweet
2. Read the app's GitHub owner and name from the git remote (git remote get-url origin). The reports repository is OWNER/APP-reports: the same owner, and the app's name plus -reports. If the gh command is installed and signed in (gh auth status), make it:
   gh repo create OWNER/APP-reports --private --add-readme
   If not, stop. Ask me to make that private repository, with a README, at https://github.com/new, and to tell you when it is done.
3. Look for flavors: productFlavors in android/app/build.gradle or build.gradle.kts, and the schemes in ios/Runner.xcodeproj/xcshareddata/xcschemes. If there are any, pick the one testers get: a name with stage, beta, qa or test in it, else the first one. Call it FLAVOR. With no flavors, leave --flavor FLAVOR out of every command below.
4. Run the setup with flags, so it asks nothing:
   dart run bugstweet init --token --repo OWNER/APP-reports --flavor FLAVOR --no-test --yes
   It writes the .bugstweet folder and adds lines to .gitignore, so the token is never committed. It ends by saying there is no token yet.
5. Ask me for the token, once. Say exactly: "Make a fine-grained GitHub token at https://github.com/settings/personal-access-tokens/new for OWNER/APP-reports only, with Issues and Contents set to Read and write. Paste it into the file .bugstweet/github-token, one line, and tell me when it is done." Never read, print, log or commit that file. Never put the token in a command or in this chat.
6. When I say it is done, run:
   dart run bugstweet init --flavor FLAVOR --yes
   It checks the token, makes the labels and sends a test report. Then run dart run bugstweet doctor. It must end with "All good."
7. Make the first tester app. If a phone or emulator is connected (flutter devices), run:
   dart run bugstweet run -d DEVICE_ID --flavor FLAVOR --no-resident
   It installs the tester app, starts it and returns. If none is connected, run:
   dart run bugstweet build apk --flavor FLAVOR
   and tell me where the file is.
8. Tell me, in short: what changed in the app (one line in pubspec.yaml, the .bugstweet folder, the lines in .gitignore), what is safe to commit (all of it: git already ignores the token file), the link of the test report, and how to try Ward: tap the bird to report, or hold it to write and send at once.

Optional: if I ask for a client checklist, write .bugstweet/checklist.md: one short line per thing my client should check in the tester app. Lines starting with # are notes for me. The next tester build carries it.

dart run bugstweet prompt prints the same text. For Pro, dart run bugstweet prompt --pro prints the one that asks for your setup code instead of a token.

Set up by hand #

In your app's folder:

  1. Add the tool as a development package:

    flutter pub add --dev bugstweet
    
  2. Make a private GitHub repository for reports, with a README (https://github.com/new), and a GitHub token for that repository only, with Issues and Contents set to Read and write (https://github.com/settings/personal-access-tokens/new). Your app's code does not go in that repository.

  3. Run the setup. It asks for the repository's address and the token, and which flavor testers get if your app has flavors. It checks each answer at once, then sends a test report:

    dart run bugstweet init
    

    If your app has versions (flavors), run and build say which one they use. To try another version once: dart run bugstweet run --flavor dev. To change it for good: dart run bugstweet init --change.

    The token is saved in .bugstweet/github-token and kept out of git. Run init again and it asks only what is missing; add --change to answer again. For reports by message with no setup, use init --share.

    To move an app to Pro, run dart run bugstweet pro and paste the setup code from your account page. It also reuses your GitHub token, or asks for it. See Hosted.

  4. Try it on a phone or emulator:

    dart run bugstweet run
    

    With more than one phone or emulator open, it asks which one and remembers the answer for 12 hours. The app starts with Ward on the screen.

dart run bugstweet doctor checks the setup any time and says what to fix. For scripts and CI, every answer has a flag: --service, --token or --share, --key <key> or --key-file <path>, --repo owner/name, --flavor <name>, --no-test, --yes. With --yes, nothing is asked.

Apart from the one bugstweet line under dev_dependencies, your pubspec.yaml, lib/ folder and platform files stay as they were. init adds .bugstweet/ (the tester file and the saved answers) and a few lines to .gitignore.

With a GitHub token, each init stores one small invisible object in the reports repository, to check that pictures can be saved there. It is not a file or a commit, so it shows nowhere in the repository.

Make a tester build #

dart run bugstweet build apk
dart run bugstweet build ipa

You can build apk, appbundle, ipa or ios. Every option you would give flutter build works here too (flavors, build numbers, export options). Paths in options, such as --split-debug-info or --dart-define-from-file, are read from your app folder, as in a normal build. A signing key kept outside the app (for example storeFile=../../upload-keystore.jks in android/key.properties) is found as well.

Give tester builds their own build number, for example --build-number=9001. Otherwise a tester build has the same number as your store build, and one uploaded to TestFlight can take the number of a real release.

The finished tester build goes to build/bugstweet/, for example build/bugstweet/apk/app-release.apk. It is kept apart from store builds, which stay in their usual place. Give tester builds to testers only (for example TestFlight internal testing or Firebase App Distribution), never to a store.

The first tester build takes a few minutes longer, because the copy starts empty. Later builds reuse it.

Run from Xcode #

You can start the tester app with Xcode's Run button:

  1. Run dart run bugstweet run once on an iPhone or the simulator. Add --flavor <name> if your app has flavors.
  2. In Xcode, open ios/Runner.xcworkspace of the tester copy. On a Mac the copy is in ~/Library/Caches/bugstweet/, in the folder that starts with your app's name.
  3. Pick your app's scheme (the flavor's scheme, if it has flavors) and press Run. The app starts with Ward on the screen.

Two things to know:

  • Xcode builds the copy as it was at the last dart run bugstweet run. Run it again to bring in your latest changes.
  • Do not edit files in the copy. The next bugsTweet run overwrites them.

Client checklist: Write. Send. See. #

Write a short list of things your client should check, one per line, in .bugstweet/checklist.md. dart run bugstweet checklist makes the file with notes that explain it and one example list, or prints your lists when it is there.

# Things for the client to check before we ship
Sign in with your email
Add a product to the cart
Pay with the test card

Lines starting with # are notes for you, and a leading - or 1. is dropped. There is no new step: each tester build (build or run) carries the list it was built with. The file is safe to commit; store builds never contain it.

Your client holds Ward, opens Checklist, and taps Pass or Bug on each item; a Bug opens the normal report form. You see one table per build on GitHub: the items down the side, one column per tester.

Several lists in one file #

A line ## Title starts a new list; the checks under it belong to it. Use one list per feature:

## Sign up
Open the app and tap Create account
Sign up with a new email

## Add a medicine
Tap + on Today
Find the new medicine on Today

With two lists or more, Ward first asks "Which list do you want to check?", with one button per list and its count. At the end of a list Ward asks "Sign up done. Check another list?". On GitHub, the results have one part per list, under its title. A file with no ## line is one list, as before. dart run bugstweet checklist prints exactly what your testers will see.

Your AI writes the checklist #

dart run bugstweet checklist --prompt prints one prompt for your own AI agent. The agent reads what changed since your last tester build (build keeps its commit), writes one list per new or changed feature with 3 to 6 plain checks each, and shows you the lists before it saves them. The agent never needs your token. The file stays yours to change by hand.

What testers get #

  • Tap Ward: the screen is saved quietly and Ward shows how many are saved, so your testers keep testing and collect screenshots as they go. A small picture waits in the corner; a tap on it opens the report. The first time, it stays until your tester taps or swipes it.
  • The report: the picture fills the top half, with a note under it. More opens what should happen, "How bad is it?", photos and the details. Your testers can mark up the picture, then tap Send now, or Save for later. Nothing sends by itself.
  • Hold Ward: a menu of choices: Tray, Report now (opens the report at once), Write only, Long shot, Record 10 s, Timer 3 s, Element and Hide.
  • Write only: the same report with no screenshot. Everything else in the report still goes, as in any report on your plan. Save, write another saves it and opens the next one at once, for many findings in a row.
  • A red bin on every picture takes it out, with Undo for a few seconds, and Add a photo beside the picture adds up to five photos from the phone. Blurred parts are private in your app, and the report says so.
  • The steps before the bug can be corrected: change a step, take one out, or add one. The report says when your tester did.
  • If the phone cannot take the picture, the report still opens, says why, and offers Try again.
  • Timer 3 s: a 3, 2, 1 countdown, then a screenshot, so a menu or a pressed state can be captured.
  • Element: tap a card or button, then tap it again: a screenshot of just that part.
  • Long shot: tap the part of the screen that scrolls, or Whole screen, and bugsTweet scrolls it for you and joins the pictures into one tall capture.
  • Record 10 s: use the app while Ward counts down; tap it to stop early. The clip, with every touch drawn as a red dot, becomes a report. With Pro it plays in the GitHub issue; on the free plan it stays on the phone, where the tester can watch it. Only the app is recorded, so the phone asks for no permission, and private areas are covered as in screenshots.
  • Shake the phone: a screenshot, or Ward comes back if hidden.
  • Screenshot with the phone's own buttons: bugsTweet asks "Report this?". Works on iPhone and on Android 14 or later.
  • Marks: arrow, line, box, circle, pen, highlight, spotlight, magnify, blur, text, numbered steps, and stamps with a tip that points at the spot (Wrong text, Misaligned, Too slow, Crash, Cut off, Overlaps... or your tester's own words). Tap an element with a shape tool and the shape snaps to it. On a long picture, a mark scrolls the picture when the finger reaches the edge.
  • Design tools: Ruler (in points), Color (hex), Contrast (WCAG AA/AAA).
  • Tray: review, add notes, merge several screenshots of one problem, and send all at once. It also lists every reported issue under four filters, Open, In progress, Ready for testing and Closed, exactly as GitHub has them (see "The status flow" below). Ready for testing comes first. It says which build the phone is on. A tap on an issue opens it inside the app: the picture, the words, the status and the messages. A tap on its number opens it on GitHub.
  • Messages: when you comment on an issue on GitHub, your tester sees a red count on that issue, a dot on Ward, and the message on the issue's page, and can reply from the app. The reply is a GitHub comment that starts with "From the tester:", so GitHub notifies you as usual.
  • Retest: every reported issue offers Retest. It opens the whole bug at once, every picture full screen with zoom, with Fixed, which closes the issue, and Still broken, which opens the same report form filled in from the bug (what is wrong now, what should happen, how bad, more pictures, the steps) and reopens the issue with one comment. A new screenshot to compare is a choice, never a must.
  • Answer the agent (Pro): when a coding agent writes its plan (Actual, Expected, Fix) or asks a question on an issue, the tray shows it as a card. Tap Go to agree, or Not quite and say what is different. When the agent writes "Fixed in build N", the tester's app on that build offers a retest.
  • Copy for agents: copy one or several open reports as one message for a coding agent.
  • Recap: today's test session on one card, ready to share.
  • Voice notes: the keyboard's own dictation key. bugsTweet never handles audio.

Every report also carries, without any typing: the screen name, phone settings (text size, dark mode, language), phone model and system, app version, and recent app errors. With Pro, the service adds the taps before the bug, a filmstrip of the last 30 seconds, the file and line of each widget, a draft test that replays the taps, a scenario, the app's state, the phone's condition, and a check for duplicate reports.

Where reports go #

  • GitHub (GitHubDelivery): one issue per report, labeled from-bugsTweet. Screenshots are stored on a bugs-tweet-media branch of the same repository and linked from the issue. Sending starts nothing else: you decide when to hand an issue to a coding agent.
  • Share sheet (ShareDelivery): the screenshot and report text go to any app the tester picks. Used by itself when no GitHub key is given.
  • Your own place: implement ReportDelivery.

The GitHub key, and why reports get their own repository #

The key is built into the tester app, so anyone who has the tester app can read it. Keep the damage small:

  1. Create a private repository that holds only reports, for example my-app-reports, with a README (GitHub cannot add the screenshots branch to an empty repository). Never point bugsTweet at your code repository.

  2. Create a fine-grained personal access token for that one reports repository only, with Issues: read and write and Contents: read and write, and a short expiry.

  3. Pass the key at build time, never in a file in git: --dart-define=BUGS_TWEET_GITHUB_TOKEN=github_pat_....

  4. dart run bugstweet init makes the labels in the reports repository. To make them by hand:

    gh label create from-bugsTweet --color 0B7A6E
    gh label create "status: in progress" --color 2FBFA9
    gh label create "status: ready for testing" --color 7B61FF
    gh label create "bugsTweet: pending" --color F2B84B
    

When a test period ends, or a tester build reaches someone it should not, delete the key on GitHub. That build can then no longer send.

Optional: the relay (no GitHub key in the app) #

A small Cloudflare Worker that you deploy for free holds the GitHub key. The tester app holds only a send code, which can do nothing but bugsTweet's own calls in one reports repository. Setup steps: bugstweet.com/get-started. In .bugstweet/tester.dart, use:

GitHubDelivery.relay(
  url: 'https://bugs-tweet-relay.<you>.workers.dev',
  sendCode: const String.fromEnvironment('BUGS_TWEET_SEND_CODE'),
  repo: 'me/my-app-reports',
  codeRepo: 'me/my-app',
)

Hosted: the bugsTweet service (Pro) #

This is how you get Pro. New projects start with a 14-day free trial.

The bugsTweet service sends the reports for you. The tester app holds a project key, which works for one reports repository and only for bugsTweet's own calls. The issues are written by bugsTweet[bot], and the labels are made for you.

When Pro ends, your testers never stop. The phone sends the Free way by itself: straight to your GitHub, without the AI parts. Pay again, and the next report goes the Pro way again. No new build needed. To make this work, a Pro test build also carries your GitHub token, the same one Free uses, for your reports repository only. Without a token, reports wait in the tray until you pay again.

  1. Create a private reports repository, with a README, as above.
  2. Open api.bugstweet.com, sign in with GitHub and install the bugsTweet app on that reports repository only.
  3. Click New project, pick the repository, and copy the key. It is shown once.
  4. Run dart run bugstweet pro and paste the key. It is saved in .bugstweet/key, which the setup adds to .gitignore. It also asks for your GitHub token for that repository, or reuses the one in .bugstweet/github-token (kept out of git too). Press Enter to skip it.
  5. If you also made a developer key, paste it into .bugstweet/developer-key (one line): the tool uses it for its own uploads, and the agent link needs it. Without that file, .bugstweet/key is used for the uploads too.
  6. Build as usual: dart run bugstweet build apk. bugstweet puts the key and your GitHub token into the tester build; neither is in the command.
GitHubDelivery.hosted(
  key: const String.fromEnvironment('BUGS_TWEET_KEY'),
  repo: 'me/my-app-reports',
  codeRepo: 'me/my-app',
  githubToken: const String.fromEnvironment('BUGS_TWEET_GITHUB_TOKEN'),
)

If the key is lost or reaches someone it should not, click New key: the old key stops working at once, and the next build uses the new one.

The tester file #

dart run bugstweet init writes .bugstweet/tester.dart. It is plain Dart, so you can change it freely. Common settings in BugsTweetConfig:

  • delivery: where reports go (see above).
  • redact: cleans text before a report leaves the phone, for example redact: (text) => text.replaceAll(RegExp(r'[\w.+-]+@[\w-]+\.[\w.]+'), '[email]').
  • readFirst: which doc a coding agent should read first for a report.
  • autoBlurTextFields: blur every text field in screenshots (off by default; password fields are always blurred).
  • shakeToReport, screenshotToReport: turn those off.
  • reproTestApp, reproTestImport: let the draft test start your app.
  • appState: a few facts your app knows at the moment of a capture, so the agent does not have to guess, for example appState: () => {'signed in': auth.signedIn, 'cart items': cart.length}. Each value is sent as text, with redact applied.
  • askBeforeRecording: on by default in release and profile builds. The first time a tester build opens, a card asks the tester before small pictures of the last 30 seconds and the last 30 taps are kept; a switch in the tray changes the answer later. Set it to false only for your own builds.
  • logoColors: the colors of Ward. Purple by default; BugsTweetLogoColors.teal, .blue or .coral, or seven colors of your own with BugsTweetLogoColors(face: ..., light: ..., shadow: ..., trim: ..., beak: ..., eyes: ..., shine: ...).
  • speedTest: on by default. When reports are sent, the phone downloads about 1 MB from Cloudflare's public speed test (speed.cloudflare.com) and each report says how fast it came. Set speedTest: false to skip it.

With Pro, every report also says the phone's condition when the picture was taken: network (Wi-Fi, mobile data, offline, VPN), the phone's own speed estimate (Android), battery level, charging and power saving, free storage and memory, and heat. None of it asks the tester for a permission.

Keep a private part out of reports #

Password fields are always blurred. For anything else private (a card number, an address, a chat), give the widget a key whose name starts with bugstweet-private, in your own app code:

Text(account.iban, key: const Key('bugstweet-private iban'))

That is a plain Flutter key, so your store build needs nothing from bugsTweet. In tester builds the part is blurred in every screenshot, the filmstrip and the clip before anything is saved, a tap on it is recorded as "Tapped a private field", and no text inside it is kept. The blur is final: testers cannot remove it. Use a different name after the prefix for each private widget in the same row or column, as Flutter keys must differ between siblings. The BugsTweetPrivate wrapper from the tester package does the same for code that already runs only in tester builds.

Text fields are not blurred by default, because what a field shows is often the bug; autoBlurTextFields: true blurs them all.

To see one blurred field in reports while you test, for example a test password on a sign-in screen, give it a key whose name starts with bugstweet-visible:

TextField(obscureText: true, key: const Key('bugstweet-visible test password'))

Inside that widget the automatic blur is off; a part marked bugstweet-private stays blurred. Only you can do this, in code; testers cannot. The typed text is still never kept as words, only seen in the picture. It does not reach inside a web page shown in the app.

Before each tester build, bugsTweet writes .bugstweet/widget_map.g.dart into the copy, so reports name the file and line of each widget. It never appears in your app.

The status flow #

Every issue moves through four states, kept on GitHub itself, so your testers, you and your coding agent always agree:

  1. Open: the tester sent it. No status label.
  2. In progress (optional): you or your agent add the label status: in progress when the work starts.
  3. Ready for testing: when the fix is in a tester build, take status: in progress off, add the label status: ready for testing, and write a comment with the build number, for example "Fixed in build 46". The tester's tray then lists it first.
  4. Closed: the tester taps Fixed in the app. Still broken sends it back to Open with their notes and pictures. Never close an issue yourself.

Give your coding agent these three lines, and it will keep the flow: add status: in progress when you start; when the fix is in a build, add status: ready for testing and write the build number; never close the issue, the tester closes it. Every new report carries them in its body.

For the coding agent #

Each issue ends with the steps an agent follows: the status flow above, find the cause, write back Actual, Expected and the proposed fix, wait for the tester to agree, then fix, test, and say what is done and what is not. The AGENT.md file that ships inside this package has the details, including how to fetch the screenshots.

Prove a fix (Pro) #

After a fix, run the bug's test on the code the tester had and on the code now:

dart run bugstweet verify 23 --test test/bugs/total_test.dart

The test must fail on the code the tester's build was made from (bugsTweet reads it from the report's build receipt) and pass on the code now. Then bugsTweet posts "Verified fix" with both commits to report #23. When the runs do not prove the fix, it says why and posts nothing.

Find the taps that matter #

A bug test replays every tap the tester made, often many more than the bug needs. For a test that fails because of the bug:

dart run bugstweet shorten --test test/bugs/total_test.dart

bugsTweet removes the taps one at a time and keeps only those the failure needs: the test must still fail the same way. The shortest test goes next to yours, as total_shortest_test.dart; your test stays as it is.

Uninstall #

In your app's folder:

dart run bugstweet uninstall

It removes the tool, the tester copy, your tester apps in build/bugstweet, the .bugstweet folder and the lines the setup added to .gitignore. Your app's code is not touched. It also lists what lives outside the folder and is yours to remove: tester apps on phones, the reports repository, and the GitHub token, or on Pro the project, the subscription and the GitHub app.

Limits #

  • Captures the app's own window only. Web pages shown in the app (web views) are pictured since 0.9.16; other platform views, such as maps and video players, still show blank.
  • Widget names in reports come from class names, so --obfuscate builds lose them.
  • dart run bugstweet run starts the app from the copy, so hot reload does not see edits you make in your app while it runs. Stop and run again.

License #

MIT.

0
likes
160
points
2.38k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Testers report bugs from inside your Flutter app as GitHub issues an AI coding agent can fix. Tester builds only: store builds never contain it.

Homepage

License

MIT (license)

Dependencies

yaml

More

Packages that depend on bugstweet