Skip to content

Quaii/Kiloo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Kilo Session Exporter

A TUI tool that exports Kilo chat sessions from kilo.db into clean, readable Markdown files — with full metadata preservation.

Project Structure

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

Requirements

  • Python 3.10+
  • textual (pip install textual)

Usage

python kilo.py

Navigate 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.

Workflow

Export a session

  1. Select the session in the TUI → it exports to exports/<title>.md

Compress for archival

  1. Take that .md file, paste it after prompts/compact.md, send it to a fresh conversation
  2. Save the output — that's your compact session

Resume from compact

  1. Start a new Kilo session, paste prompts/resume.md, then your compact session, then your question

What gets exported

  • 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

Prompt files

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

About

Kilo tool to extract your conversations from kilo.db and convert them into Markdown (.md) files.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages