Detailed installation and setup guide for Kimaki.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/remorses/kimaki/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Kimaki automatically installs these tools if they’re missing:- OpenCode - The AI coding agent (opencode.ai)
- Bun - JavaScript runtime (bun.sh)
Installation
Run the setup wizard
-y flag auto-confirms the npx prompt. First run takes longer as npm downloads the package.Create Discord application
When prompted, go to discord.com/developers/applications and:
- Click “New Application”
- Give your application a name (this becomes your bot’s name)
- Navigate to the “Bot” section in the left sidebar
Enable required intents
In the Bot section, scroll to “Privileged Gateway Intents” and enable:
- SERVER MEMBERS INTENT - Required to check user permissions
- MESSAGE CONTENT INTENT - Required to read messages you send
Copy your bot token
Still in the Bot section:
- Click “Reset Token” to generate a new token
- Copy the token (you won’t be able to see it again)
- Paste it into the CLI when prompted
On macOS, pasting into the terminal may add escape characters. The CLI automatically strips these.
Install bot to your server
The CLI generates an install URL like:Open this URL in your browser and select which Discord server to add the bot to.
Select projects to add
The CLI shows all OpenCode projects on your machine. Select which ones to create Discord channels for:Use arrow keys and space to select, then press Enter.
Configuration options
Data directory
By default, Kimaki stores data in~/.kimaki/. Change this with:
discord-sessions.db- SQLite database with bot credentials, channel mappings, session historykimaki.log- Log file (reset on every restart, only contains current run)heap-snapshots/- Memory debugging snapshots
Running multiple instances
To run multiple bot instances on the same machine (e.g., for different teams):Verbosity
Control how much output Kimaki shows in Discord threads:tools-and-text- Show all tool calls and AI responsestext-and-essential-tools- Default; show text and important tools onlytext-only- Only show AI text responses, hide all tool calls
Mention mode
Make the bot only respond when @mentioned:Auto-restart on crash
Automatic worktrees
Create a git worktree for every new session:Voice channels
Enable voice channels for each project (disabled by default):Disable Sentry reporting
Environment variables
KIMAKI_BOT_TOKEN
Set your bot token via environment variable instead of interactive prompt:
KIMAKI_LOCK_PORT
Override the lock port (default: derived from data directory path):
Post-installation
Set up permissions
Only users with these Discord permissions can interact with the bot:- Server Owner - Full access
- Administrator - Full access
- Manage Server - Full access
- “Kimaki” role - Create this role and assign to trusted users
Add more projects later
To add channels for additional projects:Get install URL
To get the bot install URL for adding to another server:Troubleshooting
Bot connects but doesn’t respond
Check that you enabled both required intents:- SERVER MEMBERS INTENT
- MESSAGE CONTENT INTENT
”No OpenCode projects found”
Kimaki only shows projects that OpenCode knows about. Run an OpenCode session in your project first:npx kimaki --add-channels.
Port already in use
If you see “Lock port already in use”, either:- Another Kimaki instance is running - stop it first
- You’re running multiple instances - set different
KIMAKI_LOCK_PORTvalues
Check logs
Kimaki writes detailed logs to~/.kimaki/kimaki.log (or <data-dir>/kimaki.log).
The log file resets on every startup, so it only contains logs from the current run.
Upgrading
Kimaki auto-upgrades in the background. To manually upgrade:Next steps
CLI commands
Learn about CLI commands for automation
Best practices
Set up roles, permissions, and workflows
Automation
Trigger sessions from CI or cron jobs
Architecture
Understand how Kimaki works