Skip to content

About

Browse & Inspect CLI agents : Claude Code, Codex, Gemini CLI code & conversation history

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

49 stars

Watchers

0 watching

Forks

Latest commit

Β 

History

79 Commits

Folders and files

Repository files navigation

Your AI coding agent just edited 30 files across 6 directories.
What actually happened?

Browse every session from Claude Code, OpenAI Codex, and Gemini CLI the thinking, the tool calls, the file changes, the token costs. All in one local interface. Nothing leaves your machine.

What's New β€’ Features β€’ Installation β€’ Usage β€’ Supported Tools β€’ Screenshots

Python 3.10+ FastAPI License MIT PRs Welcome


clicodelog: projects, sessions and a conversation


✨ What's New

🎨 A redesigned, much lighter portal

A clean Material-style interface, rebuilt so the browser only ever holds what you are looking at:

🧠 Huge sessions stay light
Only the messages on screen are rendered. "Load all" on a 22,751-message session used to build 222,310 DOM nodes in 11 seconds; it now loads in 0.6s with about 2,800 nodes, and scrolling stays smooth the whole way through.
πŸ’€ Idle tabs give their memory back
Like a browser's memory saver: leave a tab unused for 5 minutes and it drops everything it loaded (29 MB β†’ 3.4 MB in our test), keeping only where you were. Come back and it reloads just that spot β€” same message, same scroll position. The server does the same with its caches.
πŸš€ Faster to open
40 requests per page load became 4, with no external font downloads. Assets are cached permanently, so a repeat visit fetches nothing but your data.
πŸ” Search that keeps up with typing
Common words that took over a second in full-text search now answer in about 70 ms. A Spotlight-style ⌘K dialog with keyboard navigation opens a result right at the matching message.
🎯 Find in conversation, properly
⌘F or / searches every loaded message (not just what happens to be rendered), highlights the words in place, and steps through matches with Enter.
🧹 Filters that compose
You / Assistant / Tools / Unique only / date range all work together, and changing one never throws you back to the top. Your view preferences are remembered.
πŸŒ— Light and dark that follow your system
A consistent icon set instead of emoji, a sticky toolbar, contextual jump-to-top/bottom buttons, and a project drawer on narrow windows.

⚑ Performance, search and safety

A big round of performance, search and correctness work. Highlights:

πŸ”Ž Full-text search inside conversations
Search what was actually said and done, not just session titles β€” powered by SQLite FTS5 with ranked results, highlighted snippets, and a click straight to the matching message. Opt-in, and it shows the index size before building.
⚑ Everything got dramatically faster
Opening a large project went from 15.5s β†’ 0.25s. A search that used to scan the whole corpus for 15.8s now answers in 11ms. One slow request no longer freezes the entire app.
πŸͺΆ Loads only what's on screen
Sessions and messages are fetched on demand instead of all at once, so memory stays around 22MB no matter how big your history gets. Opening a 966MB session used to need 604MB of RAM β€” now it's 68MB.
πŸ“Š Usage analytics
Token spend by day, project, model and tool. Now counts cache reads and cache writes β€” the old totals left them out, under-reporting real usage by over 100x.
πŸ—‚οΈ File-edit archaeology
"When did an agent last touch auth.py?" Search every session for a file and jump to the exact edit.
▢️ Jump back into a session
One click copies cd <project> && claude --resume <id> so you can pick up where you left off, plus a copy-to-open-in-editor command.
πŸ“ Markdown export
Export a conversation as Markdown β€” fenced code blocks, collapsible thinking and tool calls β€” ready to paste into an issue or PR.
β™Š Gemini CLI works again
Gemini changed its log format and the source had gone quietly empty. Fully re-supported β€” and the app now warns you when a source has files it can't read, instead of just showing nothing.
πŸ”— Shareable links and a working back button
Every project and session has its own URL. Refresh keeps your place, and browser back/forward behave.
πŸ”’ Security fixes
Removed a permissive CORS policy that let any website you visited read your local conversation history. Startup no longer force-kills unrelated processes holding the port, and binding to a non-loopback --host now warns loudly.
πŸ›Ÿ Your data is safer
Bookmarks and project settings are written atomically with backups, and a corrupt file is quarantined rather than silently reset to empty. Sync never removes a backup before its replacement is safely in place.

Upgrading from PyPI? Markdown rendering and syntax highlighting were silently broken in earlier published versions β€” the packaged wheel was missing its bundled JavaScript. Fixed, and now guarded by a test.

Installation

Via uv tool (Recommended)

uv is a fast Python package installer. Install it first if you haven't:

curl -LsSf https://astral.sh/uv/install.sh | sh

Then install clicodelog as an isolated tool:

uv tool install clicodelog

To upgrade:

uv tool upgrade clicodelog

Via pip

pip install clicodelog

From source

git clone https://github.com/monk1337/clicodelog.git
cd clicodelog
uv tool install -e .
# or with pip:
pip install -e .

Usage

After installation, simply run:

