raine/claude-history
Fuzzy-search Claude Code conversation history
claude‑history – a terminal UI for browsing Claude Code, Pi and Oh My Pi conversation histories
What it does
- Scans the current project directory (or the default session folders of Claude Code, Pi and OMP) and builds an index of every recorded chat session.
- Provides a fuzzy, field‑aware search that can work lexically or semantically (the binary ships with an ONNX Runtime model for the latter, so no extra install is needed on macOS).
- Shows a preview list of conversations, lets you open a full‑screen viewer with vim‑style navigation, in‑viewer search, markdown rendering, and the ability to copy or export messages.
- From the UI you can resume a session in the original agent, fork it into the current project, rename, or delete it. Forking works across git worktrees, so a conversation from another repo can be brought into the directory you’re currently working in.
- A companion Claude Code skill lets the Claude agent itself search its own past chats.
Why it matters
Developers using Claude Code, Pi or Oh My Pi often accumulate dozens of JSONL transcript files. Finding a prior discussion, re‑using a solution, or continuing a halted session is otherwise a manual, error‑prone process. claude-history turns that archive into a searchable, keyboard‑driven interface that integrates directly with the agents, making the history a first‑class part of the development workflow.
Key features
| Feature | What you get |
|---|---|
| Multi‑agent support | Claude Code, Pi, OMP – all listed together with source labels (CC, Pi, OMP). |
| Fuzzy + semantic search | Prefix, word‑boundary, field‑aware relevance scoring; optional ONNX‑based semantic ranking that understands meaning. |
| Conversation viewer | Ledger‑style display, markdown rendering, tool‑call toggling, thinking‑block toggling, copy‑to‑clipboard, export to file. |
| Resume / fork / rename / delete | One‑keystroke actions that invoke the native pi or omp CLI, or the Claude Code resume command. |
| Worktree‑aware filtering | If you use the author’s workmux tool, the list automatically limits to the active worktree. |
| Cross‑project forking | Pull a conversation from any project into the current directory with Ctrl+F. |
| Time filtering | --since, --before, --after let you restrict results to a date range or relative duration. |
| Clipboard handling | Works locally, over SSH (OSC 52), and inside tmux; configurable via CLAUDE_HISTORY_CLIPBOARD. |
| Configurable UI | Keybindings, default resume arguments, display options are set in a TOML config file. |
Installation
- Quick script:
curl -fsSL https://raw.githubusercontent.com/raine/claude-history/main/scripts/install.sh | bash - Homebrew (macOS/Linux):
brew install raine/claude-history/claude-history - Cargo:
cargo install claude-history - Pre‑built binaries are available for Apple Silicon, Intel macOS and x86_64 Linux; macOS builds bundle the ONNX runtime.
Basic usage
# From any project directory
claude-history # opens the TUI list
claude-history <file> # view a specific JSONL transcript directly
claude-history delete-empty # remove empty transcript files
Inside the list:
- Type to search,
Ctrl+Rto resume,Ctrl+Fto fork,F2to rename,Ctrl+Xto delete. Ctrl+Ttoggles lexical ↔ semantic search.?shows the full shortcut cheat‑sheet.
Configuration example (~/.config/claude-history/config.toml)
[search]
mode = "semantic" # start in semantic mode
[tui]
semantic_search = true # legacy key, still works
Who built it
Maintained by raine (the same author of the aven task‑queue tool). The repo includes a companion Claude skill (skills/claude-history/SKILL.md) that lets Claude query its own history.
All details are taken directly from the repository’s README; no additional features have been inferred.
Related
- Project
- Project
- Project
- Project
- Project