Utility commands help you manage message queues, undo mistakes, and maintain your Kimaki installation.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.
/queue
Queue a message to send automatically after the current response finishes.Parameters
message(required) - The message to queue
Usage
Behavior
If a session is actively responding:- Adds the message to the queue for that thread
- Shows: “Message queued (position: 1). Will be sent after current response.”
- When the current response completes, sends the queued message automatically
- Sends the message immediately
- Shows: ”» Your Name: Now add error handling”
Queueing vs. Sending: Use
/queue instead of regular messages to avoid interrupting the AI mid-response. Queued messages send in order after each response completes.Example Workflow
Multiple Users
Each thread has its own queue shared by all users:/clear-queue
Clear all queued messages in the current thread.Parameters
None.Usage
Behavior
- Removes all messages from the thread’s queue
- Shows: ”🗑 Cleared 3 queued messages”
- Does not affect the currently running response
No Undo: Clearing the queue is permanent. Queued messages are lost.
When to Use
- You queued messages but changed your mind
- The AI is heading in a different direction
- You want to abort and start fresh
/undo
Undo the last assistant message, reverting all file changes it made.Parameters
None.Usage
Behavior
</Steps>
<Note>
**Git Required**: Undo uses git to revert changes. It only works in git repositories.
</Note>
### Multiple Undos
You can undo multiple times:
Each `/undo` reverts the most recent assistant message that hasn't been undone yet.
### What Gets Reverted
- **File edits**: `write`, `edit` tool calls
- **Deleted files**: Restored from git
- **New files**: Removed
**Not reverted**:
- Bash commands (can't undo side effects)
- External API calls (MCP tools)
- Manual changes you made after the message
## /redo
Redo the last undone message, restoring the changes.
### Parameters
None.
### Usage
### Behavior
1. Checks if the session has a revert state
2. Calls `session.unrevert({ sessionID })` to restore the changes
3. Shows: "⏩ Restored - session back to previous state"
<Note>
**Single Redo**: Kimaki only tracks the most recent undo. You can't redo multiple times.
</Note>
### Undo/Redo Example
### When to Use
- You undid by mistake
- You reviewed the changes and decided they were good
- You want to compare before/after by toggling undo/redo
## /upgrade-and-restart
Upgrade Kimaki to the latest version and restart the bot.
### Parameters
None.
### Usage
### Behavior
<Steps>
### Check for Updates
Kimaki checks npm for the latest published version:
```bash
npm view kimaki version
Graceful Restart: Active sessions continue seamlessly. The new process reconnects to existing threads.
Version Display
If already on the latest version:Manual Restart
You can also restart without upgrading:Queue Internals
Kimaki manages queues in-memory:- User runs
/queue - Message added to
messageQueues.get(threadId) - Current session completes
session-handlerchecks queue- Pops first message and sends it
- Repeats until queue is empty
/clear-queueempties the array/abortclears the queue for that session- Bot restart clears all queues (in-memory only)
Best Practices
Use /queue for follow-ups
Use /queue for follow-ups
When the AI is working, queue your next tasks instead of waiting:
Undo early and often
Undo early and often
If the AI makes a mistake, undo immediately:This is faster than asking the AI to fix it manually.
Upgrade regularly
Upgrade regularly
Run
/upgrade-and-restart weekly to get:- Bug fixes
- Performance improvements
- New features