feedbackbasket-cli 0.11.0 → 3.0.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,385 +1,406 @@
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
-
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
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
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
-
10
+ The unified agent surface version is `3.0.0`. It has 31 product operations. The CLI, stdio MCP package, and live Streamable HTTP MCP server implement the same contract.
11
+
12
+ ## Authentication
13
+
14
+ ```bash
15
+ feedbackbasket login # Opens browser one click, full access
16
+ feedbackbasket login --manual # No localhost browser callback (remote servers)
17
+ feedbackbasket login --token <TOKEN> # Manual token (CI/headless)
18
+ feedbackbasket auth status # Check auth state
19
+ feedbackbasket doctor # Full diagnostics
20
+ ```
21
+
22
+ ## Output Modes
23
+
24
+ | Flag | Output | When to Use |
25
+ |------|--------|-------------|
26
+ | (none) | Styled (TTY) or JSON (piped) | Auto-detect |
27
+ | `--json` | JSON envelope with breadcrumbs | Parse full response |
28
+ | `--agent` | Raw JSON data only | Agent automation |
29
+ | `--quiet` | Raw JSON data only | Scripting |
30
+ | `--md` | Markdown | Documentation |
31
+
30
32
  **Agent rule**: Always use `--agent` for programmatic access. Parse the JSON output directly.
