AI product Open source

chat-history

chat-history is a Rust CLI for agents to search, inspect, export, and resume Claude Code, OpenAI Codex, and Cursor conversation history. It is primarily used through an installed agent skill that tells those coding agents when and how to invoke the CLI, rather than through interactive human browsing.

View repository Mentioned in 1 video ↓

Overview

It parses session files from the supported tools and indexes conversation metadata and transcript text with BM25 search. Search can return compact or JSON results, filter by source, project, branch, time, role, errors, tools, files, or similar messages, and identify message ordinals that can be passed to view for surrounding context. The CLI also supports session inspection, multi-session summaries, filtered viewing, Markdown export, resuming stored chats, path lookup, and shell completions.

The tool is distributed through crates.io and GitHub and installs with Cargo. It maintains local catalog and search caches, can fall back to temporary or in-memory indexes in sandboxes, and installs a managed skill for Claude Code, Codex, and Cursor. It reads the histories retained by those applications rather than archiving them itself. The project is licensed under the MIT license.

What chat-history is used for

1 use taken from transcripts — each links to the moment in the video.

  • A CLI Ayush Bhardwaj built that lets coding agents search and reuse context from their own past sessions across Claude Code, Codex and Cursor. It ships with a skill file so agents know when and how to call it, and the talk uses it as a case study: adding selection flags, compact search output and a batch inspect command based on patterns found in agent transcripts. Available on crates.io and GitHub.

Videos mentioning chat-history

1 in the library.