A self-hosted personal AI coding companion. Connects Anthropic's official
claude-codeCLI under the hood to Slack and Discord, powered by a unified workspace and localbrainwaresmemory indexing. Perfect for hosting on Sliplane.
- 💬 Slack & Discord Gateways: Talk to your personal coding agent via Slack direct messages/mentions or a Discord channel.
- 🐚 Interactive Claude Code CLI: Runs
@anthropic-ai/claude-codeunder the hood inside a pseudoterminal (PTY) session, capturing its rich output and piping your chat inputs back to it. - 🧠 Brainwares Vault Support: Operates on a single, shared workspace utilizing the
bwCLI. Updates code-linked memories and logs conceptual markdown notes (guides, tasks, plans) without code files. - 🎛️ Command Line Config (
sca): A clean TypeScript-based CLI to configure your Slack tokens, Discord tokens, API keys, and workspace directory. - 🐳 Sliplane / Docker Ready: Fully containerized multi-stage build compiling the Rust
bwCLI and packing the Node/TypeScript daemon.
To test or run locally, install dependencies and link the sca command:
git clone https://github.com/SpaceCorps/sc-agent.git
cd sc-agent
npm install
npm run build
npm linkThis registers the global sca executable on your system.
Use the sca config utility to set up your integration credentials:
# Configure Anthropic API Key
sca config set anthropic_api_key "sk-ant-..."
# Configure Slack Bot integration (Socket Mode)
sca config set slack_bot_token "xoxb-..."
sca config set slack_app_token "xapp-..."
# Configure Discord Bot integration
sca config set discord_token "..."
# (Optional) Customize the workspace directory
sca config set workspace_path "/Users/yourname/workspace"Verify your setup by running:
sca statusStart the bot runner daemon in the foreground:
sca start| Command | Arguments | Description |
|---|---|---|
sca start |
None | Starts the Slack and Discord bot listeners in the foreground. |
sca config set |
<key> <value> |
Save a token or setting to ~/.config/sc-agent/config.json. |
sca config get |
<key> |
Print a saved configuration value. |
sca config list |
None | Display all configuration keys (with masked tokens). |
sca status |
None | Verify configuration, detect system CLI tools (bw, claude), and inspect the workspace. |
- When you mention the bot on Slack or Discord, the daemon checks if a PTY session is running for the workspace.
- If none is active, it boots up
npx @anthropic-ai/claude-codeusingnode-pty. - The PTY output is captured, stripped of ANSI color codes, and buffered.
- Once the PTY stream pauses for 1.5 seconds, the daemon forwards the accumulated text block back as a reply.
- Any subsequent reply you send is written to the PTY's
stdin. - To manually terminate or reset the session, send
/cancelor/stopin the chat.
Sliplane will deploy the project using the included Dockerfile.
- Create Service: Link your fork of
SpaceCorps/sc-agenton Sliplane. - Environment Variables: Define the required tokens:
ANTHROPIC_API_KEYSLACK_BOT_TOKENSLACK_APP_TOKENDISCORD_TOKEN
- Mount Storage: Mount a persistent volume at
/workspaceand/root/.configto ensure your configuration and workspace code/git state persist across container restarts.
This project is licensed under the MIT License.