31
33
 
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 verify <project> --bundle-id com.example.app --wait 120 --agent
69
- feedbackbasket mobile disable <project> --yes --agent
70
- feedbackbasket mobile rotate-key <project> --yes --include-publishable-key --agent
71
- ```
72
-
73
- 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.
74
-
75
- 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.
76
-
77
- 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.
78
-
79
- Configure the Swift package once at app startup with the returned publishable key:
80
-
81
- ```swift
82
- import FeedbackBasket
83
-
84
- FeedbackBasket.configure(
85
- projectKey: "fb_mobile_returned_by_mobile_setup"
86
- )
87
- ```
88
-
89
- Present its standard SwiftUI sheet from the selected Settings, Help, or Support view:
90
-
91
- ```swift
92
- @State private var showingFeedback = false
93
-
94
- Button("Send feedback") {
95
- showingFeedback = true
96
- }
97
- .feedbackBasketSheet(
98
- isPresented: $showingFeedback,
99
- context: ["screen": "Settings"]
100
- )
101
- ```
102
-
103
- The native SDK stores each submission's reply-thread credential in the app Keychain and shows team replies in the same feedback sheet when it is opened again. Do not build a separate inbox, polling client, or token store in the host app. Hosted-form integrations remain email-only.
104
-
105
- 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.
106
-
107
- 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.
108
-
109
- `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.
110
-
111
- ### Feedback
112
- ```bash
113
- # Read
114
- feedbackbasket feedback list --project <id> --category BUG --status OPEN --sentiment NEGATIVE
115
- feedbackbasket feedback list --search "login" --limit 50 --offset 0 --notes
116
- feedbackbasket feedback show <id>
117
- feedbackbasket feedback search "crash on mobile" --project <id> --limit 10
118
-
119
- # Write
120
- feedbackbasket feedback create "Login button is broken" --content "Clicking Log in does nothing in Safari." --project <id> --type bug
121
- feedbackbasket feedback create "Feature idea" --content "Let users export saved views." --project <id> --type feature --metadata source=agent
34
+ ## MCP Workflow Selection
35
+
36
+ Use the CLI when the agent has shell access and an existing CLI login. Use MCP when the host supports MCP tools. For MCP, use either the `feedbackbasket-mcp-server@3.0.0` stdio package or the direct Streamable HTTP endpoint at `https://feedbackbasket.com/.well-known/mcp`.
37
+
38
+ CLI credentials and MCP keys are private and are not interchangeable. Never put a credential in source, command arguments, logs, prompts, snapshots, generated files, or final responses. Use the host credential store or an environment variable.
39
+
40
+ MCP read keys can use read operations only. Full keys can use writes that their scopes permit. A project-restricted key can access only its allowed projects. Project creation and team operations need an unrestricted full key. If a write is denied, do not try a different security path. Ask the user for the required access.
41
+
42
+ High-impact operations need explicit approval. MCP calls must include `confirm: true`. CLI agent or machine commands must include `--yes`. These rules apply to project deletion, feedback deletion, bulk feedback updates, note deletion, replies, mobile key rotation, team role changes, and team removal.
43
+
44
+ ## Quick Reference
45
+
46
+ ### Projects
47
+ ```bash
48
+ feedbackbasket projects list
49
+ feedbackbasket projects show <name-or-id>
50
+ feedbackbasket projects create "My App" --url https://myapp.com --description "..."
51
+ feedbackbasket projects update <name-or-id> --name "New Name" --url <url> --description "..."
52
+ feedbackbasket projects update <name-or-id> --reply-to vlad@example.com # default reply-to for feedback replies
53
+ feedbackbasket projects delete <name-or-id> --yes
54
+ ```
55
+
56
+ All project commands accept **name or ID**. Names are matched case-insensitively with fuzzy suggestions on typos.
57
+
58
+ **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.
59
+
60
+ 1. Identify the current app's real website URL or intended public URL from the user, app config, docs, or existing FeedbackBasket embed code.
61
+ 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.
62
+ 3. If exactly one project matches, use that project ID/name for `widget settings`, `widget script`, and feedback commands.
63
+ 4. If multiple projects could match, ask the user which one to use.
64
+ 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.
65
+
66
+ **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`.
67
+
68
+ **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.
69
+
70
+ **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.
71
+
72
+ ### Mobile App Feedback
73
+
74
+ ```bash
75
+ feedbackbasket mobile status <project> --agent
76
+ feedbackbasket mobile setup <project> --bundle-id com.example.app --agent
77
+ feedbackbasket mobile setup <project> --bundle-id com.example.app --include-publishable-key --agent
78
+ feedbackbasket mobile bundle-ids <project> --add com.example.app.beta --agent
79
+ feedbackbasket mobile bundle-ids <project> --remove com.example.app.beta --agent
80
+ feedbackbasket mobile conversations <project> --enable --agent
81
+ feedbackbasket mobile conversations <project> --disable --agent
82
+ feedbackbasket mobile verify <project> --bundle-id com.example.app --wait 120 --agent
83
+ feedbackbasket mobile disable <project> --yes --agent
84
+ feedbackbasket mobile rotate-key <project> --yes --include-publishable-key --agent
85
+ ```
86
+
87
+ 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.
88
+
89
+ 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.
90
+
91
+ 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.
92
+
93
+ Configure the Swift package once at app startup with the returned publishable key:
94
+
95
+ ```swift
96
+ import FeedbackBasket
97
+
98
+ FeedbackBasket.configure(
99
+ projectKey: "fb_mobile_returned_by_mobile_setup"
100
+ )
101
+ ```
102
+
103
+ Present its standard SwiftUI sheet from the selected Settings, Help, or Support view:
104
+
105
+ ```swift
106
+ @State private var showingFeedback = false
107
+
108
+ Button("Send feedback") {
109
+ showingFeedback = true
110
+ }
111
+ .feedbackBasketSheet(
112
+ isPresented: $showingFeedback,
113
+ context: ["screen": "Settings"]
114
+ )
115
+ ```
116
+
117
+ 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.
118
+
119
+ 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.
120
+
121
+ 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.
122
+
123
+ `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.
124
+
125
+ ### Feedback
126
+ ```bash
127
+ # Read
128
+ feedbackbasket feedback list --project <id> --category BUG --status OPEN --sentiment NEGATIVE
129
+ feedbackbasket feedback list --search "login" --limit 50 --offset 0 --notes
130
+ feedbackbasket feedback show <id>
131
+ feedbackbasket feedback search "crash on mobile" --project <id> --limit 10
132
+
133
+ # Write
134
+ feedbackbasket feedback create "Login button is broken" --content "Clicking Log in does nothing in Safari." --project <id> --type bug
135
+ feedbackbasket feedback create "Feature idea" --content "Let users export saved views." --project <id> --type feature --metadata source=agent
122
136
  feedbackbasket feedback update <id> --status PLANNED --category BUG --sentiment NEGATIVE
123
137
  feedbackbasket feedback note <id> "Investigating — appears related to auth flow"
138
+ feedbackbasket feedback note update <id> <note-id> --content "Updated internal note"
139
+ feedbackbasket feedback note delete <id> <note-id> --yes
124
140
  feedbackbasket feedback delete <id> --yes
125
- feedbackbasket feedback bulk-update --status CLOSED --ids id1,id2,id3
126
-
127
- # Reply to submitter by email, widget/in-app thread, or both
128
- feedbackbasket feedback reply <id> "Thanks for reporting — we pushed a fix!" --delivery email --reply-to support@example.com
129
- feedbackbasket feedback reply <id> "<content>" --delivery widget
130
- feedbackbasket feedback reply <id> "<content>" --delivery in-app
131
- feedbackbasket feedback reply <id> "<content>" --delivery both --reply-to support@example.com
132
- feedbackbasket feedback replies <id> # list past replies
133
-
134
- # Export
135
- feedbackbasket feedback export <project> --format csv
136
- feedbackbasket feedback export <project> --format md
137
- feedbackbasket feedback export <project> --format json
138
- ```
139
-
140
- ### Bug Reports
141
- ```bash
142
- feedbackbasket bugs list --severity high --status OPEN --project <id>
143
- feedbackbasket bugs stats --project <id>
144
- ```
145
-
146
- ### Widget
147
- ```bash
148
- # Get embed code (ready to paste into HTML)
149
- feedbackbasket widget script <project>
150
-
151
- # View settings
152
- feedbackbasket widget settings <project>
153
- feedbackbasket widget settings <project> --capture-mode waitlist
154
- feedbackbasket widget settings <project> --capture-mode feedback
155
-
156
- # Customize
157
- feedbackbasket widget settings <project> --color "#22c55e" --label "Send Feedback"
158
- feedbackbasket widget settings <project> --position bottom-left --display modal
159
- feedbackbasket widget settings <project> --email-required --intro "How can we improve?"
160
- feedbackbasket widget settings <project> --show-email --allow-attachments
161
- feedbackbasket widget settings <project> --email-read-only --hide-email-when-prefilled
162
- feedbackbasket widget settings <project> --error-tracking --allow-console-errors
163
-
164
- # Guided feedback types and follow-up questions
165
- feedbackbasket widget flow <project>
166
- feedbackbasket widget flow <project> --enable # only when the user chooses guided feedback
167
- feedbackbasket widget flow <project> --reset-default --enable # only when the user chooses guided feedback
168
- feedbackbasket widget flow <project> --config ./feedback-flow.json
169
- ```
170
-
171
- Waitlist mode keeps the same project script and binds to the host app's own annotated form:
172
-
173
- ```html
174
- <form data-feedbackbasket-waitlist>
175
- <input name="name" autocomplete="name">
176
- <input name="email" type="email" autocomplete="email" required>
177
- <button type="submit">Join the waitlist</button>
178
- </form>
179
- ```
180
-
181
- 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.
182
-
183
- ### Waitlist Signups
184
-
185
- ```bash
186
- feedbackbasket waitlist list <project>
187
- feedbackbasket waitlist list <project> --search "@example.com" --limit 50 --offset 0
188
- feedbackbasket waitlist list <project> --agent
189
- feedbackbasket waitlist export <project>
190
- ```
191
-
192
- 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.
193
-
194
- For inline trigger mode, load the widget once and call the public API from the host app's custom button:
195
-
196
- ```html
197
- <button onclick="window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })">
198
- Feedback
199
- </button>
200
- ```
201
-
202
- In React:
203
-
204
- ```tsx
205
- <button onClick={(event) => window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })}>
206
- Feedback
207
- </button>
208
- ```
209
-
210
- 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.
211
-
212
- 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.
213
-
214
- `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.
215
-
216
- 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.
217
-
218
- `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`.
219
-
220
- ### Team
221
- ```bash
222
- feedbackbasket team list
223
- feedbackbasket team role <memberId> --role admin
224
- feedbackbasket team remove <memberId> --yes
225
- ```
226
-
227
- ### Utilities
228
- ```bash
229
- feedbackbasket doctor # Health check (auth, connectivity, skill)
230
- feedbackbasket setup claude # Install this skill for Claude Code
231
- ```
232
-
233
- ## Common Agent Workflows
234
-
235
- ### Add a widget to the current app
236
- ```bash
237
- # First resolve the project for this app. Do not rely on the CLI default project.
238
- feedbackbasket projects list --agent
239
-
240
- # If no existing project matches the current app's real URL/name, create one after confirming the URL.
241
- feedbackbasket projects create "My App" --url https://myapp.com --agent
242
- feedbackbasket widget script "My App" --agent
243
- # Agent gets the embed code, adds it to the HTML
244
- feedbackbasket widget settings "My App" --color "#22c55e" --label "Feedback" --agent
245
- # Optional, when the user wants a waitlist instead of feedback capture
246
- # feedbackbasket widget settings "My App" --capture-mode waitlist --agent
247
- # Optional, only when requested: enable the guided wizard with Bug, Feature, and General templates
248
- # feedbackbasket widget flow "My App" --reset-default --enable --agent
249
- ```
250
-
251
- ### Triage new feedback
252
- ```bash
253
- feedbackbasket feedback list --status OPEN --agent
254
- # Review items, then update:
255
- feedbackbasket feedback update <id> --status UNDER_REVIEW --agent
256
- feedbackbasket feedback note <id> "Reviewing — appears related to auth flow" --agent
257
- ```
258
-
259
- ### Capture new feedback without leaving the terminal
260
- ```bash
261
- feedbackbasket feedback create "Login button is broken" \
262
- --content "Clicking Log in does nothing in Safari." \
263
- --project myapp \
264
- --type bug \
265
- --page-url https://example.com/login \
266
- --metadata source=agent \
267
- --agent
268
- ```
269
- 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.
270
-
271
- ### File agent-found issues in FeedbackBasket
272
-
273
- 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.
274
-
275
- Before creating the item, resolve the target project:
276
-
277
- 1. If the user explicitly names a FeedbackBasket project, use that project.
278
- 2. If the current repo/app clearly matches exactly one FeedbackBasket project name or project URL from `feedbackbasket projects list --agent`, use that project.
279
- 3. If the CLI default project clearly matches the current repo/app, use it.
280
- 4. If multiple projects are plausible, ask the user which FeedbackBasket project to file it under.
281
- 5. Do not silently guess the project when it is ambiguous.
282
-
283
- Keep agent-filed feedback short and dashboard-friendly:
284
-
285
- - Title: under 80 characters, action-oriented, no stack traces.
286
- - Content: 1 to 3 short paragraphs, ideally under 600 characters, focused on the user-visible problem, expected behavior, and actual behavior.
287
- - Do not paste long logs, full reasoning chains, or broad investigation notes into the body.
288
- - Put structured context in metadata: `source=agent`, `found_by=<agent>`, `repo=<name>`, `branch=<branch>`, `route=<path>`, `file=<path>`, `severity=<low|medium|high>`, `test=<command>`.
289
-
290
- Use:
291
-
292
- ```bash
293
- feedbackbasket feedback create "<short title>" \
294
- --content "<brief user-visible issue description>" \
295
- --project <project-name-or-id> \
296
- --type bug \
297
- --metadata source=agent \
298
- --metadata found_by=codex \
299
- --agent
300
- ```
301
-
302
- After creation, report the feedback ID and dashboard URL to the user.
303
-
304
- ### Investigate high-priority bugs
305
- ```bash
306
- feedbackbasket bugs list --severity high --agent
307
- feedbackbasket feedback show <id> --agent
308
- # Response includes browser, OS, page URL, submitted feedback type, follow-up answers, attachment URLs, metadata, AI analysis, priority score
309
- ```
310
-
311
- ### Close the loop — reply to the submitter
312
- ```bash
313
- # Agent reads context, asks which delivery method to use, then sends it
314
- feedbackbasket feedback show <id> --agent # read email, replyChannel, project.replyToEmail
315
- feedbackbasket feedback reply <id> "<drafted response>" --delivery widget --agent
316
- feedbackbasket feedback reply <id> "<drafted response>" --delivery in-app --agent
317
- feedbackbasket feedback reply <id> "<drafted response>" --delivery email --reply-to support@example.com --agent
318
- feedbackbasket feedback reply <id> "<drafted response>" --delivery both --reply-to support@example.com --agent
319
- feedbackbasket feedback update <id> --status COMPLETE --agent
320
- feedbackbasket feedback note <id> "Replied via CLI" --agent
321
- ```
322
- **Important reply safety rules:**
323
- - Before replying, the agent MUST inspect `feedback show --agent`, including `replyChannel`, then ask the human which available delivery method to use unless the human already specified it in the current conversation.
324
- - 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.
325
- - If `feedback show` returns `email: null`, do not use `--delivery email` or `--delivery both`. If `replyChannel: null`, do not use thread delivery.
326
- - 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.
327
- - 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>`.
328
-
329
- Never silently guess a reply-to address. It becomes the "From" address the customer sees.
330
-
331
- ### Export for analysis
332
- ```bash
333
- feedbackbasket feedback export myapp --format json --agent
334
- # Agent can parse the JSON and generate reports
335
- ```
336
-
337
- ### Search for patterns
338
- ```bash
339
- feedbackbasket feedback search "login" --agent
340
- feedbackbasket feedback search "crash" --category BUG --agent
341
- ```
342
-
343
- ## Filtering Options
344
-
345
- | Type | Values |
346
- |------|--------|
347
- | Categories | `BUG`, `FEATURE_REQUEST`, `IMPROVEMENT`, `QUESTION` |
348
- | Statuses | `OPEN`, `UNDER_REVIEW`, `PLANNED`, `IN_PROGRESS`, `COMPLETE`, `CLOSED` |
349
- | Sentiments | `POSITIVE`, `NEGATIVE`, `NEUTRAL` |
350
- | Bug Severity | `high`, `medium`, `low` |
351
-
352
- ## JSON Envelope
353
-
354
- When using `--json`, responses include breadcrumbs:
355
- ```json
356
- {
357
- "ok": true,
358
- "data": [...],
359
- "summary": "5 projects",
360
- "breadcrumbs": [
361
- { "action": "View feedback", "cmd": "feedbackbasket feedback list --project myapp" }
362
- ]
363
- }
364
- ```
365
-
366
- Errors include hints:
367
- ```json
368
- {
369
- "ok": false,
370
- "error": "Not authenticated",
371
- "code": "auth_error",
372
- "hint": "Run: feedbackbasket auth login"
373
- }
374
- ```
375
-
376
- ## Invariants
377
-
378
- - Always authenticate before data commands
379
- - `--agent` flag suppresses all interactive prompts and confirmations
380
- - Default project (set during login) is used when `--project` is not specified
381
- - Project names resolve case-insensitively with fuzzy matching
382
- - Write operations use full scope (granted by default during login)
383
- - Feedback IDs are stable CUIDs — safe to reference across commands
384
- - All timestamps are ISO 8601
385
- - `--yes` flag skips delete confirmations in interactive mode
141
+ feedbackbasket feedback bulk-update --status CLOSED --ids id1,id2,id3 --yes
142
+
143
+ # Reply to submitter by email, widget/in-app thread, or both
144
+ feedbackbasket feedback reply <id> "Thanks for reporting — we pushed a fix!" --delivery email --reply-to support@example.com --yes
145
+ feedbackbasket feedback reply <id> "<content>" --delivery widget --yes
146
+ feedbackbasket feedback reply <id> "<content>" --delivery in-app --yes
147
+ feedbackbasket feedback reply <id> "<content>" --delivery both --reply-to support@example.com --yes
148
+ feedbackbasket feedback replies <id> # show the complete conversation
149
+
150
+ # Export
151
+ feedbackbasket feedback export <project> --format csv
152
+ feedbackbasket feedback export <project> --format md
153
+ feedbackbasket feedback export <project> --format json
154
+ ```
155
+
156
+ ### Bug Reports
157
+ ```bash
158
+ feedbackbasket bugs list --severity high --status OPEN --project <id>
159
+ feedbackbasket bugs stats --project <id>
160
+ ```
161
+
162
+ ### Widget
163
+ ```bash
164
+ # Get embed code (ready to paste into HTML)
165
+ feedbackbasket widget script <project>
166
+
167
+ # View settings
168
+ feedbackbasket widget settings <project>
169
+ feedbackbasket widget settings <project> --capture-mode waitlist
170
+ feedbackbasket widget settings <project> --capture-mode feedback
171
+
172
+ # Customize
173
+ feedbackbasket widget settings <project> --color "#22c55e" --label "Send Feedback"
174
+ feedbackbasket widget settings <project> --position bottom-left --display modal
175
+ feedbackbasket widget settings <project> --email-required --intro "How can we improve?"
176
+ feedbackbasket widget settings <project> --show-email --allow-attachments
177
+ feedbackbasket widget settings <project> --allow-visitor-replies
178
+ feedbackbasket widget settings <project> --no-allow-visitor-replies
179
+ feedbackbasket widget settings <project> --email-read-only --hide-email-when-prefilled
180
+ feedbackbasket widget settings <project> --error-tracking --allow-console-errors
181
+
182
+ # Guided feedback types and follow-up questions
183
+ feedbackbasket widget flow <project>
184
+ feedbackbasket widget flow <project> --enable # only when the user chooses guided feedback
185
+ feedbackbasket widget flow <project> --reset-default --enable # only when the user chooses guided feedback
186
+ feedbackbasket widget flow <project> --config ./feedback-flow.json
187
+ ```
188
+
189
+ Waitlist mode keeps the same project script and binds to the host app's own annotated form:
190
+
191
+ ```html
192
+ <form data-feedbackbasket-waitlist>
193
+ <input name="name" autocomplete="name">
194
+ <input name="email" type="email" autocomplete="email" required>
195
+ <button type="submit">Join the waitlist</button>
196
+ </form>
197
+ ```
198
+
199
+ The form must be served from the website origin saved on the FeedbackBasket project. Email is required and name is optional. The script binds forms already on the page and forms added later, uses native browser validation, disables submit controls during the request, and keeps the host app's styling.
200
+
201
+ Use `data-feedbackbasket-state="loading|success|error"` for custom UI. The bubbling `feedbackbasket:waitlist:success` event includes `detail.email` and `detail.duplicate`; `feedbackbasket:waitlist:error` includes `detail.message` and `detail.status`. Do not add a competing submit handler. Repeat submissions for the same project and email update the existing signup rather than creating a duplicate.
202
+
203
+ ### Waitlist Signups
204
+
205
+ ```bash
206
+ feedbackbasket waitlist list <project>
207
+ feedbackbasket waitlist list <project> --search "@example.com" --limit 50 --offset 0
208
+ feedbackbasket waitlist list <project> --agent
209
+ feedbackbasket waitlist export <project>
210
+ ```
211
+
212
+ 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.
213
+
214
+ For inline trigger mode, load the widget once and call the public API from the host app's custom button:
215
+
216
+ ```html
217
+ <button onclick="window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })">
218
+ Feedback
219
+ </button>
220
+ ```
221
+
222
+ In React:
223
+
224
+ ```tsx
225
+ <button onClick={(event) => window.FeedbackWidget.openFeedbackForm({ trigger: event.currentTarget })}>
226
+ Feedback
227
+ </button>
228
+ ```
229
+
230
+ 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.
231
+
232
+ 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.
233
+
234
+ `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.
235
+
236
+ 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.
237
+
238
+ `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`.
239
+
240
+ ### Team
241
+ ```bash
242
+ feedbackbasket team list
243
+ feedbackbasket team role <memberId> --role admin --yes
244
+ feedbackbasket team remove <memberId> --yes
245
+ ```
246
+
247
+ ### Utilities
248
+ ```bash
249
+ feedbackbasket doctor # Health check (auth, connectivity, skill)
250
+ feedbackbasket setup claude # Install this skill for Claude Code
251
+ ```
252
+
253
+ ## Common Agent Workflows
254
+
255
+ ### Add a widget to the current app
256
+ ```bash
257
+ # First resolve the project for this app. Do not rely on the CLI default project.
258
+ feedbackbasket projects list --agent
259
+
260
+ # If no existing project matches the current app's real URL/name, create one after confirming the URL.
261
+ feedbackbasket projects create "My App" --url https://myapp.com --agent
262
+ feedbackbasket widget script "My App" --agent
263
+ # Agent gets the embed code, adds it to the HTML
264
+ feedbackbasket widget settings "My App" --color "#22c55e" --label "Feedback" --agent
265
+ # Optional, when the user wants a waitlist instead of feedback capture
266
+ # feedbackbasket widget settings "My App" --capture-mode waitlist --agent
267
+ # Optional, only when requested: enable the guided wizard with Bug, Feature, and General templates
268
+ # feedbackbasket widget flow "My App" --reset-default --enable --agent
269
+ ```
270
+
271
+ ### Triage new feedback
272
+ ```bash
273
+ feedbackbasket feedback list --status OPEN --agent
274
+ # Review items, then update:
275
+ feedbackbasket feedback update <id> --status UNDER_REVIEW --agent
276
+ feedbackbasket feedback note <id> "Reviewing — appears related to auth flow" --agent
277
+ ```
278
+
279
+ ### Capture new feedback without leaving the terminal
280
+ ```bash
281
+ feedbackbasket feedback create "Login button is broken" \
282
+ --content "Clicking Log in does nothing in Safari." \
283
+ --project myapp \
284
+ --type bug \
285
+ --page-url https://example.com/login \
286
+ --metadata source=agent \
287
+ --agent
288
+ ```
289
+ 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.
290
+
291
+ ### File agent-found issues in FeedbackBasket
292
+
293
+ 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.
294
+
295
+ Before creating the item, resolve the target project:
296
+
297
+ 1. If the user explicitly names a FeedbackBasket project, use that project.
298
+ 2. If the current repo/app clearly matches exactly one FeedbackBasket project name or project URL from `feedbackbasket projects list --agent`, use that project.
299
+ 3. If the CLI default project clearly matches the current repo/app, use it.
300
+ 4. If multiple projects are plausible, ask the user which FeedbackBasket project to file it under.
301
+ 5. Do not silently guess the project when it is ambiguous.
302
+
303
+ Keep agent-filed feedback short and dashboard-friendly:
304
+
305
+ - Title: under 80 characters, action-oriented, no stack traces.
306
+ - Content: 1 to 3 short paragraphs, ideally under 600 characters, focused on the user-visible problem, expected behavior, and actual behavior.
307
+ - Do not paste long logs, full reasoning chains, or broad investigation notes into the body.
308
+ - Put structured context in metadata: `source=agent`, `found_by=<agent>`, `repo=<name>`, `branch=<branch>`, `route=<path>`, `file=<path>`, `severity=<low|medium|high>`, `test=<command>`.
309
+
310
+ Use:
311
+
312
+ ```bash
313
+ feedbackbasket feedback create "<short title>" \
314
+ --content "<brief user-visible issue description>" \
315
+ --project <project-name-or-id> \
316
+ --type bug \
317
+ --metadata source=agent \
318
+ --metadata found_by=codex \
319
+ --agent
320
+ ```
321
+
322
+ After creation, report the feedback ID and dashboard URL to the user.
323
+
324
+ ### Investigate high-priority bugs
325
+ ```bash
326
+ feedbackbasket bugs list --severity high --agent
327
+ feedbackbasket feedback show <id> --agent
328
+ # Response includes browser, OS, page URL, submitted feedback type, follow-up answers, attachment URLs, metadata, AI analysis, priority score
329
+ ```
330
+
331
+ ### Close the loop reply to the submitter
332
+ ```bash
333
+ # Agent reads context, asks which delivery method to use, then sends it
334
+ feedbackbasket feedback show <id> --agent # read email, replyChannel, project.replyToEmail
335
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery widget --yes --agent
336
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery in-app --yes --agent
337
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery email --reply-to support@example.com --yes --agent
338
+ feedbackbasket feedback reply <id> "<drafted response>" --delivery both --reply-to support@example.com --yes --agent
339
+ feedbackbasket feedback update <id> --status COMPLETE --agent
340
+ feedbackbasket feedback note <id> "Replied via CLI" --agent
341
+ ```
342
+ **Important reply safety rules:**
343
+ - 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.
344
+ - 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.
345
+ - If `feedback show` returns `email: null`, do not use `--delivery email` or `--delivery both`. If `replyChannel: null`, do not use thread delivery.
346
+ - 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.
347
+ - 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>`.
348
+ - 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.
349
+
350
+ Never silently guess a reply-to address. It becomes the "From" address the customer sees.
351
+
352
+ ### Export for analysis
353
+ ```bash
354
+ feedbackbasket feedback export myapp --format json --agent
355
+ # Agent can parse the JSON and generate reports
356
+ ```
357
+
358
+ ### Search for patterns
359
+ ```bash
360
+ feedbackbasket feedback search "login" --agent
361
+ feedbackbasket feedback search "crash" --category BUG --agent
362
+ ```
363
+
364
+ ## Filtering Options
365
+
366
+ | Type | Values |
367
+ |------|--------|
368
+ | Categories | `BUG`, `FEATURE_REQUEST`, `IMPROVEMENT`, `QUESTION` |
369
+ | Statuses | `OPEN`, `UNDER_REVIEW`, `PLANNED`, `IN_PROGRESS`, `COMPLETE`, `CLOSED` |
370
+ | Sentiments | `POSITIVE`, `NEGATIVE`, `NEUTRAL` |
371
+ | Bug Severity | `high`, `medium`, `low` |
372
+
373
+ ## JSON Envelope
374
+
375
+ When using `--json`, responses include breadcrumbs:
376
+ ```json
377
+ {
378
+ "ok": true,
379
+ "data": [...],
380
+ "summary": "5 projects",
381
+ "breadcrumbs": [
382
+ { "action": "View feedback", "cmd": "feedbackbasket feedback list --project myapp" }
383
+ ]
384
+ }
385
+ ```
386
+
387
+ Errors include hints:
388
+ ```json
389
+ {
390
+ "ok": false,
391
+ "error": "Not authenticated",
392
+ "code": "auth_error",
393
+ "hint": "Run: feedbackbasket auth login"
394
+ }
395
+ ```
396
+
397
+ ## Invariants
398
+
399
+ - Always authenticate before data commands
400
+ - `--agent` suppresses interactive prompts. High-impact operations still need `--yes`.
401
+ - Default project (set during login) is used when `--project` is not specified
402
+ - Project names resolve case-insensitively with fuzzy matching
403
+ - Write operations use full scope (granted by default during login)
404
+ - Feedback IDs are stable CUIDs — safe to reference across commands
405
+ - All timestamps are ISO 8601
406
+ - `--yes` confirms all high-impact CLI operations in agent or machine mode