Quickstart
Get CodeSpar running in under 5 minutes with Slack and start issuing commands to your first AI coding agent.
Quickstart
This guide gets you from zero to a working CodeSpar agent in under 5 minutes. By the end, you will have a running instance connected to Slack, ready to accept @codespar commands.
Prerequisites
- Node.js 22+ and npm 11+
- A Slack workspace where you can install apps
- An Anthropic API key (get one here)
Steps
1. Clone the repository
2. Install dependencies
This installs all packages across the Turborepo monorepo.
3. Configure environment variables
Open .env and set your Anthropic API key:
4. Start CodeSpar with Slack
Run the server with Slack enabled, passing your Slack credentials:
You should see output confirming the server is running and the Slack channel is connected:
5. Send your first command
In any Slack channel where the CodeSpar bot is present, type:
The agent responds with its current state, linked repositories, and autonomy level.
Minimum Environment Variables
| Variable | Required | Description |
|---|---|---|
ANTHROPIC_API_KEY | Yes | Your Anthropic API key for LLM access |
ENABLE_SLACK | No | Set to true to enable the Slack channel (default: false) |
SLACK_BOT_TOKEN | If Slack enabled | Bot token from your Slack app (xoxb-...) |
SLACK_SIGNING_SECRET | If Slack enabled | Signing secret from your Slack app settings |
ENABLE_DISCORD | No | Set to true to enable the Discord channel (default: false) |
DISCORD_BOT_TOKEN | If Discord enabled | Bot token from your Discord application |
ENABLE_TELEGRAM | No | Set to true to enable the Telegram channel (default: false) |
TELEGRAM_BOT_TOKEN | If Telegram enabled | Bot token from BotFather |
ENABLE_WHATSAPP | No | Set to true to enable the WhatsApp channel (default: false) |
WHATSAPP_API_TOKEN | If WhatsApp enabled | API token from WhatsApp Business Platform |
GITHUB_TOKEN | Recommended | GitHub personal access token for repo operations |
LOG_LEVEL | No | Logging verbosity: debug, info, warn, error (default: info) |
What Just Happened?
When you started CodeSpar:
- The core server started on port 3000
- The Slack bridge connected using Socket Mode via your bot token
- A Project Agent was initialized, waiting for commands
- When you typed
@codespar status, the Slack bridge routed the message to the Project Agent, which responded with its state
Next Steps
- Installation guide — Docker Compose, Railway deploy, and production configuration
- First Agent tutorial — link a repo, execute tasks, and review PRs from Slack