feedbackbasket-cli 0.10.0 → 0.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,330 +1,390 @@
1
- ---
2
- name: feedbackbasket
3
- description: Manage FeedbackBasket projects, feedback, bugs, feedback widgets, waitlist capture, and teams from the command line. Use when an agent needs to configure FeedbackBasket, collect feedback or waitlist signups, query feedback, or manage a FeedbackBasket project.
4
- ---
5
-
6
- # FeedbackBasket CLI
7
-
8
- Full command-line interface for managing feedback, waitlist signups, bug reports, projects, widgets, and teams in FeedbackBasket. Works with any AI agent that can run shell commands.
9
-
10
- ## Authentication
11
-
12
- ```bash
13
- feedbackbasket login # Opens browser — one click, full access
14
- feedbackbasket login --manual # No localhost browser callback (remote servers)
15
- feedbackbasket login --token <TOKEN> # Manual token (CI/headless)
16
- feedbackbasket auth status # Check auth state
17
- feedbackbasket doctor # Full diagnostics
18
- ```
19
-
20
- ## Output Modes
21
-
22
- | Flag | Output | When to Use |
23
- |------|--------|-------------|
24
- | (none) | Styled (TTY) or JSON (piped) | Auto-detect |
25
- | `--json` | JSON envelope with breadcrumbs | Parse full response |
26
- | `--agent` | Raw JSON data only | Agent automation |
27
- | `--quiet` | Raw JSON data only | Scripting |
28
- | `--md` | Markdown | Documentation |
29
-
30
- **Agent rule**: Always use `--agent` for programmatic access. Parse the JSON output directly.
31
-
32
- ## Quick Reference
33
-
34
- ### Projects
35
- ```bash
36
- feedbackbasket projects list
37
- feedbackbasket projects show <name-or-id>
38
- feedbackbasket projects create "My App" --url https://myapp.com --description "..."
39
- feedbackbasket projects update <name-or-id> --name "New Name" --url <url> --description "..."
40
- feedbackbasket projects update <name-or-id> --reply-to vlad@example.com # default reply-to for feedback replies
41
- feedbackbasket projects delete <name-or-id> --yes
42
- ```
43
-
44
- All project commands accept **name or ID**. Names are matched case-insensitively with fuzzy suggestions on typos.
45
-
46
- **Project selection rule for widget installs:** when the user asks to add a FeedbackBasket widget, bubble, popup, modal, or feedback button to the current app, first resolve the FeedbackBasket project for this app. Do not use the CLI default project just because one is configured.
47
-
48
- 1. Identify the current app's real website URL or intended public URL from the user, app config, docs, or existing FeedbackBasket embed code.
49
- 2. Run `feedbackbasket projects list --agent` and look for an existing project whose `url` matches that site or whose name clearly matches the current app.
50
- 3. If exactly one project matches, use that project ID/name for `widget settings`, `widget script`, and feedback commands.
51
- 4. If multiple projects could match, ask the user which one to use.
52
- 5. If no project matches, ask whether to create a new project for this app, then create it with the confirmed real URL. Do not create a project from a localhost URL unless the user explicitly wants a local-only test project.
53
-
54
- **Project URL rule for agents:** confirm the real website URL before creating or updating a project. Never use `localhost`, `127.0.0.1`, `0.0.0.0`, `::1`, or a local dev server URL unless the user explicitly says the project is only for local testing. If the repo only exposes a local URL, ask for the production, staging, preview, or intended public URL. Do not guess a public domain from package names, git remotes, or environment variables. For an explicitly local-only test project, pass `--allow-local-url`.
55
-
56
- **Capture-mode decision:** if the user asks for feedback, a feedback bubble, bug reports, or feature requests, use `--capture-mode feedback`. If they ask for a waitlist, launch list, early access, or email capture, use `--capture-mode waitlist`. If they ask to set up FeedbackBasket without choosing, explain both options and ask which they want. Do not switch an existing project without confirmation because only one capture mode is active at a time.
57
-
58
- ### Feedback
59
- ```bash
60
- # Read
61
- feedbackbasket feedback list --project <id> --category BUG --status OPEN --sentiment NEGATIVE
62
- feedbackbasket feedback list --search "login" --limit 50 --offset 0 --notes
63
- feedbackbasket feedback show <id>
64
- feedbackbasket feedback search "crash on mobile" --project <id> --limit 10
65
-
66
- # Write
67
- feedbackbasket feedback create "Login button is broken" --content "Clicking Log in does nothing in Safari." --project <id> --type bug
68
- feedbackbasket feedback create "Feature idea" --content "Let users export saved views." --project <id> --type feature --metadata source=agent
69
- feedbackbasket feedback update <id> --status PLANNED --category BUG --sentiment NEGATIVE
70
- feedbackbasket feedback note <id> "Investigating appears related to auth flow"
71
- feedbackbasket feedback delete <id> --yes
72
- feedbackbasket feedback bulk-update --status CLOSED --ids id1,id2,id3
73
-
74
- # Reply to submitter by email, widget thread, or both
75
- feedbackbasket feedback reply <id> "Thanks for reporting we pushed a fix!" --delivery email --reply-to support@example.com
76
- feedbackbasket feedback reply <id> "<content>" --delivery widget
77
- feedbackbasket feedback reply <id> "<content>" --delivery both --reply-to support@example.com
78
- feedbackbasket feedback replies <id> # list past replies
79
-
80
- # Export
81
- feedbackbasket feedback export <project> --format csv
82
- feedbackbasket feedback export <project> --format md
83
- feedbackbasket feedback export <project> --format json
84
- ```
85
-
86
- ### Bug Reports
87
- ```bash
88
- feedbackbasket bugs list --severity high --status OPEN --project <id>
89
- feedbackbasket bugs stats --project <id>
90
- ```
91
-
92
- ### Widget
93
- ```bash
94
- # Get embed code (ready to paste into HTML)
95
- feedbackbasket widget script <project>
96
-
97
- # View settings
98
- feedbackbasket widget settings <project>
99
- feedbackbasket widget settings <project> --capture-mode waitlist
100
- feedbackbasket widget settings <project> --capture-mode feedback
101
-
102
- # Customize
103
- feedbackbasket widget settings <project> --color "#22c55e" --label "Send Feedback"
104
- feedbackbasket widget settings <project> --position bottom-left --display modal
105
- feedbackbasket widget settings <project> --email-required --intro "How can we improve?"
106
- feedbackbasket widget settings <project> --show-email --allow-attachments
107
- feedbackbasket widget settings <project> --email-read-only --hide-email-when-prefilled
108
- feedbackbasket widget settings <project> --error-tracking --allow-console-errors
109
-
110
- # Guided feedback types and follow-up questions
111
- feedbackbasket widget flow <project>
112
- feedbackbasket widget flow <project> --enable # only when the user chooses guided feedback
113
- feedbackbasket widget flow <project> --reset-default --enable # only when the user chooses guided feedback
114
- feedbackbasket widget flow <project> --config ./feedback-flow.json
115
- ```
116
-
117
- Waitlist mode keeps the same project script and binds to the host app's own annotated form:
118
-
119
- ```html
120
- <form data-feedbackbasket-waitlist>
121
- <input name="name" autocomplete="name">
122
- <input name="email" type="email" autocomplete="email" required>
123
- <button type="submit">Join the waitlist</button>
124
- </form>
125
- ```
126
-
127
- Email is required and name is optional. Use `data-feedbackbasket-state="loading|success|error"` for custom UI, or listen for the bubbling `feedbackbasket:waitlist:success` and `feedbackbasket:waitlist:error` events. Do not add a competing submit handler.
128
-
129
- ### Waitlist Signups
130
-
131
- ```bash
132
- feedbackbasket waitlist list <project>
133
- feedbackbasket waitlist list <project> --search "@example.com" --limit 50 --offset 0
134
- feedbackbasket waitlist list <project> --agent
135
- feedbackbasket waitlist export <project>
136
- ```
137
-
138
- Agent output includes signup emails, optional names, captured/referrer pages, total counts, active capture mode, and pagination. Use `waitlist export` for the same CSV export available in the dashboard.
139
-
140
- For inline trigger mode, load the widget once and call the public API from the host app's custom button:
141
-
142
- ```html
143
- <button onclick="window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })">
144
- Feedback
145
- </button>
146
- ```
147
-
148
- In React:
149
-
150
- ```tsx
151
- <button onClick={(event) => window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })}>
152
- Feedback
153
- </button>
154
- ```
155
-
156
- Passing the trigger element lets popup mode open beside the custom button. Calling `window.FeedbackWidget.openFeedbackForm()` with no arguments still uses the configured widget position.
157
-
158
- Use only the public `openFeedbackForm()` API from the snippet. Do not call internal or undocumented methods such as `open()`, `openModal()`, or direct modal element manipulation; those can exist in the widget bundle but are not stable integration points.
159
-
160
- `email-read-only` and `hide-email-when-prefilled` control behavior only when the host app passes a runtime `userEmail` value. Do not store visitor emails in widget settings.
161
-
162
- Use the basic widget experience by default: `displayMode` stays `modal`, and guided feedback stays disabled. Ask the user before switching to `popup` or enabling guided feedback. If the user does not care, keep modal + basic feedback.
163
-
164
- `widget flow --config` accepts either a `feedbackFlow` object or a JSON object with a `feedbackFlow` key. Use it only when the user wants to customize visitor choices such as Bug report, Feature request, and General feedback. Supported v1 question types are `text`, `textarea`, and `single_choice`.
165
-
166
- ### Team
167
- ```bash
168
- feedbackbasket team list
169
- feedbackbasket team role <memberId> --role admin
170
- feedbackbasket team remove <memberId> --yes
171
- ```
172
-
173
- ### Utilities
174
- ```bash
175
- feedbackbasket doctor # Health check (auth, connectivity, skill)
176
- feedbackbasket setup claude # Install this skill for Claude Code
177
- ```
178
-
179
- ## Common Agent Workflows
180
-
181
- ### Add a widget to the current app
182
- ```bash
183
- # First resolve the project for this app. Do not rely on the CLI default project.
184
- feedbackbasket projects list --agent
185
-
186
- # If no existing project matches the current app's real URL/name, create one after confirming the URL.
187
- feedbackbasket projects create "My App" --url https://myapp.com --agent
188
- feedbackbasket widget script "My App" --agent
189
- # Agent gets the embed code, adds it to the HTML
190
- feedbackbasket widget settings "My App" --color "#22c55e" --label "Feedback" --agent
191
- # Optional, when the user wants a waitlist instead of feedback capture
192
- # feedbackbasket widget settings "My App" --capture-mode waitlist --agent
193
- # Optional, only when requested: enable the guided wizard with Bug, Feature, and General templates
194
- # feedbackbasket widget flow "My App" --reset-default --enable --agent
195
- ```
196
-
197
- ### Triage new feedback
198
- ```bash
199
- feedbackbasket feedback list --status OPEN --agent
200
- # Review items, then update:
201
- feedbackbasket feedback update <id> --status UNDER_REVIEW --agent
202
- feedbackbasket feedback note <id> "Reviewing — appears related to auth flow" --agent
203
- ```
204
-
205
- ### Capture new feedback without leaving the terminal
206
- ```bash
207
- feedbackbasket feedback create "Login button is broken" \
208
- --content "Clicking Log in does nothing in Safari." \
209
- --project myapp \
210
- --type bug \
211
- --page-url https://example.com/login \
212
- --metadata source=agent \
213
- --agent
214
- ```
215
- Agent mode returns the created feedback ID, dashboard URL, and feedback object. Created feedback is analyzed by AI and follows the project's notification settings.
216
-
217
- ### File agent-found issues in FeedbackBasket
218
-
219
- When the user says "file this in FeedbackBasket", "log this bug", "create feedback for this issue", "add this to FeedbackBasket", or similar, create a concise feedback item for the issue the agent found.
220
-
221
- Before creating the item, resolve the target project:
222
-
223
- 1. If the user explicitly names a FeedbackBasket project, use that project.
224
- 2. If the current repo/app clearly matches exactly one FeedbackBasket project name or project URL from `feedbackbasket projects list --agent`, use that project.
225
- 3. If the CLI default project clearly matches the current repo/app, use it.
226
- 4. If multiple projects are plausible, ask the user which FeedbackBasket project to file it under.
227
- 5. Do not silently guess the project when it is ambiguous.
228
-
229
- Keep agent-filed feedback short and dashboard-friendly:
230
-
231
- - Title: under 80 characters, action-oriented, no stack traces.
232
- - Content: 1 to 3 short paragraphs, ideally under 600 characters, focused on the user-visible problem, expected behavior, and actual behavior.
233
- - Do not paste long logs, full reasoning chains, or broad investigation notes into the body.
234
- - Put structured context in metadata: `source=agent`, `found_by=<agent>`, `repo=<name>`, `branch=<branch>`, `route=<path>`, `file=<path>`, `severity=<low|medium|high>`, `test=<command>`.
235
-
236
- Use:
237
-
238
- ```bash
239
- feedbackbasket feedback create "<short title>" \
240
- --content "<brief user-visible issue description>" \
241
- --project <project-name-or-id> \
242
- --type bug \
243
- --metadata source=agent \
244
- --metadata found_by=codex \
245
- --agent
246
- ```
247
-
248
- After creation, report the feedback ID and dashboard URL to the user.
249
-
250
- ### Investigate high-priority bugs
251
- ```bash
252
- feedbackbasket bugs list --severity high --agent
253
- feedbackbasket feedback show <id> --agent
254
- # Response includes browser, OS, page URL, submitted feedback type, follow-up answers, attachment URLs, metadata, AI analysis, priority score
255
- ```
256
-
257
- ### Close the loop reply to the submitter
258
- ```bash
259
- # Agent reads context, asks which delivery method to use, then sends it
260
- feedbackbasket feedback show <id> --agent # read email, hasWidgetAccess, project.replyToEmail
261
- feedbackbasket feedback reply <id> "<drafted response>" --delivery widget --agent
262
- feedbackbasket feedback reply <id> "<drafted response>" --delivery email --reply-to support@example.com --agent
263
- feedbackbasket feedback reply <id> "<drafted response>" --delivery both --reply-to support@example.com --agent
264
- feedbackbasket feedback update <id> --status COMPLETE --agent
265
- feedbackbasket feedback note <id> "Replied via CLI" --agent
266
- ```
267
- **Important reply safety rules:**
268
- - Before replying, the agent MUST inspect `feedback show --agent`, then ask the human which delivery method to use: `email`, `widget`, or `both`, unless the human already specified it in the current conversation.
269
- - If `feedback show` returns `email: null`, do not use `--delivery email` or `--delivery both`. If `hasWidgetAccess: true`, use `--delivery widget`; otherwise ask the human how they want to respond.
270
- - If `hasWidgetAccess: false`, do not use `--delivery widget` or `--delivery both`.
271
- - If the delivery includes email and `project.replyToEmail: null`, the agent MUST ask the human which reply-to email to use before sending. Do not use the account owner's email, token owner's email, or any remembered address without explicit confirmation in the current conversation.
272
- - After the human confirms a reply-to address, pass it explicitly with `--reply-to <email>`, or set a project default first with `feedbackbasket projects update <project> --reply-to <email>`.
273
-
274
- Never silently guess a reply-to address. It becomes the "From" address the customer sees.
275
-
276
- ### Export for analysis
277
- ```bash
278
- feedbackbasket feedback export myapp --format json --agent
279
- # Agent can parse the JSON and generate reports
280
- ```
281
-
282
- ### Search for patterns
283
- ```bash
284
- feedbackbasket feedback search "login" --agent
285
- feedbackbasket feedback search "crash" --category BUG --agent
286
- ```
287
-
288
- ## Filtering Options
289
-
290
- | Type | Values |
291
- |------|--------|
292
- | Categories | `BUG`, `FEATURE_REQUEST`, `IMPROVEMENT`, `QUESTION` |
293
- | Statuses | `OPEN`, `UNDER_REVIEW`, `PLANNED`, `IN_PROGRESS`, `COMPLETE`, `CLOSED` |
294
- | Sentiments | `POSITIVE`, `NEGATIVE`, `NEUTRAL` |
295
- | Bug Severity | `high`, `medium`, `low` |
296
-
297
- ## JSON Envelope
298
-
299
- When using `--json`, responses include breadcrumbs:
300
- ```json
301
- {
302
- "ok": true,
303
- "data": [...],
304
- "summary": "5 projects",
305
- "breadcrumbs": [
306
- { "action": "View feedback", "cmd": "feedbackbasket feedback list --project myapp" }
307
- ]
308
- }
309
- ```
310
-
311
- Errors include hints:
312
- ```json
313
- {
314
- "ok": false,
315
- "error": "Not authenticated",
316
- "code": "auth_error",
317
- "hint": "Run: feedbackbasket auth login"
318
- }
319
- ```
320
-
321
- ## Invariants
322
-
323
- - Always authenticate before data commands
324
- - `--agent` flag suppresses all interactive prompts and confirmations
325
- - Default project (set during login) is used when `--project` is not specified
326
- - Project names resolve case-insensitively with fuzzy matching
327
- - Write operations use full scope (granted by default during login)
328
- - Feedback IDs are stable CUIDs safe to reference across commands
329
- - All timestamps are ISO 8601
330
- - `--yes` flag skips delete confirmations in interactive mode
1
+ ---
2
+ name: feedbackbasket
3
+ description: Manage FeedbackBasket projects, feedback, bugs, website widgets, mobile app feedback, waitlist capture, and teams from the command line. Use whenever an agent needs to configure FeedbackBasket in a web or mobile app, install its Swift SDK or hosted mobile form, collect feedback or waitlist signups, query feedback, or manage a FeedbackBasket project.
4
+ ---
5
+
6
+ # FeedbackBasket CLI
7
+
8
+ Full command-line interface for managing feedback, waitlist signups, bug reports, projects, widgets, and teams in FeedbackBasket. Works with any AI agent that can run shell commands.
9
+
10
+ ## Authentication
11
+
12
+ ```bash
13
+ feedbackbasket login # Opens browser — one click, full access
14
+ feedbackbasket login --manual # No localhost browser callback (remote servers)
15
+ feedbackbasket login --token <TOKEN> # Manual token (CI/headless)
16
+ feedbackbasket auth status # Check auth state
17
+ feedbackbasket doctor # Full diagnostics
18
+ ```
19
+
20
+ ## Output Modes
21
+
22
+ | Flag | Output | When to Use |
23
+ |------|--------|-------------|
24
+ | (none) | Styled (TTY) or JSON (piped) | Auto-detect |
25
+ | `--json` | JSON envelope with breadcrumbs | Parse full response |
26
+ | `--agent` | Raw JSON data only | Agent automation |
27
+ | `--quiet` | Raw JSON data only | Scripting |
28
+ | `--md` | Markdown | Documentation |
29
+
30
+ **Agent rule**: Always use `--agent` for programmatic access. Parse the JSON output directly.
31
+
32
+ ## Quick Reference
33
+
34
+ ### Projects
35
+ ```bash
36
+ feedbackbasket projects list
37
+ feedbackbasket projects show <name-or-id>
38
+ feedbackbasket projects create "My App" --url https://myapp.com --description "..."
39
+ feedbackbasket projects update <name-or-id> --name "New Name" --url <url> --description "..."
40
+ feedbackbasket projects update <name-or-id> --reply-to vlad@example.com # default reply-to for feedback replies
41
+ feedbackbasket projects delete <name-or-id> --yes
42
+ ```
43
+
44
+ All project commands accept **name or ID**. Names are matched case-insensitively with fuzzy suggestions on typos.
45
+
46
+ **Project selection rule for widget installs:** when the user asks to add a FeedbackBasket widget, bubble, popup, modal, or feedback button to the current app, first resolve the FeedbackBasket project for this app. Do not use the CLI default project just because one is configured.
47
+
48
+ 1. Identify the current app's real website URL or intended public URL from the user, app config, docs, or existing FeedbackBasket embed code.
49
+ 2. Run `feedbackbasket projects list --agent` and look for an existing project whose `url` matches that site or whose name clearly matches the current app.
50
+ 3. If exactly one project matches, use that project ID/name for `widget settings`, `widget script`, and feedback commands.
51
+ 4. If multiple projects could match, ask the user which one to use.
52
+ 5. If no project matches, ask whether to create a new project for this app, then create it with the confirmed real URL. Do not create a project from a localhost URL unless the user explicitly wants a local-only test project.
53
+
54
+ **Project URL rule for agents:** confirm the real website URL before creating or updating a project. Never use `localhost`, `127.0.0.1`, `0.0.0.0`, `::1`, or a local dev server URL unless the user explicitly says the project is only for local testing. If the repo only exposes a local URL, ask for the production, staging, preview, or intended public URL. Do not guess a public domain from package names, git remotes, or environment variables. For an explicitly local-only test project, pass `--allow-local-url`.
55
+
56
+ **Capture-mode decision:** if the user asks for feedback, a feedback bubble, bug reports, or feature requests, use `--capture-mode feedback`. If they ask for a waitlist, launch list, early access, or email capture, use `--capture-mode waitlist`. If they ask to set up FeedbackBasket without choosing, explain both options and ask which they want. Do not switch an existing project without confirmation because only one capture mode is active at a time.
57
+
58
+ **Mobile project selection rule:** resolve the FeedbackBasket project for the current app before running mobile commands. Prefer a clearly matching existing project name or product URL. If multiple projects are plausible, ask the user. If none exists, confirm a real product, support, marketing, or App Store URL before creating one; do not invent a URL or use a local development address.
59
+
60
+ ### Mobile App Feedback
61
+
62
+ ```bash
63
+ feedbackbasket mobile status <project> --agent
64
+ feedbackbasket mobile setup <project> --bundle-id com.example.app --agent
65
+ feedbackbasket mobile setup <project> --bundle-id com.example.app --include-publishable-key --agent
66
+ feedbackbasket mobile bundle-ids <project> --add com.example.app.beta --agent
67
+ feedbackbasket mobile bundle-ids <project> --remove com.example.app.beta --agent
68
+ feedbackbasket mobile conversations <project> --enable --agent
69
+ feedbackbasket mobile conversations <project> --disable --agent
70
+ feedbackbasket mobile verify <project> --bundle-id com.example.app --wait 120 --agent
71
+ feedbackbasket mobile disable <project> --yes --agent
72
+ feedbackbasket mobile rotate-key <project> --yes --include-publishable-key --agent
73
+ ```
74
+
75
+ The `fb_mobile_` project key is a publishable, write-only identifier designed to ship in the app. It cannot read feedback or administer the project. It is still masked by default to reduce accidental disclosure in logs and transcripts. Use `--include-publishable-key` only while performing a mobile setup the user authorized, and never repeat the full value in the final response.
76
+
77
+ Never put an `fb_cli_` CLI token or `fb_key_` MCP/API key in application source, build settings, prompts, logs, or generated configuration. Those are private credentials and are not interchangeable with the publishable mobile key.
78
+
79
+ For SwiftUI apps targeting iOS 16 or later, use the Swift package returned by `mobile setup` and its native feedback sheet. For UIKit, use the package API or host the SwiftUI sheet. For React Native, Flutter, or unsupported stacks, use the returned hosted form URL in the app's existing in-app browser when available.
80
+
81
+ Configure the Swift package once at app startup with the returned publishable key:
82
+
83
+ ```swift
84
+ import FeedbackBasket
85
+
86
+ FeedbackBasket.configure(
87
+ projectKey: "fb_mobile_returned_by_mobile_setup"
88
+ )
89
+ ```
90
+
91
+ Present its standard SwiftUI sheet from the selected Settings, Help, or Support view:
92
+
93
+ ```swift
94
+ @State private var showingFeedback = false
95
+
96
+ Button("Send feedback") {
97
+ showingFeedback = true
98
+ }
99
+ .feedbackBasketSheet(
100
+ isPresented: $showingFeedback,
101
+ context: ["screen": "Settings"]
102
+ )
103
+ ```
104
+
105
+ Use FeedbackBasket Swift SDK 0.3.0 or later. The SDK stores each submission's conversation credential in the app Keychain, shows an unread badge when the team replies, and keeps team and user messages in one thread. When mobile conversations are enabled, users answer inside that thread; never create a new feedback submission for a follow-up. Reply state refreshes when the SDK is configured, when the app enters the foreground, and when the sheet opens. This is not an APNs push notification while the app is closed. Do not build a separate inbox, polling client, or token store in the host app. Hosted-form integrations remain email-only.
106
+
107
+ Add an accessible Send feedback action to an appropriate existing Settings, Help, or Support screen. Attach only useful non-sensitive context. Do not send passwords, authentication tokens, payment information, private form contents, crash reports, analytics, session recordings, or automatic logs.
108
+
109
+ Treat a supplied project key as production unless the user explicitly confirms a staging key and base URL. Build and launch the app so the SDK can send its heartbeat, then use `mobile verify`; do not submit test feedback to production. A prior matching heartbeat is a valid connection result because the SDK throttles successful heartbeat attempts.
110
+
111
+ `mobile setup` is idempotent and adds bundle IDs without replacing existing entries. Do not rotate a key or disable mobile feedback unless the user explicitly requested that disruptive action. Rotation stops every released app using the previous key.
112
+
113
+ ### Feedback
114
+ ```bash
115
+ # Read
116
+ feedbackbasket feedback list --project <id> --category BUG --status OPEN --sentiment NEGATIVE
117
+ feedbackbasket feedback list --search "login" --limit 50 --offset 0 --notes
118
+ feedbackbasket feedback show <id>
119
+ feedbackbasket feedback search "crash on mobile" --project <id> --limit 10
120
+
121
+ # Write
122
+ feedbackbasket feedback create "Login button is broken" --content "Clicking Log in does nothing in Safari." --project <id> --type bug
123
+ feedbackbasket feedback create "Feature idea" --content "Let users export saved views." --project <id> --type feature --metadata source=agent
124
+ feedbackbasket feedback update <id> --status PLANNED --category BUG --sentiment NEGATIVE
125
+ feedbackbasket feedback note <id> "Investigating — appears related to auth flow"
126
+ feedbackbasket feedback delete <id> --yes
127
+ feedbackbasket feedback bulk-update --status CLOSED --ids id1,id2,id3
128
+
129
+ # Reply to submitter by email, widget/in-app thread, or both
130
+ feedbackbasket feedback reply <id> "Thanks for reporting — we pushed a fix!" --delivery email --reply-to support@example.com
131
+ feedbackbasket feedback reply <id> "<content>" --delivery widget
132
+ feedbackbasket feedback reply <id> "<content>" --delivery in-app
133
+ feedbackbasket feedback reply <id> "<content>" --delivery both --reply-to support@example.com
134
+ feedbackbasket feedback replies <id> # show the complete conversation
135
+
136
+ # Export
137
+ feedbackbasket feedback export <project> --format csv
138
+ feedbackbasket feedback export <project> --format md
139
+ feedbackbasket feedback export <project> --format json
140
+ ```
141
+
142
+ ### Bug Reports
143
+ ```bash
144
+ feedbackbasket bugs list --severity high --status OPEN --project <id>
145
+ feedbackbasket bugs stats --project <id>
146
+ ```
147
+
148
+ ### Widget
149
+ ```bash
150
+ # Get embed code (ready to paste into HTML)
151
+ feedbackbasket widget script <project>
152
+
153
+ # View settings
154
+ feedbackbasket widget settings <project>
155
+ feedbackbasket widget settings <project> --capture-mode waitlist
156
+ feedbackbasket widget settings <project> --capture-mode feedback
157
+
158
+ # Customize
159
+ feedbackbasket widget settings <project> --color "#22c55e" --label "Send Feedback"
160
+ feedbackbasket widget settings <project> --position bottom-left --display modal
161
+ feedbackbasket widget settings <project> --email-required --intro "How can we improve?"
162
+ feedbackbasket widget settings <project> --show-email --allow-attachments
163
+ feedbackbasket widget settings <project> --allow-visitor-replies
164
+ feedbackbasket widget settings <project> --no-allow-visitor-replies
165
+ feedbackbasket widget settings <project> --email-read-only --hide-email-when-prefilled
166
+ feedbackbasket widget settings <project> --error-tracking --allow-console-errors
167
+
168
+ # Guided feedback types and follow-up questions
169
+ feedbackbasket widget flow <project>
170
+ feedbackbasket widget flow <project> --enable # only when the user chooses guided feedback
171
+ feedbackbasket widget flow <project> --reset-default --enable # only when the user chooses guided feedback
172
+ feedbackbasket widget flow <project> --config ./feedback-flow.json
173
+ ```
174
+
175
+ Waitlist mode keeps the same project script and binds to the host app's own annotated form:
176
+
177
+ ```html
178
+ <form data-feedbackbasket-waitlist>
179
+ <input name="name" autocomplete="name">
180
+ <input name="email" type="email" autocomplete="email" required>
181
+ <button type="submit">Join the waitlist</button>
182
+ </form>
183
+ ```
184
+
185
+ Email is required and name is optional. Use `data-feedbackbasket-state="loading|success|error"` for custom UI, or listen for the bubbling `feedbackbasket:waitlist:success` and `feedbackbasket:waitlist:error` events. Do not add a competing submit handler.
186
+
187
+ ### Waitlist Signups
188
+
189
+ ```bash
190
+ feedbackbasket waitlist list <project>
191
+ feedbackbasket waitlist list <project> --search "@example.com" --limit 50 --offset 0
192
+ feedbackbasket waitlist list <project> --agent
193
+ feedbackbasket waitlist export <project>
194
+ ```
195
+
196
+ Agent output includes signup emails, optional names, captured/referrer pages, total counts, active capture mode, and pagination. Use `waitlist export` for the same CSV export available in the dashboard.
197
+
198
+ For inline trigger mode, load the widget once and call the public API from the host app's custom button:
199
+
200
+ ```html
201
+ <button onclick="window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })">
202
+ Feedback
203
+ </button>
204
+ ```
205
+
206
+ In React:
207
+
208
+ ```tsx
209
+ <button onClick={(event) => window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })}>
210
+ Feedback
211
+ </button>
212
+ ```
213
+
214
+ Passing the trigger element lets popup mode open beside the custom button. Calling `window.FeedbackWidget.openFeedbackForm()` with no arguments still uses the configured widget position.
215
+
216
+ Use only the public `openFeedbackForm()` API from the snippet. Do not call internal or undocumented methods such as `open()`, `openModal()`, or direct modal element manipulation; those can exist in the widget bundle but are not stable integration points.
217
+
218
+ `email-read-only` and `hide-email-when-prefilled` control behavior only when the host app passes a runtime `userEmail` value. Do not store visitor emails in widget settings.
219
+
220
+ Use the basic widget experience by default: `displayMode` stays `modal`, and guided feedback stays disabled. Ask the user before switching to `popup` or enabling guided feedback. If the user does not care, keep modal + basic feedback.
221
+
222
+ `widget flow --config` accepts either a `feedbackFlow` object or a JSON object with a `feedbackFlow` key. Use it only when the user wants to customize visitor choices such as Bug report, Feature request, and General feedback. Supported v1 question types are `text`, `textarea`, and `single_choice`.
223
+
224
+ ### Team
225
+ ```bash
226
+ feedbackbasket team list
227
+ feedbackbasket team role <memberId> --role admin
228
+ feedbackbasket team remove <memberId> --yes
229
+ ```
230
+
231
+ ### Utilities
232
+ ```bash
233
+ feedbackbasket doctor # Health check (auth, connectivity, skill)
234
+ feedbackbasket setup claude # Install this skill for Claude Code
235
+ ```
236
+
237
+ ## Common Agent Workflows
238
+
239
+ ### Add a widget to the current app
240
+ ```bash
241
+ # First resolve the project for this app. Do not rely on the CLI default project.
242
+ feedbackbasket projects list --agent
243
+
244
+ # If no existing project matches the current app's real URL/name, create one after confirming the URL.
245
+ feedbackbasket projects create "My App" --url https://myapp.com --agent
246
+ feedbackbasket widget script "My App" --agent
247
+ # Agent gets the embed code, adds it to the HTML
248
+ feedbackbasket widget settings "My App" --color "#22c55e" --label "Feedback" --agent
249
+ # Optional, when the user wants a waitlist instead of feedback capture
250
+ # feedbackbasket widget settings "My App" --capture-mode waitlist --agent
251
+ # Optional, only when requested: enable the guided wizard with Bug, Feature, and General templates
252
+ # feedbackbasket widget flow "My App" --reset-default --enable --agent
253
+ ```
254
+
255
+ ### Triage new feedback
256
+ ```bash
257
+ feedbackbasket feedback list --status OPEN --agent
258
+ # Review items, then update:
259
+ feedbackbasket feedback update <id> --status UNDER_REVIEW --agent
260
+ feedbackbasket feedback note <id> "Reviewing appears related to auth flow" --agent
261
+ ```
262
+
263
+ ### Capture new feedback without leaving the terminal
264
+ ```bash
265
+ feedbackbasket feedback create "Login button is broken" \
266
+ --content "Clicking Log in does nothing in Safari." \
267
+ --project myapp \
268
+ --type bug \
269
+ --page-url https://example.com/login \
270
+ --metadata source=agent \
271
+ --agent
272
+ ```
273
+ Agent mode returns the created feedback ID, dashboard URL, and feedback object. Created feedback is analyzed by AI and follows the project's notification settings.
274
+
275
+ ### File agent-found issues in FeedbackBasket
276
+
277
+ When the user says "file this in FeedbackBasket", "log this bug", "create feedback for this issue", "add this to FeedbackBasket", or similar, create a concise feedback item for the issue the agent found.
278
+
279
+ Before creating the item, resolve the target project:
280
+
281
+ 1. If the user explicitly names a FeedbackBasket project, use that project.
282
+ 2. If the current repo/app clearly matches exactly one FeedbackBasket project name or project URL from `feedbackbasket projects list --agent`, use that project.
283
+ 3. If the CLI default project clearly matches the current repo/app, use it.
284
+ 4. If multiple projects are plausible, ask the user which FeedbackBasket project to file it under.
285
+ 5. Do not silently guess the project when it is ambiguous.
286
+
287
+ Keep agent-filed feedback short and dashboard-friendly:
288
+
289
+ - Title: under 80 characters, action-oriented, no stack traces.
290
+ - Content: 1 to 3 short paragraphs, ideally under 600 characters, focused on the user-visible problem, expected behavior, and actual behavior.
291
+ - Do not paste long logs, full reasoning chains, or broad investigation notes into the body.
292
+ - Put structured context in metadata: `source=agent`, `found_by=<agent>`, `repo=<name>`, `branch=<branch>`, `route=<path>`, `file=<path>`, `severity=<low|medium|high>`, `test=<command>`.
293
+
294
+ Use:
295
+
296
+ ```bash
297
+ feedbackbasket feedback create "<short title>" \
298
+ --content "<brief user-visible issue description>" \
299
+ --project <project-name-or-id> \
300
+ --type bug \
301
+ --metadata source=agent \
302
+ --metadata found_by=codex \
303
+ --agent
304
+ ```
305
+
306
+ After creation, report the feedback ID and dashboard URL to the user.
307
+
308
+ ### Investigate high-priority bugs
309
+ ```bash
310
+ feedbackbasket bugs list --severity high --agent
311
+ feedbackbasket feedback show <id> --agent
312
+ # Response includes browser, OS, page URL, submitted feedback type, follow-up answers, attachment URLs, metadata, AI analysis, priority score
313
+ ```
314
+
315
+ ### Close the loop — reply to the submitter
316
+ ```bash
317
+ # Agent reads context, asks which delivery method to use, then sends it
318
+ feedbackbasket feedback show <id> --agent # read email, replyChannel, project.replyToEmail
319
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery widget --agent
320
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery in-app --agent
321
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery email --reply-to support@example.com --agent
322
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery both --reply-to support@example.com --agent
323
+ feedbackbasket feedback update <id> --status COMPLETE --agent
324
+ feedbackbasket feedback note <id> "Replied via CLI" --agent
325
+ ```
326
+ **Important reply safety rules:**
327
+ - Before replying, the agent MUST inspect `feedback show --agent`, including `replyChannel` and `awaitingOwnerReply`, then ask the human which available delivery method to use unless the human already specified it in the current conversation.
328
+ - If `replyChannel: "in_app"`, use `--delivery in-app`. If `replyChannel: "widget"`, use `--delivery widget`. Use `--delivery both` only when an email address and a reply channel are both available.
329
+ - If `feedback show` returns `email: null`, do not use `--delivery email` or `--delivery both`. If `replyChannel: null`, do not use thread delivery.
330
+ - If the delivery includes email and `project.replyToEmail: null`, the agent MUST ask the human which reply-to email to use before sending. Do not use the account owner's email, token owner's email, or any remembered address without explicit confirmation in the current conversation.
331
+ - After the human confirms a reply-to address, pass it explicitly with `--reply-to <email>`, or set a project default first with `feedbackbasket projects update <project> --reply-to <email>`.
332
+ - Treat `feedback replies <id>` as one chronological conversation containing both team and visitor messages. A visitor follow-up belongs to the original feedback item; never create a replacement feedback item for it.
333
+
334
+ Never silently guess a reply-to address. It becomes the "From" address the customer sees.
335
+
336
+ ### Export for analysis
337
+ ```bash
338
+ feedbackbasket feedback export myapp --format json --agent
339
+ # Agent can parse the JSON and generate reports
340
+ ```
341
+
342
+ ### Search for patterns
343
+ ```bash
344
+ feedbackbasket feedback search "login" --agent
345
+ feedbackbasket feedback search "crash" --category BUG --agent
346
+ ```
347
+
348
+ ## Filtering Options
349
+
350
+ | Type | Values |
351
+ |------|--------|
352
+ | Categories | `BUG`, `FEATURE_REQUEST`, `IMPROVEMENT`, `QUESTION` |
353
+ | Statuses | `OPEN`, `UNDER_REVIEW`, `PLANNED`, `IN_PROGRESS`, `COMPLETE`, `CLOSED` |
354
+ | Sentiments | `POSITIVE`, `NEGATIVE`, `NEUTRAL` |
355
+ | Bug Severity | `high`, `medium`, `low` |
356
+
357
+ ## JSON Envelope
358
+
359
+ When using `--json`, responses include breadcrumbs:
360
+ ```json
361
+ {
362
+ "ok": true,
363
+ "data": [...],
364
+ "summary": "5 projects",
365
+ "breadcrumbs": [
366
+ { "action": "View feedback", "cmd": "feedbackbasket feedback list --project myapp" }
367
+ ]
368
+ }
369
+ ```
370
+
371
+ Errors include hints:
372
+ ```json
373
+ {
374
+ "ok": false,
375
+ "error": "Not authenticated",
376
+ "code": "auth_error",
377
+ "hint": "Run: feedbackbasket auth login"
378
+ }
379
+ ```
380
+
381
+ ## Invariants
382
+
383
+ - Always authenticate before data commands
384
+ - `--agent` flag suppresses all interactive prompts and confirmations
385
+ - Default project (set during login) is used when `--project` is not specified
386
+ - Project names resolve case-insensitively with fuzzy matching
387
+ - Write operations use full scope (granted by default during login)
388
+ - Feedback IDs are stable CUIDs — safe to reference across commands
389
+ - All timestamps are ISO 8601
390
+ - `--yes` flag skips delete confirmations in interactive mode