Skip to main content

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.

The send command creates Discord threads with prompts, triggering the bot running on your machine to start OpenCode sessions. Essential for CI automation and scheduled workflows.

Usage

kimaki send --channel <channel-id> --prompt "your prompt"

Starting a new session

Create a new thread in a channel:
kimaki send \
  --channel 1234567890123456789 \
  --prompt "Review the authentication changes in PR #42"
The bot creates a thread and starts an OpenCode session with your prompt.

Continuing an existing thread

Send a follow-up message to an existing thread:
# By thread ID
kimaki send \
  --thread 9876543210987654321 \
  --prompt "Also check the error handling"

# By session ID
kimaki send \
  --session abc123 \
  --prompt "Run the test suite"

Command options

Required (one of)

--channel
string
Discord channel ID. Creates a new thread. Get this by right-clicking a channel in Discord → Copy Channel ID.
--thread
string
Discord thread ID. Sends to an existing thread instead of creating a new one.
--session
string
OpenCode session ID. Resolves the thread from the session and sends the prompt there.

Required

--prompt
string
The message content to send. Can be a question, instruction, or context.

Optional

--name
string
Thread name. Defaults to a preview of the prompt (first 100 chars). Only used when creating new threads with --channel.
--app-id
string
Bot application ID for validation. Auto-derived from token if not provided.
--notify-only
boolean
Create a notification thread without starting an AI session. Reply to the thread later to start a session with the notification as context.
--worktree
string
Create a git worktree for isolated development. The session runs in a separate branch.Example: --worktree feature-auth creates a worktree named ⬦ feature-auth.
--agent
string
Select a specific agent for the session. Agents are defined in .opencode/agent/*.md files.
--model
string
Select an AI model for the session. Format: provider/model-name (e.g., anthropic/claude-sonnet-4-20250514).
--user
string
Discord user ID to attribute the message to. Useful for tracking who triggered automated sessions.
--send-at
string
Schedule the message for later. Accepts:
  • One-time: UTC ISO timestamp ending with Z (e.g., 2026-03-01T09:00:00Z)
  • Recurring: Cron expression in local timezone (e.g., 0 9 * * 1 for Mondays at 9am)
Cannot be combined with --wait.
--wait
boolean
Wait for the session to complete before exiting. Returns the session result.Cannot be combined with --send-at.

Environment variables

KIMAKI_BOT_TOKEN
string
Discord bot token. Required in CI when credentials aren’t in the database.

Examples

CI automation

GitHub Actions workflow that investigates new issues:
.github/workflows/investigate-issues.yml
name: Investigate New Issues

on:
  issues:
    types: [opened]

jobs:
  investigate:
    runs-on: ubuntu-latest
    steps:
      - name: Start Kimaki Session
        env:
          KIMAKI_BOT_TOKEN: ${{ secrets.KIMAKI_BOT_TOKEN }}
        run: |
          npx -y kimaki send \
            --channel "1234567890123456789" \
            --prompt "Investigate issue ${{ github.event.issue.html_url }}" \
            --name "Issue #${{ github.event.issue.number }}"

Isolated worktree session

Develop a feature in a separate git worktree:
kimaki send \
  --channel 1234567890123456789 \
  --prompt "Add dark mode support" \
  --worktree dark-mode

Notification without AI session

Create a notification that doesn’t immediately start AI processing:
kimaki send \
  --channel 1234567890123456789 \
  --prompt "User @john upgraded to Pro plan" \
  --notify-only
Reply to the thread later to start a session with this context.

Scheduled task

Schedule a weekly test run:
kimaki send \
  --channel 1234567890123456789 \
  --prompt "Run full test suite and report failures" \
  --send-at "0 9 * * 1"  # Every Monday at 9am

Long prompts

For prompts over 2000 characters, Kimaki automatically uploads them as file attachments:
kimaki send \
  --channel 1234567890123456789 \
  --prompt "$(cat detailed-instructions.md)"

Behavior

  1. Message creation: The command sends a Discord message to the specified channel or thread
  2. Bot detection: The running Kimaki bot detects the new message
  3. Session start: Bot starts an OpenCode session with your prompt
  4. Response streaming: AI responses stream back to the Discord thread
  5. Exit: The CLI command exits immediately unless --wait is used
The send command only creates the Discord message. Your Kimaki bot process must be running to pick up the message and start the session.
Use either --channel (new thread) OR --thread/--session (existing thread), never both.

Troubleshooting

Set the KIMAKI_BOT_TOKEN environment variable or run kimaki once to configure credentials in the database.
Ensure the Kimaki bot process is running on your machine. Check the log file at ~/.kimaki/kimaki.log.
Right-click the Discord channel → Copy Channel ID. Enable Developer Mode in Discord settings if the option doesn’t appear.