You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The CLI automatically selects the correct token (bot vs user) for each
command. Docs, skill, and auth status now reflect this clearly so agents
don't need to think about --as-bot. Added missing users.profile:read
scope needed for `slackbuzz status`.
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy file name to clipboardExpand all lines: README.md
+13-5Lines changed: 13 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -149,15 +149,23 @@ slackbuzz digest
149
149
150
150
## Token types
151
151
152
-
SlackBuzz uses two types of Slack tokens:
152
+
SlackBuzz uses two types of Slack tokens. **The CLI automatically selects the correct token for each command** — you don't need to specify which to use.
153
153
154
-
| Token | Prefix | Used for |
155
-
|-------|--------|----------|
156
-
|**Bot token**|`xoxb-`| Sending messages, reading channels, reactions, emoji list |
157
-
|**User token**|`xoxp-`| Search, activity inbox, saved items, status management |
154
+
| Token | Prefix | Automatic usage |
155
+
|-------|--------|-----------------|
156
+
|**Bot token**|`xoxb-`| Reading channels/users, reactions, system notifications (`notify`) |
Messages post as the authenticated user by default. Pass `--as-bot` on `message send`, `edit`, or `delete` to post as the bot app instead.
158
160
159
161
The `slackbuzz app create` command creates a Slack app pre-configured with all required scopes for both token types. After installing the app to your workspace, paste both tokens when prompted.
Copy file name to clipboardExpand all lines: docs/src/content/docs/commands.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,27 @@ description: Complete reference for all slackbuzz CLI commands and flags.
7
7
8
8
All commands are invoked as subcommands of `slackbuzz`. Run `slackbuzz --help` for a summary, or `slackbuzz <command> --help` for details on any command.
9
9
10
+
## Token selection
11
+
12
+
The CLI automatically picks the correct token (bot or user) for each command. You don't need to think about it — just run the command.
13
+
14
+
| Command | Token | Why |
15
+
|---------|-------|-----|
16
+
|`message send`, `edit`, `delete`|**User**| Posts as the authenticated user |
Both tokens are stored separately in the keyring. The `slackbuzz app create` command creates a Slack app pre-configured with all required scopes for both token types.
Two token types are required. **The CLI automatically selects the right token for each command — you do not need to specify which to use.**
28
+
29
+
-**Bot token** (`xoxb-`): Used automatically for reading channels, listing users, reactions, and system notifications
30
+
-**User token** (`xoxp-`): Used automatically for sending messages (as the user), search, DMs, saved items, status, and profile
31
+
32
+
Messages always post as the authenticated user by default. Only use `--as-bot` if you specifically want a message to come from the bot app rather than the user.
30
33
31
34
## Messaging
32
35
@@ -189,14 +192,37 @@ slackbuzz user list
189
192
slackbuzz user info @alice
190
193
```
191
194
195
+
## Token Defaults
196
+
197
+
The CLI automatically selects the correct token for each command. You do not need to think about bot vs user mode — just run the command.
198
+
199
+
| Command | Token | Rationale |
200
+
|---------|-------|-----------|
201
+
|`message send`, `edit`, `delete`|**User**| Posts as the authenticated user |
|`activity`, `threads`, `digest`|**User**| Slack search API (user-only) |
209
+
|`dm list`|**User**| Slack search API (user-only) |
210
+
|`message search`, `file search`|**User**| Slack search API (user-only) |
211
+
|`later list`, `add`, `remove`|**User**| Stars API (user-only) |
212
+
|`status`, `status set`, `clear`|**User**| Profile API (user-only) |
213
+
214
+
**Override:** Pass `--as-bot` on `message send`, `edit`, or `delete` to post as the bot app instead of the user. Only do this when explicitly requested.
215
+
216
+
**Missing permissions:** If a command fails due to a missing token or scope, the error message will indicate what's needed. Run `slackbuzz auth status` to check available capabilities.
217
+
192
218
## Common Flags
193
219
194
220
| Flag | Description |
195
221
|------|-------------|
196
222
|`--json`| Output as JSON |
197
223
|`--jq <expr>`| Filter JSON with jq expression |
198
224
|`--template <tmpl>`| Format with Go template |
199
-
|`--as-bot`|Use bot token instead of user token (message send) |
225
+
|`--as-bot`|Post as the bot app instead of the user (send/edit/delete only) |
200
226
|`--since <duration>`| Time filter (2h, 1d, 7d, 2w, or YYYY-MM-DD) |
201
227
|`--limit <n>`| Max results |
202
228
@@ -233,11 +259,12 @@ The CLI automatically strips common shell escape artifacts from message text bef
233
259
234
260
## Key Behaviors
235
261
262
+
-**Automatic token selection**: The CLI picks the right token (bot or user) for each command. No need to specify — just run the command. Use `--as-bot` only when explicitly asked to post as the bot.
236
263
-**DM auto-detection**: `@user`, `U...` IDs, and bare names auto-resolve to DM channels (for the channel/target argument)
237
264
-**@mentions in message body**: Auto-resolved from `@name` to Slack's `<@USERID>` format before posting
238
265
-**First-name shorthand**: `@herman` resolves to `herman.gorbatovskii` or `Herman Gorbatovskii` when unambiguous
239
266
-**Shell unescape**: Common shell artifacts like `\!` are cleaned before sending
240
267
-**Case-insensitive resolution**: User lookup matches display names and usernames regardless of case
241
-
-**Dual tokens**: Bot token for channel ops, user token for search/DMs/status
268
+
-**Permission feedback**: Missing tokens or scopes produce clear error messages. Use `slackbuzz auth status` to check capabilities.
242
269
-**Deeplinks**: Output includes clickable Slack deeplinks
243
270
-**Cross-tool**: Digest combines Slack, ClickUp, and GitHub activity
0 commit comments