@sendbird/cli 0.3.0-alpha.1 → 0.4.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,6 +1,6 @@
1
1
  {
2
2
  "name": "sendbird-cli",
3
- "version": "0.3.0-alpha.1",
3
+ "version": "0.4.0",
4
4
  "description": "Set up and operate Sendbird with the CLI; choose client assistance for customer app work.",
5
5
  "author": {
6
6
  "name": "Sendbird"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sendbird-cli",
3
- "version": "0.3.0-alpha.1",
3
+ "version": "0.4.0",
4
4
  "description": "Set up and operate Sendbird with the CLI; choose client assistance for customer app work.",
5
5
  "skills": "./skills/",
6
6
  "interface": {
@@ -8,7 +8,10 @@
8
8
  "shortDescription": "Manage resources and choose customer-app assistance",
9
9
  "developerName": "Sendbird",
10
10
  "category": "Productivity",
11
- "capabilities": ["Read", "Write"],
11
+ "capabilities": [
12
+ "Read",
13
+ "Write"
14
+ ],
12
15
  "websiteURL": "https://github.com/sendbird/sendbird-cli",
13
16
  "defaultPrompt": [
14
17
  "Use $sendbird-cli:sendbird-setup to connect my coding agent to Sendbird, ask whether to save defaults, and offer optional Chat practice without creating resources until authorized."
@@ -22,7 +25,10 @@
22
25
  "shortDescription": "Set up Chat, manage resources, and hand off app work",
23
26
  "developerName": "Sendbird",
24
27
  "category": "Productivity",
25
- "capabilities": ["Read", "Write"],
28
+ "capabilities": [
29
+ "Read",
30
+ "Write"
31
+ ],
26
32
  "websiteURL": "https://github.com/sendbird/sendbird-cli",
27
33
  "defaultPrompt": [
28
34
  "Use $sendbird-cli:sendbird-setup to connect my coding agent to Sendbird, ask whether to save defaults, and offer optional Chat practice without creating resources until authorized."
package/README.md CHANGED
@@ -1,458 +1,45 @@
1
1
  # Sendbird CLI
2
2
 
3
- Chat Dashboard operations for people and AI agents. **Validation alpha**: environment-bound CLI OAuth and in-memory reuse of existing Chat user tokens. Node.js 22.23.4+ (22.x) or 24.22.1+ (24.x), macOS/Linux, with native Windows support targeting Windows 11 x64 and PowerShell 7. See [Windows setup and validation limits](docs/windows.md).
3
+ Manage Sendbird apps and Chat from your terminal or AI coding agent.
4
4
 
5
- Proprietary software. See [LICENSE](LICENSE) for first-party terms and [NOTICE.md](NOTICE.md) for dependency notices. Repository visibility and package availability are managed separately.
6
-
7
- ## Start here with an AI agent
8
-
9
- ```sh
10
- sendbird --json agent
11
- sendbird --json commands --compact --search message send --transport sdk
12
- sendbird --json describe chat message send
13
- sendbird help chat message send
14
- sendbird --json workflows first-message
15
- ```
16
-
17
- Bare `sendbird` returns the same small, offline guide. `agent`, `commands`,
18
- `describe`, and `workflows` never log in, read saved profiles, change configuration,
19
- or call the network. `commands --compact` is bounded and searchable (including
20
- common Korean intent words); multiword searches do not need shell quotes.
21
- Unfiltered `commands` retains the full catalog for existing consumers. `describe`
22
- includes exact flags, required inputs, credential type, constraints and a shell/argv
23
- dry-run template. Uppercase identifiers are placeholders, not guessed defaults.
24
-
25
- Errors now include structured `next` argv suggestions and an `outcome_unknown` indicator for uncertain mutations. SDK token failures do not tell agents to fix an unrelated Dashboard login. `auth status --summary` avoids dumping full organization settings.
26
-
27
- For staging SDK work:
28
-
29
- ```sh
30
- sendbird --profile staging --app-id APP_ID chat sdk status \
31
- --as-user USER_ID
32
- ```
33
-
34
- With CLI OAuth, SDK commands discover the selected app's standard or Delight region hosts in the selected environment at execution time. The optional `app sdk-config --raw > sdk-config.json` file contains no credentials; pass it with `--sdk-config-file` to specify expected hosts. Automatically retrieved Chat tokens still require a matching authoritative Gate route on every execution. Explicit API/WebSocket host pairs remain available. Do not mix a config file with explicit host options. Workflow commands only print plans; conditional steps and resource creation still depend on the user's task and actual state.
35
-
36
- ## Pro Chat operations
37
-
38
- The Pro extension covers indexed search, mentions, message meta arrays, thumbnail requests, translation preferences, Polls, blocking/reporting and weekly DND. Dashboard-role commands add moderation, filters, bounded announcements, analytics, Chat webhooks and Push administration. Sensitive SSO, IP and app deletion operations require extra target confirmations.
39
-
40
- Inspect the new offline workflow with `sendbird --json workflows pro-chat`, or open the Pro feature guide with `npm run docs`. Customer UI/offline behavior follows the selected native-plugin, temporary ZIP or no-assistance mode (or explicitly retained guide-only work). Command implementation is separate from live verification: Push devices/providers, an IdP, a callback receiver and account-specific entitlements must be tested independently. Bot/GDPR contracts remain open; Data Export is intentionally excluded. No application management API key fallback is provided.
41
-
42
- The supported Node release lines are 22.x and 24.x, with security floors of
43
- 22.23.4 and 24.22.1 respectively. These include the
44
- [October 21, 2026 Node.js security fixes](https://nodejs.org/en/blog/vulnerability/october-2026-security-releases).
45
- Update the installed Node runtime as well as the CLI package. CI, publishing and
46
- source-audit jobs pin these patched versions.
47
-
48
- ## Register the CLI Skill with your coding tool
49
-
50
- Installing the binary does not register its bundled Skill with Claude Code or Codex. From your project root, use one of:
51
-
52
- ```sh
53
- sendbird skills install --agent claude --scope project
54
- sendbird skills install --agent codex --scope project
55
- sendbird skills status
56
- ```
57
-
58
- Use `--scope user` for all your local projects. Project scope means the current directory: Claude Code uses `.claude/skills/sendbird`, Codex uses `.agents/skills/sendbird`; user scope uses the same paths under your home. Registration is offline, copies only the operational `sendbird` Skill and its references, and does not install a client plugin, hooks or the optional CLI-bootstrap Skill. Existing modified/unmanaged files and symlink search paths are refused. An unchanged CLI-managed copy can be refreshed with the same install command. Interrupted changes may retain a lock or backup; `skills status` reports these for manual review and never deletes them automatically.
59
-
60
- Use `--dry-run` to preview installation/removal. `sendbird skills show` prints the full bundled instructions and reference paths for an Agent that already found the binary. `sendbird --json skills show` provides those fields as JSON. Remove only an unchanged managed copy with `sendbird skills remove --agent claude --scope project --yes` (or `--agent codex`). Restart/reload your host if needed and verify the Skill appears. Status inspects local files only; installed host plugins, actual loading and automatic selection are not verified. Avoid registering a second copy when an installed plugin already supplies this Skill. Cloud/managed hosts may use different discovery or policy and are not verified by this local registration.
61
-
62
- ## Browser documentation
63
-
64
- From the repository, run:
5
+ ## Install
65
6
 
66
7
  ```sh
67
- npm run docs
8
+ npm install -g @sendbird/cli
68
9
  ```
69
10
 
70
- This builds the standalone documentation and opens it in your default browser.
71
- Keep the terminal running; press Ctrl+C to stop. The server binds only to localhost.
72
-
73
- - `npm run docs:build`: generate the static site in `.docs-site/`.
74
- - `npm run docs:serve`: serve the existing build and open the browser.
75
- - `npm run docs -- --no-open --port 4174`: choose a port or run without opening a browser.
76
-
77
- Guides live in `site/guides.ts`; command pages and options come directly from the CLI registry.
78
- Official-documentation-based tutorials live in `site/tutorials.ts`, with shared Bash setup in `site/tutorial-session.sh`. The **User scenario tutorials** section covers Open chat, distinct 1:1 chat/read/typing, files/threads/reactions, conditional invitations, public Supergroups, and message history/update/delete. Each includes source links, terminal roles, real response-ID chaining, checkpoints, cleanup and CLI limitations.
79
- The website, build tools and `docs/` development notes are **excluded from the npm bundle**.
80
- These commands require a repository checkout with development dependencies. The portable AI Skill remains in the CLI package.
81
-
82
- ## Install and start
11
+ Requires Node.js 22.23.4+ (22.x) or 24.22.1+ (24.x). Supports macOS, Linux and Windows.
12
+ The 0.4 release begins the officially supported release line.
83
13
 
84
- From this repository:
14
+ ## Get started
85
15
 
86
16
  ```sh
87
- npm ci
88
- npm run build
89
- npm link
90
- sendbird --help
91
17
  sendbird setup
92
- ```
93
-
94
- For a portable installation, run `npm pack` and install the resulting `.tgz` with `npm install -g ./sendbird-cli-0.3.0-alpha.1.tgz`. Public npm availability is not assumed; this repository has not published the package.
95
-
96
- Explicit staging setup:
97
-
98
- ```sh
99
- sendbird profile create --name staging --env staging
100
- sendbird profile use --name staging
101
- sendbird auth login
102
- sendbird org list
103
- sendbird org use --id ORG_UID
104
18
  sendbird app list
105
- sendbird app use --id APP_ID
106
- sendbird doctor
107
- ```
108
-
109
- To leave a non-secret project marker that coding agents can discover in an
110
- existing repository, select an app and run:
111
-
112
- ```sh
113
- sendbird --app-id APP_ID project init --yes
114
- ```
115
-
116
- This creates a visible `sendbird.json` in the current directory with the app,
117
- organization, region, and an explicit first command for Agents:
118
- `sendbird --dry-run agent`. It contains no tokens, cookies, passwords, or API
119
- keys. Add `--project` to use this context for a command. It takes precedence
120
- over saved profile context, while explicit flags still win.
121
- This prevents a repository file from silently selecting the target of a remote
122
- request. Inspect the marker with `sendbird project status`.
123
-
124
- Run `sendbird profile` to see the effective profile and saved active profile.
125
- Remove an unused profile with `sendbird profile delete --name NAME --yes`;
126
- this also revokes its saved OAuth login.
127
-
128
- To undo saved selections without logging out, use `sendbird app clear` for
129
- the app only or `sendbird org clear` for the organization, app and region.
130
- Every command still needs a profile; `sendbird profile use --name prod` returns
131
- to the built-in default profile if it exists. Switching profiles does not
132
- erase the old profile's saved context.
133
-
134
- An account without an organization can use:
135
-
136
- ```sh
137
- sendbird org create --organization-name 'My team'
138
- # Use the returned organizations[0].uid
139
- sendbird org use --id ORG_UID
140
- sendbird app create --app-name 'Chat demo' --region YOUR_REGION
141
- sendbird app use --id APP_ID
142
- ```
143
-
144
- Choose a region actually available to your organization. Account signup and email verification remain in [Dashboard](https://dashboard.sendbird.com/auth/signup). The existing API determines whether an account can create another organization.
145
-
146
- ## Operate Chat
147
-
148
- ```sh
149
- sendbird chat user create --user-id alice --nickname Alice
150
- sendbird chat user create --user-id bob --nickname Bob
151
- sendbird chat channel create --type group --name Demo --user-ids '["alice","bob"]'
152
- sendbird chat channel create --type supergroup --name Community --user-ids '["alice","bob"]'
153
- sendbird chat channel create --type open --name Lobby
154
- sendbird chat channel list --type group --limit 20
155
- sendbird chat channel get --type group --id CHANNEL_URL
156
- sendbird chat channel members invite --type group --id CHANNEL_URL --user-ids '["charlie"]'
157
- sendbird chat user metadata set --id alice --metadata '{"tier":"free"}'
158
- sendbird chat channel delete --type group --id CHANNEL_URL --dry-run
159
- sendbird chat channel delete --type group --id CHANNEL_URL --yes
160
- ```
161
-
162
- ## Read usage and plans (BILL-01)
163
-
164
- These commands make **GET requests only**. Select the intended organization first;
165
- subscription and plan-catalog reads fail if it differs from the authenticated
166
- billing organization. The catalog also requires `organization.general.all`,
167
- matching Dashboard's Change control. Use `--json` for complete, redacted
168
- source values.
169
-
170
- ```sh
171
- sendbird --profile staging --org-id ORG_UID usage chat org \
172
- --start-month 2026-10 --end-month 2026-10
173
- sendbird --profile staging --org-id ORG_UID --app-id APP_ID usage chat app \
174
- --target-month 2026-10
175
- sendbird --profile staging --org-id ORG_UID usage calls org
176
- sendbird --profile staging --org-id ORG_UID --app-id APP_ID usage calls app
177
- sendbird --profile staging --org-id ORG_UID --app-id APP_ID usage calls app-trend \
178
- --resolution monthly --start 2026-09 --end 2026-10
179
- sendbird --profile staging --org-id ORG_UID usage calls trend \
180
- --resolution daily --start 2026-10-01 --end 2026-10-06
181
- sendbird --profile staging --org-id ORG_UID billing plan current
182
- sendbird --profile staging --org-id ORG_UID billing plan list
183
- ```
184
-
185
- Calls usage can contain Live totals; the human trend displays the Calls series,
186
- while `--json` retains all source series. Plan catalog entries do not certify
187
- eligibility or quote a charge. Upgrades, downgrades, card handling, vouchers,
188
- and other billing changes are not provided by BILL-01.
189
-
190
- ## Prepare a Chat plan change (BILL-02)
191
-
192
- The CLI checks the selected organization, role, current/scheduled subscription,
193
- plan catalog and billing channel. **It does not submit a subscription change.**
194
- Gate currently has no authoritative quote endpoint for the final charge and
195
- activation date. Finish the purchase or downgrade in Dashboard, then re-read the
196
- subscription from the CLI. Card details are neither printed nor saved.
197
-
198
- ```sh
199
- sendbird --profile staging --org-id ORG_UID billing plan check --plan plan_a_5k
200
- sendbird --profile staging --org-id ORG_UID billing plan change \
201
- --plan plan_a_5k --confirm-org-name 'YOUR_ORGANIZATION_NAME' --yes
202
- # Open the returned Dashboard URL, check the organization, price and effective date,
203
- # then confirm the change there.
204
- sendbird --profile staging --org-id ORG_UID billing plan verify --plan plan_a_5k
205
- ```
206
-
207
- `check`/`change` require `organization.general.all`. `change` also requires the
208
- exact organization name and `--yes` to prepare the handoff. The browser is not
209
- opened automatically. `verify` reports only `current`, `scheduled` or
210
- `not_reflected`; a matching plan is not proof that this CLI changed it.
211
- Sales/AWS contracts, Shopify, managed payment methods, legacy organizations and
212
- existing scheduled changes require Dashboard review. The catalog can include
213
- support or sales-only products, so presence alone is not purchase eligibility.
214
- `--dry-run` is offline and checks no live policy; use `check` for live reads.
215
- Agents must obtain explicit customer authorization before any paid change in
216
- Dashboard; a generic app-building request does not authorize a purchase.
217
-
218
- Every flag that accepts a boolean/number/array/object takes a JSON value (`false`, `20`, `'["alice"]'`). String flags take literal text. `--body-file request.json` or `--body-file -` accepts JSON; explicit field flags override file fields. Input is validated before HTTP calls. Unknown body fields are rejected.
219
-
220
- Commands are noninteractive except for `auth login`, `setup`, and terminal confirmation of Calls free trials (standalone or offered after Calls app creation/activation); staging OAuth opens a browser and waits for its loopback callback without needing a terminal prompt. The default stdout is a bounded, readable view. Add `--json` for machine-readable JSON (NDJSON for watch), or `--raw` for the legacy result body as JSON. `--human` remains an explicit alias for the default view. Prompts and errors go to stderr; errors become structured JSON with `--json`. `--profile`, `--org-id`, `--app-id` override saved context for one command. Choosing another organization clears the saved app; a one-off org override also drops a saved app from another org.
221
-
222
- ## Output contract
223
-
224
- With `--json`, every executed Dashboard, SDK, and local operation writes one successful JSON envelope to stdout:
225
-
226
- ```json
227
- {
228
- "ok": true,
229
- "command": "sendbird chat channel delete",
230
- "effect": "mutation",
231
- "status": "accepted",
232
- "target": { "app_id": "APP_ID", "channel_url": "CHANNEL_URL" },
233
- "result": {},
234
- "response": "empty"
235
- }
236
- ```
237
-
238
- `status` distinguishes `preview` (no request sent), `accepted` (mutation acknowledged, read back to confirm state), `verified` (read completed), and `completed` (stream ended). Local operations use `succeeded`. `target.actor_user_id` identifies the connected SDK user, separate from a resource's `user_id`. `result` preserves the normalized command result. `response: "empty"` means Sendbird accepted the operation without a response body; it is still a successful receipt, not missing stdout. The default view prints a bounded summary or table; dry-run previews include redacted request fields. `--raw` keeps the pre-envelope JSON result for existing scripts and config files, even without `--json`. `--response-schema --json` describes the machine envelope; for watch it includes both event lines and terminal completion. `sendbird --json describe COMMAND` also exposes `result_schema` for the inner value. SDK watch emits readable event lines by default and NDJSON with `--json`. Errors stay on stderr; `--json` errors include `ok: false`, `next`, and `outcome_unknown` for uncertain writes.
239
-
240
- Human receipts name the completed action and resource. Lists use light tables
241
- or full-ID cards, and detail views focus on fields needed for the next
242
- decision. `--no-color` and `NO_COLOR` disable color; pipes and `--json` are
243
- unstyled. Machine status `accepted` still means the mutation was acknowledged,
244
- not that another user received a message. The shared design and review rules
245
- are in [the human output contract](docs/human-output.md).
246
-
247
- Lists are bounded to 20 by default, maximum 100. Follow `next` using `--token` for Dashboard Chat lists, `--offset` for apps. SDK query lists use `--page` and return `next_page`. No hidden fetch-all operation is performed. An org-filtered app page may be empty while more pages remain. Because app list rows omit organization identity, filtering reads one app detail per row to verify ownership. If Gate lists an app whose detail says it no longer exists, that row is omitted and counted in `skipped_unavailable_applications`; other detail failures still stop the command.
248
-
249
- ## Chat SDK: messages and live channel activity
250
-
251
- The CLI includes the official `@sendbird/chat` v4 SDK. SDK commands act as a Chat **user**. With CLI OAuth for the selected environment, `--as-user` reads the selected user’s existing access token through Gate and passes it directly to the SDK worker. The CLI never prints or saves it. Gate applies its existing `with_access_token` permission check. This access token remains valid until revoked, so it is not a short-lived session. If the user has no access token, issue one explicitly or choose `--allow-guest` only where app policy permits.
252
-
253
- ```sh
254
- sendbird chat sdk status --app-id APP_ID --as-user alice
255
- sendbird chat message send --app-id APP_ID --as-user alice --type group --id CHANNEL_URL --message 'Hello'
256
- sendbird chat message list --app-id APP_ID --as-user alice --type group --id CHANNEL_URL --limit 20
257
-
258
- # Another terminal, using Bob's existing token in memory:
259
- sendbird chat channel watch --app-id APP_ID --as-user bob --type group --id CHANNEL_URL --seconds 60
260
- ```
261
-
262
- For an external identity provider, explicit `--user-token-file` accepts a raw user token or JSON containing `access_token`/`session_token`. Optional `user_id` and `app_id` bindings must match. Only explicit `--allow-guest` permits tokenless SDK login, which can create a user depending on app policy. The CLI does not create token files automatically.
263
-
264
- Supported SDK operations:
265
-
266
- - `chat message send`, `file`, `list`, `get`, `update`, `delete`.
267
- - `chat message reply`, `thread`, `reaction add/remove`, `pin/unpin` (Group/Supergroup).
268
- - `chat message receipts` and `chat channel typing` (regular Group only).
269
- - `chat channel join`, `leave`, `invitation accept/decline`, `read` (Group/Supergroup).
270
- - `chat channel participants list` (Open; one bounded query page per invocation).
271
- - `chat sdk channel my list/unread`: connected-user Group/Supergroup pages and total unread messages. Open channels have no member-based "my channels" list. The list always includes channels lacking a last-message projection. Per-channel SDK unread snapshots can disagree with the aggregate; when the last message is absent, the snapshots are `null`. The CLI offers neither an unread-only nor an empty-channel exclusion filter.
272
- - `chat sdk user invitation get/set` and `chat sdk channel count-preference get/set`: automatic invitation acceptance and per-channel unread/mention count preferences.
273
- - `chat channel watch`: message, reaction, membership, read/delivery receipt and typing events supported by each channel type, as NDJSON. It does not mark messages as read automatically.
274
- - `chat sdk …`: connected-user member operations, counters, pins, push/snooze preferences, channel visibility/history, scheduled messages, Poll reads/votes, translation, change logs, and permission-gated operator/moderation actions.
275
-
276
- Use `--id` for the channel URL and `--message-id` for a message. Text sends can use `--parent-message-id` for replies. File messages accept exactly one of `--file` (local regular file, maximum 25 MiB) and `--file-url` (HTTPS). Access codes belong in private JSON body files, not CLI values. Open-channel SDK operations temporarily enter the channel and exit on completion; Group membership is never silently created when sending.
277
-
278
- Each SDK command makes a fresh connection and disconnects on completion. Typing/receipt and per-channel unread values are point-in-time snapshots, not a persistent app session. My-channel, participant, member, pinned-message, scheduled-message, and Poll lists accept one-based `--page N` (maximum 100); use `result.next_page` when present and keep the same limit/filter. SDK query cursors cannot survive a CLI process, so a later page replays earlier pages in that invocation. Cost grows with page number, and concurrent changes can shift results; this is not a stable export. History responses return `next_before_id`, used with `--before-id` to avoid skipping equal timestamps. Thread paging uses the SDK's inclusive timestamp interface (`--before`), so deduplicate message IDs; this is not a complete thread-export command.
279
-
280
- Scheduled-message lists include canceled history by default. Use `chat sdk message scheduled list --status pending` to see remaining sends and `--status canceled` to verify cancellation by `scheduled_message_id`. Canceling a schedule does not remove it from the all-status list. Snooze timestamps use Unix milliseconds; enabling requires both `--start-at` and `--end-at` with end after start. Disabling with `--enabled false` preserves the existing interval. Channel hide/history reset and scheduled send-now/cancel require `--yes`, as do operator/moderation changes.
281
-
282
- Staging profiles discover SDK hosts automatically for the selected app using CLI OAuth. `--sdk-config-file` or **both** `--sdk-api-host HTTPS_ORIGIN` and `--sdk-ws-host WSS_ORIGIN` bypass that lookup only with an explicit `--user-token-file` or `--allow-guest`. Automatic Chat-token retrieval always verifies the hosts against Gate metadata before reading the token. Without an explicit override or a successful lookup, staging never falls back to production hosts. SDK commands run in isolated workers: timeouts, Ctrl+C and completion clean up connections, handlers and SDK timers. `--timeout` defaults to 30 seconds; watch has its own bounded duration after readiness, and typing adds its requested duration to the operation budget. CLI code never resends a message automatically; SDK transport/reconnection behavior follows the official SDK. After an interrupted/timed-out write, read back before retrying.
283
-
284
- Run `npm run docs` and open **SDK chat and real-time events** for recipes, restrictions and authentication details. Friend administration and file scheduling are not yet implemented. Poll lifecycle, user blocking and weekly DND are implemented; inspect the Pro guide for verification boundaries. Real delivery requires a valid application, user tokens and channel access; mock tests do not prove live delivery.
285
-
286
- ## Authentication and secrets
287
-
288
- For **staging**, `sendbird --profile staging auth login` now opens Gate's browser OAuth consent and returns automatically to the CLI. `--method oauth` selects it explicitly. It uses a separate CLI Bearer token, bound by Gate to the approving Dashboard session; it does not use a Chat application API token. Gate currently grants one broad `cli:dashboard` scope without an endpoint allowlist, so this is a staging integration only. The grant expires when its Dashboard session expires or is signed out. The CLI refreshes an expiring access token while that grant is valid, and `auth logout` revokes the saved access and refresh tokens. It **ignores** any Dashboard `Set-Cookie` returned to a Bearer request.
289
-
290
- Browser login uses the selected profile's Gate environment and requires Gate to enable/advertise its CLI OAuth client. Production internal smoke has been verified on a dedicated test app; other features and production policies still need their respective approvals. Email/password and cookie-import login have been removed. macOS stores OAuth credentials in Keychain; Linux uses Secret Service through `secret-tool` (`libsecret-tools`); Windows uses Credential Manager through the system Windows PowerShell host. If Secret Service is unavailable or locked, login reports that the session cannot be saved and fails; it does not fall back to a local credential file. Existing Linux session files are never read; remove them and log in again.
291
-
292
- For staging SSO/2FA, use `sendbird --profile staging auth login` and finish the normal browser login and consent. `auth logout` revokes the CLI grant; it does not sign out other Dashboard sessions.
293
-
294
- For a new account, `sendbird setup` can guide signup, organization selection or creation, region selection, and Chat app creation. At the end it reviews the profile/environment, organization, app and region, then asks whether to save them as defaults. Saving also makes that profile active. Skipping or cancelling keeps selection defaults unchanged; sign-in and created resources remain, and reauthentication may reset old account context. An existing app stays in its current region; the saved region is for future app creation. The result includes `defaults_saved` and a context-bound `next_argv` even when you skip saving. The equivalent explicit flow is:
295
-
296
- ```sh
297
- sendbird --profile staging auth signup
298
- sendbird auth verify-email --token-file ./private-verification-link.txt
299
- sendbird org create --organization-name 'My team'
300
- sendbird org use --id ORG_UID
301
- sendbird org region list
302
- sendbird org region use --id REGION_ID
303
- sendbird app create --app-name 'Chat demo'
304
- sendbird app use --id APP_ID
305
- ```
306
-
307
- `setup` offers sign-in or account creation in both production and staging when authentication is needed. `auth signup` opens the selected environment's Dashboard signup page with a Gate OAuth `next` URL. The person completes signup and terms acceptance in the browser, then approves CLI access. Gate redirects to the local CLI callback; setup continues with organization, region and app selection. Email verification remains a separate step. `org region use` saves an allowed region for later `app create`; it does not change an organization's available regions.
308
-
309
- Browser OAuth requires a person to approve the grant. Headless email/password and session-cookie imports are not supported. `SENDBIRD_CONFIG_DIR` isolates configuration and credential-store identity; `SENDBIRD_PROFILE` selects a default profile.
310
-
311
- Secret output paths inside a Git worktree must be ignored and untracked. Existing files, Git metadata, and unverifiable repositories are rejected before API requests. Symlink parents are checked at their physical destination; no force bypass is provided. This prevents accidental Git exposure at write time, not later forced adds or ignore-rule changes. Keep the destination directory private.
312
-
313
- Secret values are redacted from stdout, errors and previews. To receive a Chat user token, explicitly write to a **new** private file:
314
-
315
- ```sh
316
- sendbird chat user token issue --id alice --yes --secret-output /private/path/outside-git/alice-token.json
317
- ```
318
-
319
- Secret-output files contain the unredacted response. Existing files are never overwritten. Application API token listing, issuance and revocation are not supported by this CLI. CLI OAuth and Chat user tokens remain separate credentials.
320
-
321
- `app auth-policy get/set` uses Dashboard's `guest_user_policy`: `0` read/write, `1` read-only, `2` deny login for users without an access token. Changes require `--yes`.
322
-
323
- ## AI use and support
324
-
325
- ### Find and read CLI docs from the terminal
326
-
327
- `sendbird docs search "group chat"` searches a small, versioned guide/tutorial section index offline. Results include a stable section ID, source path, browser URL and exact `docs read` argv. Follow `next_offset` with `--offset` when needed; `--limit` is 1–20. Command flags and schemas remain available through `sendbird commands --compact --search WORDS` and `sendbird describe ...`.
328
-
329
- ```sh
330
- sendbird docs search "message send" --limit 5
331
- sendbird docs read 'guide/sdk-chat#messages' --base-url http://127.0.0.1:4173
332
- ```
333
-
334
- `docs read` fetches only the selected Markdown section from a matching docs build and checks its digest against the installed index. In a source checkout, start `npm run docs -- --no-open`; if it uses another port, supply `--base-url` or `SENDBIRD_DOCS_URL`. A hosted docs build must use HTTPS. Without an available matching server, search and command discovery still work offline; read returns a structured, actionable error. Each section is capped at 24 KB. The site and section content remain outside the npm package.
335
-
336
- Use the bundled [Sendbird skill](skills/sendbird/SKILL.md) and [setup prompt](docs/ai-onboarding.md). `sendbird --json agent`, `--json commands --compact --search`, and `--json describe` provide focused discovery; `COMMAND --example` and `COMMAND --response-schema` remain available without authentication. See the [command reference](references/commands.md).
337
-
338
- For customer app creation or edits, the Skill offers three choices: review official native-plugin installation information, explicitly run the client plugin once from a checksum-verified ZIP, or continue without client assistance. Installing Sendbird CLI does not itself install or invoke the client plugin. Selecting the ZIP route starts a separate authenticated Claude Code process on macOS/Linux; it prints the publisher notice to stderr before execution and permits editing only. The parent Agent reviews changes and performs installation/build/runtime checks. The Skill also shows a notice summary and the publisher's [What runs on your machine](https://github.com/sendbird/sendbird-client-plugin#what-runs-on-your-machine) link before installation/execution guidance. Emitting a notice is not proof of human visibility or consent. See [the mode contract](skills/sendbird/references/build-chat-app.md) and [ZIP execution](skills/sendbird/references/client-plugin-bridge.md). Guide-only work remains available when explicitly requested; an existing guide-only choice never becomes ZIP authorization. A failure never triggers another mode automatically.
339
-
340
- Technical Chat support is supported with `sendbird support ticket submit --body-file case.json --dry-run`. The body contains `Subject`, `Description`, `Development_Platform__c`, and optionally `Priority`, `SDK_Version__c`, `Steps_to_Reproduce__c`. The app is taken from context. Remove `--dry-run` only when intending to submit. Alpha excludes attachments and other support categories; server-side plan entitlements still apply.
341
-
342
- Exit codes: 0 success; 1 unexpected failure; 2 usage/validation/confirmation; 3 not found; 4 authentication/authorization; 5 conflict/context mismatch; 6 rate limit; 7 network/unknown outcome; 8 upstream/schema failure. Dashboard requests and CLI-level SDK operations are not automatically retried; the SDK controls its own transport/reconnection behavior. A timed-out mutation may have completed; inspect the resource before repeating it.
343
-
344
- ## Development and verification
345
-
346
- ```sh
347
- npm run typecheck
348
- npm test
349
- npm run build
350
- npm run check:package
351
- SENDBIRD_DASHBOARD_PATH=../sbdashboard npm run audit
352
- ```
353
-
354
- After reviewing Dashboard changes, `npm run generate` refreshes the pinned source inventory, command reference and typed wrapper entrypoints. Source hashes include API, form validation and dynamic URL helpers. Generated artifacts ship in the package; users do not need a Dashboard checkout.
355
-
356
- `npm run release:gate:offline` checks local contracts and isolated tarball installation. `npm run release:gate` additionally requires source parity and an explicitly configured staging smoke run. See [validation instructions](docs/validation.md), [scope](docs/scope.md), and [implementation provenance](PROVENANCE.md). Passing local tests is **not** a live A–Z validation claim.
357
-
358
- ## CI and npm releases
359
-
360
- `npm run ci` runs local checks, generated-reference validation, docs build and clean package installation. GitHub Actions validates macOS/Linux and focused native Windows contracts on Node 22.23.4/24.22.1 and produces a tested `npm-candidate` artifact. Version tags trigger a separate npm OIDC release workflow; alpha/beta/rc versions publish to their own channels. Publication requires repository metadata, an approved license, npm scope access and trusted-publisher setup.
361
-
362
- See [`docs/releasing.md`](docs/releasing.md) in the source repository for first publication, branch/environment setup, version bumps and recovery. This development guide and the docs site are not bundled in the npm package.
363
-
364
- ### Calls settings (CALLS-01)
365
-
366
- `calls settings general|webhook|chat-integration get/set` manages Dashboard Calls settings.
367
- `calls credits list --org-id ORG_UID` reads voucher history with status, start/expiry and balance. An expired voucher's balance does not prove usable credit. For an eligible self-service OWNER with no voucher history, `calls credits claim-trial --org-id ORG_UID --yes` requests the organization's one-time free Calls trial. Without `--yes`, an interactive terminal asks for confirmation (default No), showing the profile, environment and organization UID. JSON/raw output and non-interactive execution require `--yes`. Preview with `--dry-run` (no prompt or `--yes` needed). Activation never claims it automatically. Developer plans are blocked. Grant duration can follow the remaining Chat trial period, so inspect the returned expiry. Grant amount/duration are server-defined; no paid purchase or subscription change is requested. A failed claim may have created a voucher before activation failed, so inspect the list before any recovery and never automatically retry.
368
-
369
- For Direct calls, `--relay-method 'stun&turn'` tries P2P/STUN first and falls back to TURN; `--relay-method turn` uses server relay only. Direct-call cloud recording prevents relay changes. These meanings are also in help, `describe`, and response schemas.
370
-
371
- `calls settings push get` reads Calls activation and the shared Push switch without changing it.
372
- `calls activate --org-id ORG_UID --app-id APP_ID --yes` registers Calls on an existing app in its current region. It requires `organization.applications.all`; Gate enforces eligibility and regional availability. Read the activation state first. Registration includes independent app-state readback. After confirmed activation, eligible human terminals offer a separate free-trial confirmation (default No). Existing voucher history skips the offer. `--yes` alone is not credit consent.
373
-
374
- To create/activate and request the organization's one-time trial in one invocation, explicitly add `--claim-trial`:
375
-
376
- ```sh
377
- sendbird --profile staging --org-id ORG_UID app create --app-name 'Calls demo' --region REGION --is-calls-enabled true --claim-trial --yes
378
- sendbird --profile staging --org-id ORG_UID --app-id APP_ID calls activate --claim-trial --yes
19
+ sendbird --help
379
20
  ```
380
21
 
381
- These are alternative paths (new or existing app). `--no-claim-trial` skips both the offer and request. JSON/raw and non-TTY execution never prompt or claim without `--claim-trial`. `--dry-run --claim-trial` previews both steps without requests or prompts. The trial requires confirmed activation and the same eligibility checks as the standalone command; existing voucher history, including expired/depleted vouchers, is skipped.
382
-
383
- An attempted/offered follow-up appears separately in `result.calls_trial` (`--raw`: `calls_trial`), with `status` = `accepted`, `skipped`, `declined`, or `failed`. Primary success keeps its normal exit code and receipt even when credits fail; agents must inspect this field as well as the primary `ok`. Accepted trial details are in `calls_trial.result.voucher` and `calls_trial.result.readback`. Never repeat app creation/activation to recover a credit failure: inspect `calls credits list`, then use the standalone command only if a new request is appropriate and authorized. This is not an atomic transaction, and no paid credits are purchased.
22
+ Sign in through your browser and select an organization and app.
23
+ Use `--json` for scripts and `--dry-run` to preview supported changes.
384
24
 
385
- `calls push list/create/update/delete --push-type apns_voip|calls_apns_remote|fcm_voip|huawei_voip` manages VoIP credentials.
386
- All writes require `--yes`; `--dry-run` makes no API calls. Webhook URLs, APNs passwords,
387
- and Huawei secrets use `--body-file` (or stdin). APNs/FCM uploads use `--credential-file`; same-format APNs metadata updates may reuse the existing certificate.
388
- Credential bytes are not saved in CLI configuration. Acknowledged writes include readback
389
- state; failed readback never causes an automatic repeated write. Actual calling, rooms,
390
- call history and credit purchases remain outside this scope.
391
- See the locally built **Calls settings** guide for private input examples and verification limits.
25
+ ## AI coding agents
392
26
 
393
- Local/interactive commands that do not implement previews reject `--dry-run`
394
- before credential access, network requests or settings writes. Inspect them with
395
- `--help` or `--example` instead. This also applies to network reads such as
396
- `auth status` and `doctor`, whose authentication may refresh a grant. Email
397
- verification previews do not read private token files or prompt. SDK list replay is capped at page 100; a null
398
- `next_page` with `has_more=true` signals the ceiling, not the end of the dataset.
399
- Translation results include the language-keyed `translations` field.
400
-
401
- ## Agent plugin and guided onboarding
402
-
403
- The plugin contains the operational `sendbird` Skill and the `sendbird-setup` onboarding Skill. It is CLI-first, with no hosted MCP server or automatic install hooks. [Claude Code prompt](onboarding/claude-code.md) and [Codex prompt](onboarding/codex.md) guide installation, browser approval, existing org/app selection, a choice to save defaults, optional authorized Chat practice and an explicit customer-code handoff.
404
-
405
- ```sh
406
- # Shared marketplace (requires access and a published catalog).
407
- claude plugin marketplace add sendbird/sendbird-plugins
408
- claude plugin install sendbird-cli@sendbird
409
- # Or:
410
- codex plugin marketplace add sendbird/sendbird-plugins
411
- codex plugin add sendbird-cli@sendbird
412
- ```
413
-
414
- For a private/local alpha, choose a new output directory. Its isolated
415
- `sendbird-cli-local` catalog can coexist with the shared marketplace:
27
+ Register the bundled Skill for your coding tool:
416
28
 
417
29
  ```sh
418
- npm run plugins:build -- /absolute/new-marketplace
419
- claude plugin marketplace add /absolute/new-marketplace
420
- claude plugin install sendbird-cli@sendbird-cli-local
421
- # Or:
422
- codex plugin marketplace add /absolute/new-marketplace
423
- codex plugin add sendbird-cli@sendbird-cli-local
30
+ sendbird skills install --agent claude --scope project
31
+ # Or, for Codex:
32
+ sendbird skills install --agent codex --scope project
424
33
  ```
425
34
 
426
- Start a new session and invoke `/sendbird-cli:sendbird-setup` in Claude Code or `$sendbird-cli:sendbird-setup` in Codex. Its dependency-free installer verifies the CLI version and command capabilities, uses a checksummed bundled tarball when supplied, and supports npm or an isolated build of the trusted source checkout. It does not change shell rc files, overwrite an unmanaged executable, authenticate, or mutate remote resources. Use its returned executable to avoid an old npm link.
427
-
428
- The `sendbird` marketplace is maintained only in `sendbird/sendbird-plugins`, where one shared `.claude-plugin/marketplace.json` catalog provides entries for `sendbird-cli` and `sendbird-client` that both hosts read. This repository provides the CLI plugin manifests and skills, without a repository marketplace catalog. Shared catalog publication and access are prerequisites; this is not a listing in either host's public directory. See [marketplace migration and release coordination](docs/plugin-marketplace.md). The CLI npm package is not assumed published. Ordinary SDK practice keeps user tokens in memory; application API token management remains excluded. Customer-app work follows the person's selected mode: native plugin information/use, temporary ZIP execution with a pre-execution notice, or no client assistance. Native installation stays in the official host flow. Explicitly requested guide-only work remains in the current conversation; it never silently switches to ZIP execution.
429
-
430
- ### Application features
35
+ See the [Claude Code](https://github.com/sendbird/sendbird-cli/blob/main/onboarding/claude-code.md) or [Codex](https://github.com/sendbird/sendbird-cli/blob/main/onboarding/codex.md) setup guide for plugin installation.
431
36
 
432
- Read Dashboard feature activation snapshots with `sendbird app feature list`. Preview a change with `sendbird app feature set --feature poll --enabled true --dry-run`, then use `--yes` within the authorized org/app. These commands do not purchase or change a plan; usage charges may apply under the current subscription. Inspect `readback.status` and read the current settings before retrying. Data Export is excluded. See the generated `app-features` guide for filter coupling and Message Search migration restrictions.
37
+ ## Documentation
433
38
 
434
- For source coverage, command execution evidence, the 100% target and worker/native boundaries, see [testing contracts](docs/testing.md).
435
-
436
- ### Interpreting account and app output
437
-
438
- `auth status` shows the server-reported role and up to 12 distinct permission entries; use `--json` for the complete list. An absent permission list is unknown, not an empty grant. Organization identifiers are labeled **Organization UID** in human output; JSON keys and `--org-id` remain unchanged.
439
-
440
- `app get` labels Supergroup, Reactions and Poll as reported enabled/disabled or not reported. These come from `current_premium_features`, a plan snapshot, and do not establish runtime support or denial. `describe app get` and its response schema explain the same boundary for agents. For a Supergroup creation rejection with code 400108, use the returned context-bound `doctor` command to inspect prerequisites; do not infer the cause from the code alone or automatically change roles/features.
441
-
442
- The setup Skill asks whether to save the selected org/app in the profile; making a profile globally active is a separate choice. It offers Chat practice only as an optional next step. Setup alone does not authorize creating test users/channels or sending messages. A prior explicit choice/authorization is reused.
443
-
444
- ### Understanding numeric response values
445
-
446
- Human output labels verified enum values, for example `Token required (2)` or
447
- `Detect only (3)`. JSON and raw responses retain their original numbers. Agents
448
- can read the meanings without credentials or network access:
449
-
450
- ```sh
451
- sendbird --json describe app auth-policy get
452
- sendbird chat settings get --response-schema --json
453
- ```
39
+ - [Command reference](https://github.com/sendbird/sendbird-cli/blob/main/references/commands.md)
40
+ - [Windows setup](https://github.com/sendbird/sendbird-cli/blob/main/docs/windows.md)
41
+ - [Development](https://github.com/sendbird/sendbird-cli/blob/main/docs/development.md)
42
+ - [Release notes](https://github.com/sendbird/sendbird-cli/blob/main/CHANGELOG.md)
43
+ - [Security](https://github.com/sendbird/sendbird-cli/blob/main/SECURITY.md)
454
44
 
455
- Read `value_semantics.fields` in `describe`, or `x-sendbird-value-semantics` in
456
- response schemas. Paths are relative to `result`; original API fields are at the response root with `--raw`, which omits CLI-added `readback` fields;
457
- `*` means an array item. Unknown codes remain unknown. Meaning metadata does not
458
- expand writable inputs or prove effective permissions.
45
+ Proprietary software. See [LICENSE](https://github.com/sendbird/sendbird-cli/blob/main/LICENSE) and [third-party notices](https://github.com/sendbird/sendbird-cli/blob/main/NOTICE.md).
package/dist/cli.js CHANGED
@@ -376,7 +376,7 @@ export function createProgram(sink) {
376
376
  }, humanMode(program.opts()));
377
377
  });
378
378
  const docsSearch = node("docs search")
379
- .description("Search the bundled index of guide and tutorial sections offline")
379
+ .description("Search the bundled official Sendbird Tools guide index offline")
380
380
  .argument("<query...>", "Words or task description, up to 256 characters; quotes optional")
381
381
  .option("--limit <count>", "Maximum 1–20 sections (default 10)")
382
382
  .option("--offset <count>", "Result offset for the next page");