clicodelog

The app will:

  • Start a local web server at http://localhost:6126 and open it in your browser
  • Back up new logs from every supported tool in the background, then hourly
  • Stop a previous clicodelog still holding the port (it never touches other programs)

Command Options

clicodelog --help               # Show all options
clicodelog --version            # Show the version
clicodelog --port 8080          # Use another port (default: 6126)
clicodelog --host 0.0.0.0       # Bind beyond localhost (warns loudly; default: 127.0.0.1)
clicodelog --no-sync            # Skip the startup sync
clicodelog --folder myapp       # Only show projects whose name contains "myapp"
clicodelog --no-browser         # Don't open a browser tab
clicodelog --debug              # Debug logging

Alternative: Run from source

git clone https://github.com/monk1337/clicodelog.git
cd clicodelog
python -m clicodelog.cli

Why Developers Use It

🧠 See the full chain of reasoning
Read the agent's thinking blocks, tool calls, and decisions in a clean conversation view. No more squinting at raw JSONL.
πŸ” Track what actually ran
Every file read, shell command, and edit β€” laid out clearly so you can audit what the agent did before you commit.
πŸ“Š Spot wasted tokens
Session-level token stats (input, output, cached) so you can see which runs were efficient and which went in circles.
πŸ”€ All your agents, one place
Claude Code, Codex, and Gemini CLI side by side. Same interface, same workflow, no context switching.
πŸ”’ Nothing leaves your machine
Fully local. Reads from your existing log directories, syncs to a local backup. No cloud, no accounts, no telemetry.

Supported Tools

Tool Source Directory Status
Claude Code ~/.claude/projects/ βœ… Supported
OpenAI Codex ~/.codex/sessions/ βœ… Supported
Gemini CLI ~/.gemini/tmp/ βœ… Supported

Claude Code

  • Sessions organized by project directory
  • Displays summaries, messages, thinking blocks, and tool usage
  • Shows model metadata and token usage

OpenAI Codex

  • Sessions organized by date (YYYY/MM/DD/)
  • Groups sessions by working directory (cwd) as projects
  • Displays messages, function calls, and reasoning blocks
  • Filters out system prompts for cleaner inspection

Gemini CLI

  • Sessions stored as JSON Lines in {project}/chats/session-*.jsonl
  • Groups sessions by project folder
  • Displays messages, thoughts (thinking), and tool calls
  • Shows token usage (input, output, cached)

How It Works

  • A backup that only grows β€” logs are copied into ~/.clicodelog/data/ (copy-on-write clones on macOS, so it costs almost no disk). Nothing is ever deleted from it, so sessions survive even after the tool prunes its own history.
  • Sync β€” at startup, then hourly in the background, or on demand with the Sync button.
  • An index, not a re-scan β€” one small row per session in ~/.clicodelog/meta.db (SQLite), so projects and session lists open instantly. Full-text search is a separate, optional fts.db, built only when you ask.
  • Load what you look at β€” opening a session fetches one window of messages; more arrive as you scroll in either direction, and only the messages on screen are rendered.
  • Give memory back β€” after 5 unused minutes the tab drops what it loaded and the server trims its caches; coming back restores your exact place.

Data Storage

~/.clicodelog/data/
β”œβ”€β”€ claude-code/          # Claude Code backup
β”‚   β”œβ”€β”€ -Users-project1/
β”‚   β”‚   β”œβ”€β”€ session1.jsonl
β”‚   β”‚   └── session2.jsonl
β”‚   └── -Users-project2/
β”œβ”€β”€ codex/                # OpenAI Codex backup
β”‚   └── 2026/
β”‚       └── 01/
β”‚           β”œβ”€β”€ 16/
β”‚           β”‚   └── rollout-xxx.jsonl
β”‚           └── 17/
└── gemini/               # Gemini CLI backup
    β”œβ”€β”€ {project-1}/
    β”‚   └── chats/
    β”‚       β”œβ”€β”€ session-2026-01-17T12-57-xxx.jsonl
    β”‚       └── session-2026-01-17T13-04-xxx.jsonl
    └── {project-2}/

Controls

Control Action
⌘K / Ctrl+K Search every conversation
⌘F or / Find in the open conversation (Enter / Shift+Enter to step)
Esc Close whatever is open
You Β· Assistant Β· Tools Β· Unique only Filter the conversation; they combine
View menu Thinking, tool calls, newest/oldest first, date range, load all
Resume Β· Open in editor Copy the command to continue the session
Export Text, Markdown, or the raw log
⭐ Bookmarks, grouped by project and conversation
Source dropdown Switch between supported tools
Sync Β· Theme Refresh logs now Β· light/dark (follows the system until you choose)

Screenshots

Light Dark: thinking and tool calls
Conversation view, light theme Thinking and tool calls, dark theme

Search across every conversation with ⌘K

All screenshots use a synthetic demo dataset β€” no real sessions. Recreate it with python scripts/demo_data.py /tmp/demo and run HOME=/tmp/demo clicodelog --no-sync.


