| name | slack-personal |
| description | Read, send, search, and manage Slack messages and DMs via the slacklane CLI. Supports multiple workspaces with switching. Use when the user asks to check Slack, read channels or DMs, send Slack messages, search Slack, check unreads, manage drafts, view saved items, switch Slack workspaces, or interact with Slack workspace. Also use for heartbeat Slack checks. Triggers on "check slack", "any slack messages", "send on slack", "slack unreads", "search slack", "slack threads", "draft on slack", "read slack dms", "message on slack", "switch workspace", "slack workspaces". |
| homepage | https://www.npmjs.com/package/slacklane |
| metadata | {"moltbot":{"emoji":"💬","requires":{"bins":["slacklane","slk"]},"install":[{"id":"npm","kind":"node","package":"slacklane","bins":["slacklane","slk"],"label":"Install slacklane (npm)"}],"os":["darwin"]}} |
slacklane — Slack CLI
Session-based Slack CLI for macOS. Auto-authenticates from the Slack desktop app — no tokens, no OAuth, no app installs. Acts as your user (xoxc- session tokens).
Commands
slacklane auth
slacklane channels
slacklane dms
slacklane users
slacklane read <channel> [count]
slacklane read @username [count]
slacklane read <channel> --threads
slacklane read <channel> --from 2026-02-01
slacklane thread <channel> <ts> [count]
slacklane search <query> [count]
slacklane send <channel> <message>
slacklane send <channel> <message> --thread <ts>
slacklane react <channel> <ts> <emoji>
slacklane reply <channel> <ts> <message>
slacklane message link <channel> <ts>
slacklane message show <channel> <ts>
slacklane message context <channel> <ts> [before] [after]
slacklane workspace list
slacklane workspace use <name|domain|id>
slacklane workspace current
slacklane inbox activity
slacklane inbox unread
slacklane inbox saved [count] [--all]
slacklane inbox starred
slacklane channel pins <channel>
slacklane draft list
slacklane draft channel <channel> <message>
slacklane draft thread <ch> <ts> <message>
slacklane draft dm <user_id|@username> <message>
slacklane draft drop <draft_id>
slacklane workspaces
slacklane switch <name|domain|id>
slacklane activity
slacklane unread
slacklane starred
slacklane saved [count] [--all]
slacklane pins <channel>
slacklane drafts
slacklane draft <channel> <message>
slacklane draft user <user_id> <message>
slacklane permalink <channel> <ts>
slacklane show <channel> <ts>
slacklane context <channel> <ts> [before] [after]
Channel accepts name (general), ID (C08A8AQ2AFP), @username for DMs, or user ID (U07RQTFCLUC).
Auth
Automatic — extracts session tokens from Slack desktop app's LevelDB (localConfig_v2) + decrypts cookie from macOS Keychain.
First run: macOS will show a Keychain dialog asking to allow access to "Slack Safe Storage":
- Allow — one-time access, prompted again next time
- Always Allow — permanent, no future prompts (convenient but any process running as your user can extract credentials silently)
- Deny — blocks access, slacklane cannot authenticate
Token cache: ~/.local/slacklane/token-cache.json — auto-validated, auto-refreshed on invalid_auth.
Active workspace: ~/.local/slacklane/active-workspace — stores the selected team ID. Delete to reset to default.
Runtime coordination: ~/.local/slacklane/runtime/ — shared pacing + 429 cooldown state for concurrent local slacklane processes.
If auth fails (token rotated, Slack logged out):
rm ~/.local/slacklane/token-cache.json
slacklane auth
Slack desktop app must be installed and logged in. Does not need to be running if token is cached.
Workspaces
All workspaces logged in to the Slack desktop app are available. Tokens are extracted from localConfig_v2 in LevelDB.
slacklane workspace list
slacklane workspace current
slacklane workspace use candid
slacklane workspace use unipad-team
slacklane workspace use T05BFH4UW5T
slacklane auth
Legacy aliases slacklane workspaces and slacklane switch ... still work, but the workspace ... family is the canonical surface.
The workspace use command matches against workspace name, domain, or team ID (case-insensitive, partial match supported). After switching, all subsequent commands operate on the selected workspace until switched again.
Reading Threads
Threads require a Slack timestamp. Use --ts to get it, then read the thread or act on one exact message:
slacklane read general 10 --ts
slacklane thread general 1769753479.788949
slacklane reply general 1769753479.788949 "on it"
slacklane send general "same effect via send" --thread 1769753479.788949
slacklane message link general 1769753479.788949
slacklane message show general 1769753479.788949
slacklane message context general 1769753479.788949 2 2
Agent Workflow Examples
- Heartbeat/cron unread check —
slacklane inbox unread → slacklane read <channel> for channels that need attention
- Save & pick up — Human saves threads in Slack ("Save for later"). Agent runs
slacklane inbox saved during heartbeat, reads full threads with slacklane thread, summarizes or extracts action items
- Daily channel digest —
slacklane read <channel> 100 across key channels → compile decisions, open questions, action items → slacklane send daily-digest "📋 ..."
- Weekly DM summary —
slacklane read @boss 200 --from 2026-02-01 --threads → extract action items, decisions, context
- Thread monitoring —
slacklane thread <channel> <ts> to inspect the thread, then slacklane reply <channel> <ts> "..." or slacklane send <channel> "..." --thread <ts> to answer in place
- Message-level navigation —
slacklane message link <channel> <ts> for the permalink, slacklane message show <channel> <ts> for the exact item, slacklane message context <channel> <ts> for surrounding context
- Draft for human review —
slacklane draft channel <channel> "..." posts to Slack's editor UI for human to review before sending
- Search-driven context —
slacklane search "deployment process" or slacklane channel pins <channel> to pull context before answering questions
- Concurrent local automation — Multiple agents or cron jobs can invoke
slacklane safely; requests are paced through one shared local runtime lane and 429 cooldowns propagate automatically
Live Slack integration tests
The repo now supports opt-in real-Slack integration tests in tests/live-slack.test.js.
- Default
npm test remains safe because the live file auto-skips unless SLACKLANE_LIVE_TESTS=1 is set.
- Read-only live verification requires:
SLACKLANE_LIVE_TESTS=1
SLACKLANE_LIVE_CHANNEL
SLACKLANE_LIVE_MESSAGE_TS
- Write verification additionally requires:
SLACKLANE_LIVE_ALLOW_WRITE=1
SLACKLANE_LIVE_THREAD_TS
Run:
npm test
SLACKLANE_LIVE_TESTS=1 SLACKLANE_LIVE_CHANNEL=general SLACKLANE_LIVE_MESSAGE_TS=1769753479.788949 npm run test:live
SLACKLANE_LIVE_TESTS=1 SLACKLANE_LIVE_ALLOW_WRITE=1 SLACKLANE_LIVE_CHANNEL=general SLACKLANE_LIVE_MESSAGE_TS=1769753479.788949 SLACKLANE_LIVE_THREAD_TS=1769753479.788949 npm run test:live
The write tests intentionally require a second opt-in so they do not post to Slack by accident.
Limitations
- macOS only — uses Keychain + Electron storage paths
- Session-based — acts as your user, not a bot. Be mindful of what you send
- Draft drop may fail with
draft_has_conflict if Slack has that conversation open
- Session token expires on logout — keep Slack app running or rely on cached token
Missing Features & Issues
Create PR or Report Issue at: https://github.com/kimjisub/slacklane