Kimaki provides CLI commands for reading and searching past OpenCode sessions without opening Discord.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.
Commands overview
| Command | Description |
|---|---|
session read <sessionId> | Read a session conversation as markdown |
session search <query> | Search past sessions for text or regex patterns |
session archive <threadId> | Archive a Discord thread and stop its session |
session read
Read a complete session conversation as markdown. Useful for reviewing past sessions, grepping for specific content, or exporting conversations.Usage
Options
Project directory to search. Defaults to current working directory.
Examples
Read a session
Save to file
Search within a session
Read from specific project
Behavior
- Current project first: Searches the project in
--project(or cwd) first - Global search: If not found, searches all registered projects
- Output to stdout: Writes markdown directly to stdout (no logging)
- Exit codes: 0 on success, non-zero if session not found
The command connects to the OpenCode server for the project, so the server must be running or will be started automatically.
session search
Search past sessions for text patterns or regular expressions. Find sessions containing specific keywords, error messages, or code patterns.Usage
Options
Project directory to search. Defaults to current working directory.
Discord channel ID. Resolves project directory from the channel mapping.
Maximum matched sessions to return. Default: 20.
Output results as JSON for scripting.
Query syntax
Plain text search
Regex search
Wrap patterns in/ with optional flags:
Examples
Search for keyword
Search with regex
Search specific project
Search from Discord channel
Limit results
JSON output for scripting
Output format
Human-readable format shows:- Session ID
- Match count
- Context snippets with highlighted matches
- Relative timestamps
session archive
Archive a Discord thread and stop its mapped OpenCode session. Useful for cleaning up completed threads programmatically.Usage
Examples
Archive a thread
Archive multiple threads
Behavior
- Validates thread: Ensures the channel is actually a Discord thread
- Stops session: If an OpenCode session is mapped, stops it gracefully
- Archives thread: Marks the Discord thread as archived
- Database cleanup: Updates internal state
Use cases
Audit past conversations
Review what was discussed in previous sessions:Export session history
Backup all sessions for a project:Find sessions with errors
Clean up old threads
Archive threads that haven’t been active:Troubleshooting
Session not found
Session not found
The session ID doesn’t exist in the current project or any registered project. Verify the session ID with Discord’s
/session-id command.OpenCode server won't start
OpenCode server won't start
The project directory may have issues. Check that the directory exists and is a valid OpenCode project.
Search returns no results
Search returns no results
Try broadening your search query or checking that you’re searching the correct project with
--project.Related
- Send command - Start new sessions
- Sessions concept - How sessions work