slacker.sh talks to the Slack Web API with a user token (xoxp-…). A user
token reads every channel you're already in (no per-channel invite), can search
(bots can't), and posts/reacts as you. This guide creates an app from a manifest,
installs it to your workspace, and gets you that token.
- Go to api.slack.com/apps -> "Create New App".
- Choose "From a manifest".
- Pick the workspace to install into, then "Next".
- Paste the contents of
slack-manifest.json(switch the editor to JSON if it defaults to YAML), then "Next" -> "Create". - Review the requested scopes on the summary screen and confirm.
-
Left sidebar -> "OAuth & Permissions".
-
Click "Install to Workspace" (top of that page) -> review -> "Allow".
-
Back on "OAuth & Permissions", copy the "User OAuth Token" — it starts with
xoxp-…. (Use the User token, not a Bot token.) -
Put it in
.envnext toslacker.sh(gitignored, never committed):SLACKER_SH_TOKEN=xoxp-your-token-here
Or export it in your shell:
export SLACKER_SH_TOKEN=xoxp-… -
Verify:
slacker.sh whois @yournameshould print a<user>record.
| Scope | Used by |
|---|---|
channels:history, groups:history, im:history, mpim:history |
read-channel, read-message (public / private / DM / group-DM) |
channels:read, groups:read, im:read, mpim:read |
channel-info, channel/DM resolution, whois --channels |
im:write |
send/read-channel to @user (opens the DM) |
chat:write |
send, edit, delete, schedule |
users:read |
name resolution everywhere, whois, channel-info |
users:read.email |
whois by email, email -> user lookup |
users.profile:write |
status |
search:read |
search |
files:read |
read-file, read-canvas |
files:write |
send --file (upload) |
reactions:write |
react |
pins:read / pins:write |
channel-info (read) / pin (write) |
usergroups:read |
usergroup |
dnd:read |
whois (dnd status) |
canvases:write |
create-canvas / edit-canvas |
Want a read-only install? Keep the *:history, *:read, users:read*,
search:read, files:read, usergroups:read, dnd:read scopes and drop the
write ones (chat:write, files:write, reactions:write, pins:write,
im:write, canvases:write). slacker.sh degrades gracefully — any action that
hits a missing scope prints exactly which scope to add.
- The token acts as you: it sees what you can see, and messages/reactions appear under your name.
- slacker.sh caches
users.list+conversations.listper token under~/.cache/slacker_sh/<hash>/, so switching tokens never crosses workspaces. - It's read-everywhere-you-are by default; there's no bot to invite to channels.
- Externally-shared (Slack Connect) channels aren't returned by the API's
channel list — address those by channel id (
Cxxxx).
The default token (SLACKER_SH_TOKEN) stays the primary setup; extra
workspaces are opt-in:
-
Install the app into the second workspace (step 5 above picks the workspace) and copy its user token.
-
Add it to
.envwith a name:SLACKER_SH_TOKEN_WORK=xoxp-second-workspace-token
-
In the session that should use it, export the selector:
export SLACKER_SH_WORKSPACE=workEvery
slacker.shcommand in that session now talks to that workspace, with no flag or per-command change. Unset it (or use a session without it) to go back to the default token. -
slacker.sh workspaceslists every configured workspace and which one is active. The default token shows asdefault.
- Changing scopes later: edit the app's scopes (or re-paste an updated
manifest under "App Manifest"), then reinstall from "OAuth & Permissions"
and update the token in
.env. New scopes don't apply until you reinstall. - Security: the user token can do anything you can — treat it like a
password. It lives only in
.env, which is gitignored.