A TUI tool that exports Kilo chat sessions from kilo.db into clean, readable Markdown files — with full metadata preservation.
kiloo/
├── kilo.py ← the exporter (run this)
├── kilo.db ← the database
├── kilo.db-shm ← SQLite WAL shared memory (auto-generated)
├── kilo.db-wal ← SQLite WAL log (auto-generated)
├── exports/ ← generated .md files land here
├── prompts/
│ ├── compact.md ← compression prompt (use when archiving a session)
│ └── resume.md ← resume prompt (use when starting from a compact)
└── data/ ← placeholder for future data
- Python 3.10+
textual(pip install textual)
python kilo.pyNavigate the list with arrow keys, press Enter on a session to export it, press Q to quit. Toggle between showing 4 and all sessions with the Show More / Show Less button.
Output files go into exports/ with the session title as filename.
- Select the session in the TUI → it exports to
exports/<title>.md
- Take that
.mdfile, paste it afterprompts/compact.md, send it to a fresh conversation - Save the output — that's your compact session
- Start a new Kilo session, paste
prompts/resume.md, then your compact session, then your question
- Session stats — total input/output/thinking tokens, cache reads
- Role — clearly distinguished USER vs MODEL blocks
- Per-message metadata — provider, model, stop reason, elapsed time, CWD, shell
- Tool calls — type, status (✅/❌), custom input summary, output preview (truncated)
- Steps — structured
### Step/---dividers with stop reason footnotes - Code blocks — auto-detected and wrapped in
```text - All mojibake fixed — double-encoded UTF-8 characters restored
| File | Purpose |
|---|---|
prompts/compact.md |
Historian compression — paste your export + this prompt to generate a compact session |
prompts/resume.md |
Session resume — paste this + your compact session + your new message to continue |