Project Structure

clicodelog/
β”œβ”€β”€ cli.py              # Entry point
β”œβ”€β”€ app.py              # FastAPI app, routes, cache policy
β”œβ”€β”€ assets.py           # Content-hashed CSS/JS bundles
β”œβ”€β”€ reaper.py           # Gives memory back after 5 idle minutes
β”œβ”€β”€ config.py           # SOURCES, paths, constants
β”œβ”€β”€ sync.py             # Additive clone-backup of each source
β”œβ”€β”€ scan.py             # One-pass session metadata extraction
β”œβ”€β”€ metastore.py        # SQLite metadata store (listings, projects)
β”œβ”€β”€ fts.py              # SQLite FTS5 full-text search
β”œβ”€β”€ window.py           # Windowed reads of huge sessions
β”œβ”€β”€ conversation.py     # Conversation loading + pagination
β”œβ”€β”€ storage.py          # Atomic writes, disk checks
β”œβ”€β”€ parsers/            # claude.py, codex.py, gemini.py
β”œβ”€β”€ routes/             # projects, search, export, sync, sources, stats
β”œβ”€β”€ static/             # Vanilla JS + CSS (no build step; bundled at request time)
└── templates/          # index.html, view.html and shared partials

~/.clicodelog/          # Created at runtime, never in the repo
β”œβ”€β”€ data/               # Your synced logs (the durable backup)
β”œβ”€β”€ meta.db             # Session metadata index
β”œβ”€β”€ fts.db              # Full-text index (optional)
└── bookmarks.json      # Your bookmarks

API Endpoints

Endpoint Method Description
/api/sources GET List available sources
/api/sources/<id> POST Set active source
/api/projects?source= GET List projects
/api/projects/<id>/sessions?source=&limit=&offset= GET List sessions (paged)
/api/projects/<id>/sessions/<id>?source=&limit=&offset=&tail=&around_uuid= GET Fetch a window of a session: from an offset, the end, or centred on a message
/api/projects/<id>/sessions/<id>/subagents?source= GET List sub-agent sessions
/api/projects/<id>/sessions/<id>/export?fmt=txt|md GET Export as text or Markdown
/api/projects/<id>/sessions/<id>/export-raw GET Stream the exact source file
/api/search?q=&source=&project=&role=&after=&before= GET Search titles and message bodies
/api/search/status?source= GET Full-text index state and size estimate
/api/search/build?source=&tool_cap= POST Build the full-text index
/api/stats?source=&group=day|project|model|tool GET Token usage analytics
/api/files?path=&source= GET Which sessions edited a file
/api/bookmarks GET/POST List or add bookmarks
/api/bookmarks/<id> DELETE Remove a bookmark
/api/projects/<id>/meta?source= GET/PUT Custom project name and tags
/api/tags?source= GET All project tags
/api/sync?source= POST Trigger sync
/api/status?source= GET Sync status and free disk
/bundle/<hash>/<name> GET Versioned CSS/JS bundles (cached permanently)

Requirements

  • Python 3.10+
  • FastAPI
  • Uvicorn
  • Jinja2

That's the whole runtime dependency list. Search, analytics and the metadata store all run on the sqlite3 module in the standard library β€” no extra services, no database to install.


Adding New Sources

To add support for another CLI-based AI tool, start with config.py:

SOURCES = {
    "claude-code": {
        "name": "Claude Code",
        "source_dir": Path.home() / ".claude" / "projects",
        "data_subdir": "claude-code"
    },
    "codex": {
        "name": "OpenAI Codex",
        "source_dir": Path.home() / ".codex" / "sessions",
        "data_subdir": "codex"
    },
    "gemini": {
        "name": "Gemini CLI",
        "source_dir": Path.home() / ".gemini" / "tmp",
        "data_subdir": "gemini"
    },
    # Add new tool here
}

Then wire up the rest:

  1. Add a reader branch in scan.py (metadata extraction).
  2. Add an entry-shape branch in metastore._row_for (how projects are keyed).
  3. Add a parser in parsers/ and export it from parsers/__init__.py.
  4. Add a text extractor to fts._EXTRACT so the source is searchable.
  5. Add the source to the parametrised contract test in tests/test_sources.py β€” it asserts a source with files on disk yields at least one session, which is exactly the check that would have caught Gemini going silently empty.

Citation

@misc{clicodelog2026,
    title        = {clicodelog: Unified Session Inspector for CLI AI Coding Agents},
    author       = {Pal, Ankit},
    year         = {2026},
    howpublished = {\url{https://github.com/monk1337/clicodelog}},
    note         = {Local web UI for browsing Claude Code, OpenAI Codex, and Gemini CLI session logs - thinking blocks, tool calls, file edits, and token costs}
}

License

MIT


Built for inspecting what AI coding agents actually did.

About

Browse & Inspect CLI agents : Claude Code, Codex, Gemini CLI code & conversation history

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

49 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages