Slack app for running Claude Code CLI commands
Project description
Claude Code, but in Slack. Access Claude Code remotely from any device, or use it full-time for a better UI experience.
Why Slack?
| Feature | Terminal | Slack |
|---|---|---|
| Code blocks | Plain text | Syntax-highlighted with copy button |
| Long output | Scrolls off screen | "View Details" modal |
| Permissions | Y/n prompts | Approve/Deny buttons |
| Parallel work | Multiple terminals | Threads with isolated sessions |
| File sharing | cat or copy-paste |
Drag & drop with preview |
| Notifications | Watch the terminal | Alerts when tasks complete |
All Claude Code commands work the same way: /clear, /compact, /model, /mode, /add-dir, /review, plus filesystem and git commands.
Commands
| Category | Command | Description |
|---|---|---|
| CLI | /init |
Initialize Claude project configuration |
| CLI | /memory |
View/edit Claude's memory and context |
| CLI | /review |
Review code changes with Claude |
| CLI | /doctor |
Diagnose Claude Code installation issues |
| CLI | /stats |
Show session statistics |
| CLI | /context |
Display current context information |
| CLI | /todos |
List and manage todos |
| Session | /clear, /compact |
Clear session or compact context |
| Session | /cost |
Show session cost |
| Session | /pty, /sessions, /session-cleanup |
PTY session management |
| Navigation | /ls, /cd, /pwd, /add-dir |
Directory navigation |
| Git | /status, /diff, /commit, /branch |
Git operations |
| Config | /model, /mode, /permissions, /notifications |
Configuration |
| Queue | /q <cmd>, /qv, /qc, /qr <id> |
Command queue management |
| Jobs | /st, /cc, /esc |
Job control |
| Multi-Agent | /task, /tasks, /task-cancel |
Multi-agent task management |
Installation
Prerequisites
- Python 3.10+
- Claude Code CLI installed and authenticated
1. Install dependencies
cd slack-claude-code
poetry install
2. Create Slack App
Go to https://api.slack.com/apps → "Create New App" → "From scratch"
Socket Mode: Enable and create an app-level token with connections:write scope (save the xapp- token)
Bot Token Scopes (OAuth & Permissions):
chat:write,commands,channels:history,app_mentions:read,files:write
Event Subscriptions: Enable and add message.channels, app_mention
App Icon: In "Basic Information" → "Display Information", upload assets/claude_logo.png from this repo as the app icon
Slash Commands (optional): Create commands like /clear, /model, /ls, /cd, /status, /diff, etc.
3. Configure and run
cp .env.example .env
# Add your tokens: SLACK_BOT_TOKEN, SLACK_APP_TOKEN, SLACK_SIGNING_SECRET
poetry run python run.py
Usage
Type messages in any channel where the bot is present. Each Slack thread maintains an independent Claude session with its own working directory and context.
Key Features
- Threads = Sessions: Each thread has isolated context;
/clearonly affects that thread - File Uploads: Drag & drop files—Claude sees them instantly (code, images, PDFs)
- Smart Context: Frequently-used files are automatically included in prompts
- Streaming: Watch Claude's responses as they're generated
Plan Mode
/mode plan
Claude creates a detailed plan before execution, shown with Approve/Reject buttons. Ideal for complex implementations where you want to review the approach first.
Configuration
Key environment variables (see .env.example for full list):
# Required
SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
SLACK_SIGNING_SECRET=...
# Optional
DEFAULT_WORKING_DIR=/path/to/projects
COMMAND_TIMEOUT=300 # 5 min default
CLAUDE_PERMISSION_MODE=approve-all # or: prompt, deny
AUTO_APPROVE_TOOLS=Read,Glob,Grep,LSP
Architecture
src/
├── app.py # Main entry point
├── config.py # Configuration
├── database/ # SQLite persistence (models, migrations, repository)
├── claude/ # Claude CLI integration (executor, streaming)
├── pty/ # PTY session management (session, pool, parser)
├── handlers/ # Slack command handlers
├── agents/ # Multi-agent orchestration (planner→worker→evaluator)
├── approval/ # Permission & plan approval handling
├── git/ # Git operations (status, diff, commit, branch)
├── hooks/ # Event hook system
├── question/ # AskUserQuestion tool support
├── tasks/ # Background task management
└── utils/ # Formatters, helpers, validators
Troubleshooting
| Problem | Solution |
|---|---|
| Configuration errors on startup | Check .env has all required tokens |
| Commands not appearing | Verify slash commands in Slack app settings |
| Timeouts | Increase COMMAND_TIMEOUT |
| PTY session errors | Use /pty → "Restart Session" |
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file slack_claude_code-0.1.1.tar.gz.
File metadata
- Download URL: slack_claude_code-0.1.1.tar.gz
- Upload date:
- Size: 94.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08d188cd2e1bb510ff14af50b0f494362c3f0ac6dac2f44bb2909cb9542d86d4
|
|
| MD5 |
aa0044761e5cecac62228607febcae3c
|
|
| BLAKE2b-256 |
14233861d0a7b736f09666e4554f40e75c0f1277ffbad234718bdc0406b1b01d
|
Provenance
The following attestation bundles were made for slack_claude_code-0.1.1.tar.gz:
Publisher:
release.yml on djkelleher/slack-claude-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slack_claude_code-0.1.1.tar.gz -
Subject digest:
08d188cd2e1bb510ff14af50b0f494362c3f0ac6dac2f44bb2909cb9542d86d4 - Sigstore transparency entry: 833495734
- Sigstore integration time:
-
Permalink:
djkelleher/slack-claude-code@34f7e9c363ecba88fe89230892409b8ec37bd1ad -
Branch / Tag:
refs/heads/main - Owner: https://github.com/djkelleher
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@34f7e9c363ecba88fe89230892409b8ec37bd1ad -
Trigger Event:
push
-
Statement type:
File details
Details for the file slack_claude_code-0.1.1-py3-none-any.whl.
File metadata
- Download URL: slack_claude_code-0.1.1-py3-none-any.whl
- Upload date:
- Size: 125.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
eb5c491bf68fd180e7d045fa51758569a49e57ce9ac8554d08cab7ab22528537
|
|
| MD5 |
a82db623599b46435129c8fee462f20e
|
|
| BLAKE2b-256 |
73ad9001e9eabf8fecb2d5151393f5a944f572cbfd8105e3e925b4b08902e759
|
Provenance
The following attestation bundles were made for slack_claude_code-0.1.1-py3-none-any.whl:
Publisher:
release.yml on djkelleher/slack-claude-code
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
slack_claude_code-0.1.1-py3-none-any.whl -
Subject digest:
eb5c491bf68fd180e7d045fa51758569a49e57ce9ac8554d08cab7ab22528537 - Sigstore transparency entry: 833495736
- Sigstore integration time:
-
Permalink:
djkelleher/slack-claude-code@34f7e9c363ecba88fe89230892409b8ec37bd1ad -
Branch / Tag:
refs/heads/main - Owner: https://github.com/djkelleher
-
Access:
private
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@34f7e9c363ecba88fe89230892409b8ec37bd1ad -
Trigger Event:
push
-
Statement type: