claude-code-history-viewer
Desktop app and web server to browse, search and analyze your AI coding assistant history — Claude Code, Codex CLI, GitHub Copilot, Gemini CLI, Cursor, OpenCode and more. 100% offline.
原始仓库简介 · 中文摘要待补充 · ai-coding-assistant / chat-history / claude / claude-code / codex / conversation-history
README / 项目原文
Claude Code History Viewer
The unified history viewer for AI coding assistants.
Browse, search, and analyze conversations from Claude Code, Gemini CLI, Antigravity, Codex CLI, Cline, Cursor, Aider, OpenCode, ForgeCode, CodeBuddy Code, and Grok CLI — as a desktop app or headless server. 100% offline.
Quick Start
Desktop app — download and run:
| Platform | Download |
|---|---|
| macOS (Universal) | .dmg |
| Windows (x64) | .exe / .zip (portable) |
| Linux (x64) | .AppImage |
Homebrew (macOS):
brew install --cask jhlee0409/tap/claude-code-history-viewer
Headless server — access from any browser:
brew install jhlee0409/tap/cchv-server # or: curl -fsSL https://raw.githubusercontent.com/jhlee0409/claude-code-history-viewer/main/install-server.sh | sh
cchv-server --serve # → http://localhost:3727
See Server Mode for Docker, VPS, and systemd setup.
Choose a mode:
| Mode | Best for | What it does |
|---|---|---|
| Desktop app | Local browsing | Opens local conversation files in a native app |
| Headless server | Browser, VPS, or remote access | Serves local conversation files through the WebUI; keep authentication enabled |
Why This Exists
AI coding assistants generate thousands of conversation messages, but none of them provide a way to look back at your history across tools. CCHV solves this.
Thirty-one assistants. One viewer. Switch between Claude Code, GitHub Copilot, Gemini CLI, Antigravity, Codex CLI, Cline (incl. Roo Code), Kilo Code, Cursor, Cursor Agent, Aider, OpenCode, ForgeCode, CodeBuddy Code, Grok CLI, Kimi, Kiro, Amazon Q CLI, Continue.dev, PearAI, Goose, Crush, llm, Open Interpreter, Pi, oh-my-pi, Mistral Vibe, Qwen Code, Zed, OpenHands, Trae, and Z Code sessions seamlessly — compare token usage, search across providers, and analyze your workflow in a single interface.
| Provider | Data Location | What You Get |
|---|---|---|
| Claude Code | ~/.claude/projects/ |
Full conversation history, tool use, thinking, costs |
| GitHub Copilot | ~/.copilot/session-state/ (CLI & Desktop), VS Code workspaceStorage/.../chatSessions/ |
Copilot CLI, Copilot Desktop, and VS Code Copilot Chat history (read-only, WSL-aware) |
| Gemini CLI | ~/.gemini/history/ |
Conversation history with tool calls |
| Antigravity | ~/.gemini/antigravity/ |
Conversation state under brain/ plus token monitor data under .token-monitor/rpc-cache/v1/ |
| Codex CLI | ~/.codex/sessions/ |
Session rollouts with agent responses |
| Cline (incl. Roo Code; legacy Kilo Code) | ~/.cline/data/sessions/ (current Cline) and VS Code globalStorage/<ext>/tasks/ (older versions) |
Task-based history across the Cline family |
| Kilo Code | ~/.local/share/kilo/ (kilo.db) |
OpenCode-core store since May 2026; the pre-migration Cline-family store stays under Cline |
| Cursor | ~/.cursor/ |
Composer and chat conversations |
| Cursor Agent | ~/.cursor/projects/.../agent-transcripts/ |
Agent transcripts, distinct from the Cursor IDE source |
| Aider | Project directories | Chat history and edit logs |
| OpenCode | ~/.local/share/opencode/ |
Conversation sessions and tool results |
| ForgeCode | ~/.forge/.forge.db |
Conversation history from SQLite database |
| CodeBuddy Code | ~/.codebuddy/projects/ |
Conversation history with tool calls (Claude Code fork format) |
| Grok CLI | ~/.grok/sessions/ |
Grok CLI conversations, tool calls, and model usage |
| Kimi | ~/.kimi/ |
Session history with kimi -r resume |
| Kiro | kiro-cli/data.sqlite3 |
SQLite-backed conversation history |
| Amazon Q CLI | …/amazon-q/data.sqlite3 |
SQLite conversations store (shares format with the Kiro CLI provider) |
| Continue.dev | ~/.continue/sessions/*.json |
Per-session JSON, grouped by workspace (honors CONTINUE_GLOBAL_DIR) |
| PearAI | ~/.pearai/sessions/ |
Continue fork — same session format |
| Goose | …/goose/sessions/sessions.db |
Block's agent — SQLite sessions + messages |
| Crush | per-project ./.crush/crush.db |
Charm's TUI — SQLite, discovered across common code roots |
| llm | …/io.datasette.llm/logs.db |
Simon Willison's CLI — SQLite conversations/responses with token counts |
| Open Interpreter | ~/.openinterpreter/sessions/ |
Codex-format rollouts (reuses the Codex parser; INTERPRETER_HOME override) |
| Pi | ~/.pi/agent/sessions/ |
Per-cwd JSONL transcripts — messages, thinking, tool calls, token usage |
| oh-my-pi | ~/.omp/agent/sessions/ |
Pi-format sessions from the omp fork (shared parser) |
| Mistral Vibe | ~/.vibe/logs/session/ |
OpenAI-style chat transcripts with reasoning and tool calls (VIBE_HOME override) |
| Qwen Code | ~/.qwen/projects/.../chats/ |
Per-session JSONL transcripts (tool calls, thinking, token usage) |
| Zed | …/Zed/threads/threads.db |
Agent Panel threads — SQLite + Zstd-compressed JSON |
| Z Code | ~/.zcode/cli/db/db.sqlite |
Z.ai's GLM coding agent — session/message/part SQLite store (titles, tool calls, thinking, token usage) |
| OpenHands | ~/.openhands/sessions/ |
Classic event-store conversations |
| Trae | …/Trae/User/workspaceStorage/.../state.vscdb |
Per-workspace chat (icube store; experimental, reverse-engineered) |
No vendor lock-in. No cloud dependency. Your local conversation files, beautifully rendered.
Antigravity note: the viewer resolves the Antigravity root as ~/.gemini/antigravity and then reads session state from brain/ plus usage/cache artifacts from .token-monitor/rpc-cache/v1/; this matches the current runtime layout and root resolver in src-tauri/src/commands/antigravity.rs.
Table of Contents
- Features
- Installation
- Build from Source
- Server Mode (WebUI)
- Usage
- Accessibility
- Tech Stack
- Data Privacy
- Troubleshooting
- Contributing
- License
Features
Core
| Feature | Description |
|---|---|
| Multi-Provider Support | Unified viewer for 31 AI coding assistants — Claude Code, GitHub Copilot, Gemini CLI, Codex CLI, Cursor / Cursor Agent, Cline (incl. Roo Code), Kilo Code, Aider, OpenCode, ForgeCode, CodeBuddy Code, Grok CLI, Kimi, Kiro, Antigravity, Amazon Q CLI, Continue.dev, PearAI, Goose, Crush, llm, Open Interpreter, Pi, oh-my-pi, Mistral Vibe, Qwen Code, Zed, OpenHands, Trae, and Z Code — filter by provider, compare across tools |
| Conversation Browser | Navigate conversations by project/session with worktree grouping |
| Global Search | Search across all conversations from all providers instantly |
| Analytics Dashboard | Dual-mode token stats (billing vs conversation), cost breakdown, and provider distribution charts |
| Session Board | Multi-session visual analysis with pixel view, attribute brushing, and activity timeline |
| Settings Manager | Scope-aware Claude Code settings editor with MCP server management |
| Message Navigator | Right-side collapsible TOC for quick conversation navigation |
| Real-time Monitoring | Live session file watching for instant updates |
Provider Notes
| Provider | Notes |
|---|---|
| Antigravity | Loaded through the standard provider pipeline. Sessions come from the token monitor cache and participate in project/session views, token stats, analytics, and global search without a separate UI mode. |
New in v1.32.0
| Feature | Description |
|---|---|
| Jump between prompts | Alt+↑ / Alt+↓ (⌥↑ / ⌥↓ on macOS) moves the message list to the previous or next prompt you typed, with or without the Messages panel open |
| Session minimap | Optional strip beside the message list that shows the whole session by row kind; click or drag to move. Settings menu → Show session minimap |
| Restore preview fixed | Recent Edits' restore confirmation shows what will change (now in the WebUI too) and refuses symlinked targets |
New in v1.31.0
| Feature | Description |
|---|---|
| Custom resume arguments | Settings → Session Resume Arguments adds extra flags per CLI, used by Copy Resume Command and when resuming sessions in a terminal, with a live preview; dangerous flags are highlighted |
| Correct Claude Opus 5.5 cost | Opus 5.5 sessions are priced at Opus 5.5's own rates (they were billed at Opus 5's); pricing added for GPT-6, Gemini 3.8 Flash and Grok 4.7 |
New in v1.30.0
| Feature | Description |
|---|---|
| WebUI security hardening | In --serve mode, session and project paths are limited to your history folders, and project settings to known projects — upgrade if you run the WebUI (advisory) |
| Claude Code auto titles | Sessions show the title Claude Code generated, in the session list, stats, export and archives (your own rename still wins) |
| Prompts vs. agent updates | The Messages panel marks your typed prompts, agent updates, commands and injected context, with a "Show my prompts only" filter |
New in v1.29.0
| Feature | Description |
|---|---|
| Z Code provider | Browse Z Code (Z.ai) sessions from ~/.zcode/cli/db/db.sqlite with titles, tool calls, thinking and token usage — 31 assistants in total |
| Subagent cost in its session | A session's billed tokens and cost now include the subagent runs it delegated to (Claude Code and Z Code); Conversation Only still shows the main thread |
| Faster session lists | Large Claude and Codex histories load their session lists several times faster |
New in v1.28.0
| Feature | Description |
|---|---|
| Current Cline sessions | Recent Cline releases (the VS Code extension included) store sessions in ~/.cline/data/sessions/; they now appear with titles, full transcripts, and token/cost stats. Cline, Roo Code and Kilo Code are also discovered on Windows |
| Kilo Code's new store | Kilo Code's OpenCode-core database (kilo.db) is read as its own provider, with live refresh and global stats |
| Accurate output tokens | Streamed Claude Code turns were undercounted by roughly 40%; each turn now counts its final usage once |
| Sessions pane & merged folders | The selected project's sessions open in their own resizable column, and a folder used by several tools is one explorer row with provider chips |
| Cleaner transcripts | Tool calls are summarized in the collapsed row, repeated headers on continued turns are gone, and the header has one view switcher |
| Pricing refresh | Every rate re-verified against official pricing pages, fast/priority tiers priced, and retiring models flagged with their replacement |
| Transcript retention | Claude Code's cleanupPeriodDays accepts long retention (e.g. 3650) and is clearly labelled as Claude Code's setting — this app never deletes sessions |
New in v1.23.0
| Feature | Description |
|---|---|
| Grok CLI provider | Browse Grok CLI sessions from ~/.grok/sessions/, search across them, and include model/token usage in analytics |
| Session continuity | Related Claude transcript files are merged into one browsable conversation |
| WebUI deep links | Shareable links can open a specific session and message directly |
| Safer navigation and resume | Global-search selection syncs the owning project/session; unavailable worktree history stays visible with invalid resume actions disabled; Windows resume commands work in both CMD and PowerShell |
| Provider discovery fixes | Provider-specific and WSL-only scans no longer assume a native Claude data directory exists |
New in v1.18.0
| Feature | Description |
|---|---|
| Faster startup | Provider scanners now run concurrently instead of sequentially, so a locked SQLite database from a tool running alongside the viewer no longer stalls the whole scan — eliminating multi-second "Initializing app…" hangs |
| Search result context | Global search results now show which conversation each match belongs to, so matches that share the same text across sessions are easy to tell apart |
| Collapsible provider filter | The sidebar provider-filter panel can collapse to reclaim vertical space for the session list; the collapsed header still surfaces the active filter summary and count |
| Verifiable project names | Project identity prefers the on-disk folder name over a stale cwd recorded in old transcripts, so moved or subagent-recorded projects group correctly (one-time transparent re-scan) |
| Fixes | Exporting a subagent session now includes its messages instead of producing an empty file; OpenCode global sessions split by directory (and empty-directory sessions load correctly); the OpenCode session cache is bounded to prevent unbounded memory growth |
New in v1.17.0
| Feature | Description |
|---|---|
| Eleven new providers | Browse history from Continue.dev & PearAI (~/.continue / ~/.pearai session JSON), Goose (SQLite), Crush (per-project SQLite), llm (Simon Willison's CLI), Amazon Q CLI, Open Interpreter (Codex-format rollouts), Qwen Code, Zed (Agent Panel threads — SQLite + Zstd), OpenHands, and Trae — plus Kilo Code via the Cline-family reader. Coverage grows from 14 to 25 assistants. |
| Kiro Windows path fix | Kiro CLI database now resolves via data_local_dir() (%LOCALAPPDATA%) on Windows instead of the incorrect AppData\Roaming |
New in v1.16.0
| Feature | Description |
|---|---|
| GitHub Copilot Provider | Read-only history from Copilot CLI (~/.copilot/session-state), Copilot Desktop, and VS Code Copilot Chat (workspaceStorage/.../chatSessions) — WSL-aware, with global search |
| Headless Session Export | New --export <session-id|/abs/path.jsonl> [--format html|json] [--output <file>] flag renders an HTML or JSON report and exits without launching the GUI — for SSH/CI use |
| One-Click Full Backup | An Archive Manager "Full Backup" card copies every session from all Claude Code projects into archives in one action, so history survives Claude Code's automatic cleanup |
| Skill & Subagent Analytics | New "Most Used Skills" / "Most Used Subagents" sections break Claude Skill and Agent calls out by name, at project and global scope |
| Fixes | The font-size setting now applies to the whole app (message viewer, analytics, session board, settings), not just the left panel; session delete falls back to permanent deletion when the system trash is unavailable (e.g. Windows Recycle Bin disabled) |
New in v1.15.0
| Feature | Description |
|---|---|
| Three New Providers | Browse history from Cursor Agent (agent-transcripts, distinct from the Cursor IDE source), Kimi (~/.kimi, with kimi -r resume), and Kiro (SQLite-backed kiro-cli) |
| Codex Native Rename & Delete | Rename Codex sessions — the title is written to state_5.sqlite and shows in the codex resume picker, while the rollout transcript stays immutable — and delete sessions through a new in-app confirmation dialog; honors CODEX_HOME (sessions + archived) |
| Faster Scans & Search | Codex project lists scan only the session-meta line (mmap + memchr) and each provider scans independently, so a slow provider no longer blocks fast ones; in-session search indexing moved to a Web Worker so large sessions no longer freeze the UI |
| Accurate Claude Project Paths | Project name and the claude --resume working directory are now resolved from session metadata instead of the lossy folder encoding (one-time transparent re-scan on first launch) |
| Fixes | Removed blank gaps in the virtualized message history; fixed Kimi auto-refresh on macOS; fixed a Cursor scan crash on multibyte workspace-folder names |
v1.14.0
| Feature | Description |
|---|---|
| CodeBuddy Code Provider | Added CodeBuddy Code — browse its conversation history alongside your other AI coding assistants |
| WebUI Account Login | --serve mode gains optional account authentication (Argon2id + server-side sessions + CSRF), a read-only mode, and base-path support for reverse-proxy hosting |
| Persistent Message Filters | Role and content-type filters now persist across session switches and app restarts |
| Subagent Session Stability | Fixed multi-subagent click mapping and an occasional crash when opening large subagent sessions |
| Linux IME Input | Fixed ibus/fcitx input (Korean, Chinese, Japanese) in the search box on Linux |
v1.13.0
| Feature | Description |
|---|---|
| macOS Custom Title Bar | Draggable overlay header replaces the legacy macOS title bar for consistent screen-space use; Linux/Windows unaffected |
| Session Source Filter | Filter sessions by where they were created — CLI, VS Code, or Desktop — using Claude Code's entrypoint field |
| Codex Resume Support | Right-click "Copy Resume Command" now works for Codex sessions and prefixes cd '<cwd>' && so paste-and-run lands in the original directory |
| Pricing Accuracy | Fixed claude-opus-4-7 3× overcharge; added gpt-5.4 / gpt-5.5 pricing with Codex cached-token handling |
| macOS Updater Reliability | Native OS-level relaunch fallback for the Tauri v2 macOS relaunch bug — no more "please quit and reopen" |
Older releases: see CHANGELOG.md for v1.12.0 and earlier.
More
| Feature | Description |
|---|---|
| Session Context Menu | Copy session ID, resume command, file path; delete session, show JSONL file; native rename with search integration |
| ANSI Color Rendering | Terminal output displayed with original ANSI colors |
| Multi-language | English, Korean, Japanese, Chinese (Simplified & Traditional) |
| Recent Edits | View file modification history and restore |
| Auto-update | Built-in updater with skip/postpone options |
Installation
Homebrew (macOS)
brew tap jhlee0409/tap
brew install --cask claude-code-history-viewer
Or install directly with the full cask path:
brew install --cask jhlee0409/tap/claude-code-history-viewer
If you see No Cask with this name exists, run the full cask path command above.
To upgrade:
brew upgrade --cask claude-code-history-viewer
To uninstall:
brew uninstall --cask claude-code-history-viewer
Migrating from manual (.dmg) installation? Move the existing app to Trash in Finder before installing via Homebrew to avoid conflicts. Choose one installation method — do not mix manual and Homebrew installs. Then run:
brew tap jhlee0409/tap brew install --cask claude-code-history-viewer
Build from Source
git clone https://github.com/jhlee0409/claude-code-history-viewer.git
cd claude-code-history-viewer
# Option 1: Using just (recommended)
brew install just # or: cargo install just
just setup
just dev # Development
just tauri-build # Production build
# Option 2: Using pnpm directly
pnpm install
pnpm tauri:dev # Development
pnpm tauri:build # Production build
Requirements: Node.js 20.19+ (or 22.12+), pnpm, Rust toolchain
Server Mode (WebUI)
Run the viewer as a headless HTTP server — no desktop environment required. Ideal for VPS, remote servers, or Docker. The server binary embeds the frontend — a single file is all you need.
New to server deployment? See the full Server Mode Guide (한국어) for step-by-step instructions covering local testing, VPS setup, Docker, and more.
Quick Install
# Homebrew (macOS / Linux)
brew install jhlee0409/tap/cchv-server
# Or one-line script
curl -fsSL https://raw.githubusercontent.com/jhlee0409/claude-code-history-viewer/main/install-server.sh | sh
Both methods install cchv-server to your PATH.
Start the Server
cchv-server --serve
Output:
🔑 Auth token: b77f41d4-ec24-4102-8f7a-8a942d6dd4a0
Open in browser: http://192.168.1.10:3727?token=b77f41d4-ec24-4102-8f7a-8a942d6dd4a0
👁 File watcher active: /home/user/.claude/projects
🚀 WebUI server running at http://0.0.0.0:3727
Open the URL in your browser — the token is saved automatically.
Pre-built Binaries
| Platform | Asset |
|---|---|
| Linux x64 | cchv-server-linux-x64.tar.gz |
| Linux ARM64 | cchv-server-linux-arm64.tar.gz |
| macOS ARM | cchv-server-macos-arm64.tar.gz |
| macOS x64 | cchv-server-macos-x64.tar.gz |
Download from Releases.
CLI options:
| Flag | Default | Description |
|---|---|---|
--serve |
— | Required. Starts the HTTP server instead of the desktop app |
--port <number> |
3727 |
Server port |
--host <address> |
0.0.0.0 |
Bind address (127.0.0.1 for local only) |
--token <value> |
auto (uuid v4) | Custom authentication token |
--no-auth |
— | Disable authentication (not recommended for public networks) |
--dist <path> |
embedded | Override built-in frontend with external dist/ directory |
Authentication
All /api/* endpoints are protected by Bearer token authentication. The token is auto-generated on each server start and printed to stderr.
- Browser access: Use the
?token=...URL printed at startup. The token is saved tolocalStorageautomatically. - API access: Include
Authorization: Bearer <token>header. - Custom token:
--token my-secret-tokento set your own. - Environment variable:
CCHV_TOKEN=your-token cchv-server --serve(useful for systemd/Docker). - Disable:
--no-authto skip authentication entirely (only use on trusted networks).
Real-time Updates
The server watches ~/.claude/projects/ for file changes and pushes updates to the browser via Server-Sent Events (SSE). When you use Claude Code in another terminal, the viewer updates automatically — no manual refresh needed.
Docker
docker compose up -d
Check the token after startup:
docker compose logs webui
# 🔑 Auth token: ... ← paste this URL in your browser
The docker-compose.yml mounts ~/.claude, ~/.codex, and ~/.local/share/opencode as read-only volumes.
The sample Docker setup mounts Claude, Codex, and OpenCode only. To browse another provider, add its local data directory as a read-only volume at the path that provider expects inside the container, then restart the container.
systemd Service
For persistent server on Linux, use the provided systemd template:
sudo cp contrib/cchv.service /etc/systemd/system/
sudo systemctl edit --full cchv.service # Set User= to your username
sudo systemctl enable --now cchv.service
Build from Source (Server Only)
just serve-build # Build frontend + embed into server binary
just serve-build-run # Build and run (embedded assets)
# Or run in development (external dist/):
just serve-dev # Build frontend + run server with --dist
Health Check
GET /health
→ { "status": "ok" }
Usage
- Launch the app
- It automatically scans for conversation data from all 31 supported providers (Claude Code, Codex CLI, Gemini CLI, Cursor, Cline, Continue.dev, Goose, Zed, Qwen Code, Amazon Q CLI, and more — see the provider table above)
- Browse projects in the left sidebar — filter by provider using the tab bar
- Click a session to view messages
- Use tabs to switch between Messages, Analytics, Token Stats, Recent Edits, and Session Board
Command-line flags
Launch the app pre-focused on a specific session with one of these selectors:
# Full UUID
claude-code-history-viewer --session 1265cd74-caa9-472e-b343-c4f44b5cf12c
# UUID prefix (8+ hex-or-dash chars, up to 36) — first match wins
claude-code-history-viewer --session 1265cd74
# Equals form also works
claude-code-history-viewer --session=1265cd74
# Exact Claude session-folder name under ~/.claude/projects/
claude-code-history-viewer --session-folder my-project
# Case-insensitive substring match against session titles
claude-code-history-viewer --session-title "auth bug"
--session accepts a full UUID, UUID prefix, or absolute path to a .jsonl file. --session-folder matches an exact Claude session-folder name, while --session-title performs a case-insensitive title substring search and may show a picker when multiple sessions match. If multiple selectors are supplied, precedence is --session > --session-folder > --session-title.
The app also accepts these deep-link forms from a registered desktop environment:
file:///absolute/path/to/session.jsonl
claude-code-history-viewer://session/1265cd74-caa9-472e-b343-c4f44b5cf12c
claude-code-history-viewer://session-folder/my-project
claude-code-history-viewer://session-title/auth%20bug
The viewer scans every known project, navigates to the matching session, and falls back to normal startup if no session matches.
Accessibility
The app includes accessibility features for keyboard-only, low-vision, and screen-reader users.
- Keyboard-first navigation:
- Skip links for Project Explorer, Main Content, Message Navigator, and Settings
- Project tree navigation with
ArrowUp/ArrowDown/Home/End, type-ahead search, and*to expand sibling groups - Message navigator navigation with
ArrowUp/ArrowDown/Home/EndandEnterto open the focused message
- Visual accessibility:
- Persistent global font size scaling (
90%,100%,110%,120%,130%) - High contrast mode toggle in settings
- Persistent global font size scaling (
- Screen reader support:
- Landmark and tree/list semantics (
navigation,tree,treeitem,group,listbox,option) - Live announcements for status/loading and project tree navigation/selection changes
- Inline keyboard-help descriptions via
aria-describedby
- Landmark and tree/list semantics (
Tech Stack
| Layer | Technology |
|---|---|
| Backend | |
| Frontend | |
| State | |
| Build | |
| i18n |
Data Privacy
Desktop mode is local-first. Conversation files are read from local disk; no conversation data is uploaded, and there is no analytics, tracking, or telemetry.
Server mode intentionally serves local files to browsers and clients that can reach the server. Keep it bound to 127.0.0.1 for local-only use, or keep token authentication enabled before exposing it to a network.
Troubleshooting
| Problem | Solution |
|---|---|
| "No Claude data found" | Make sure ~/.claude exists with conversation history |
| A provider is missing | Check its data path in the provider table. For an additional Claude directory, open Settings → Custom Claude Directories. In Docker, add the provider's data directory as a read-only volume. |
| Cannot connect to the WebUI | cchv-server defaults to port 3727. Use the startup URL, check for port conflicts, and verify firewall or proxy rules when connecting remotely. |
| "Unauthorized" / HTTP 401 | Use the token URL printed at startup or send Authorization: Bearer <token>. For a fixed token, use --token or CCHV_TOKEN. |
| Performance issues | Large histories may be slow initially — the app uses virtual scrolling |
| Update problems | If auto-updater fails, download manually from Releases |
Contributing
Contributions are welcome! Here's how to get started:
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Run checks before committing:
pnpm exec tsc --build . # TypeScript pnpm vitest run # Tests pnpm lint # Lint just rust-check-all # Rust format, clippy, and tests pnpm run i18n:validate # Locale consistency - Commit your changes (
git commit -m 'feat: add my feature') - Push to the branch (
git push origin feat/my-feature) - Open a Pull Request
See Development Commands for the full list of available commands.
License
MIT — free for personal and commercial use.
Claude Code History Viewer
AI 编程助手的统一历史查看器。
浏览、搜索和分析 Claude Code、Gemini CLI、Antigravity、Codex CLI、Cline、Cursor、Aider、OpenCode、ForgeCode、CodeBuddy Code 和 Grok CLI 的对话记录 — 桌面应用或无头服务器。100% 离线。
快速开始
桌面应用 — 下载并运行:
| 平台 | 下载 |
|---|---|
| macOS (通用) | .dmg |
| Windows (x64) | .exe / .zip (便携版) |
| Linux (x64) | .AppImage |
Homebrew (macOS):
brew install --cask jhlee0409/tap/claude-code-history-viewer
无头服务器 — 从任意浏览器访问:
brew install jhlee0409/tap/cchv-server # or: curl -fsSL https://raw.githubusercontent.com/jhlee0409/claude-code-history-viewer/main/install-server.sh | sh
cchv-server --serve # → http://localhost:3727
Docker、VPS、systemd 设置请参阅服务器模式。
选择模式:
| 模式 | 适用场景 | 工作方式 |
|---|---|---|
| 桌面应用 | 本地浏览 | 在原生应用中打开本地对话文件 |
| 无头服务器 | 浏览器、VPS 或远程访问 | 通过 WebUI 提供本地对话文件;请保持启用身份验证 |
为什么做这个
AI 编程助手生成了数千条对话消息,但它们都不提供跨工具回顾历史的方式。CCHV 解决了这个问题。
三十一个助手。一个查看器。 在 Claude Code、GitHub Copilot、Gemini CLI、Antigravity、Codex CLI、Cline(含 Roo Code)、Kilo Code、Cursor、Cursor Agent、Aider、OpenCode、ForgeCode、CodeBuddy Code、Grok CLI、Kimi、Kiro、Amazon Q CLI、Continue.dev、PearAI、Goose、Crush、llm、Open Interpreter、Pi、oh-my-pi、Mistral Vibe、Qwen Code、Zed、OpenHands、Trae 和 Z Code 会话之间无缝切换 — 比较令牌用量、跨提供商搜索、在一个界面中分析你的工作流。
| 提供商 | 数据位置 | 获取内容 |
|---|---|---|
| Claude Code | ~/.claude/projects/ |
完整对话历史、工具使用、思维过程、成本 |
| GitHub Copilot | ~/.copilot/session-state/(CLI 和 Desktop)、VS Code workspaceStorage/.../chatSessions/ |
Copilot CLI、Copilot Desktop 和 VS Code Copilot Chat 历史(只读,支持 WSL) |
| Gemini CLI | ~/.gemini/history/ |
包含工具调用的对话历史 |
| Antigravity | ~/.gemini/antigravity/ |
brain/ 下的对话状态,以及 .token-monitor/rpc-cache/v1/ 下的 Token 监控数据 |
| Codex CLI | ~/.codex/sessions/ |
包含代理响应的会话记录 |
| Cline(含 Roo Code;旧版 Kilo Code) | ~/.cline/data/sessions/(新版 Cline)及 VS Code globalStorage/<ext>/tasks/(旧版) |
Cline 系列基于任务的对话历史 |
| Kilo Code | ~/.local/share/kilo/(kilo.db) |
2026 年 5 月起改用 OpenCode 核心;迁移前的 Cline 系列数据仍归 Cline |
| Cursor | ~/.cursor/ |
Composer 和聊天对话 |
| Cursor Agent | ~/.cursor/projects/.../agent-transcripts/ |
Agent 会话记录,独立于 Cursor IDE 数据源 |
| Aider | 项目目录 | 聊天记录和编辑日志 |
| OpenCode | ~/.local/share/opencode/ |
对话会话和工具结果 |
| ForgeCode | ~/.forge/.forge.db |
SQLite 数据库中的对话记录 |
| CodeBuddy Code | ~/.codebuddy/projects/ |
包含工具调用的对话历史(Claude Code fork 格式) |
| Grok CLI | ~/.grok/sessions/ |
Grok CLI 对话、工具调用和模型用量 |
| Kimi | ~/.kimi/ |
会话历史,支持 kimi -r 恢复 |
| Kiro | kiro-cli/data.sqlite3 |
基于 SQLite 的对话历史 |
| Amazon Q CLI | …/amazon-q/data.sqlite3 |
SQLite conversations 存储(与 Kiro CLI 提供商共用格式) |
| Continue.dev | ~/.continue/sessions/*.json |
按工作区分组的单会话 JSON(支持 CONTINUE_GLOBAL_DIR) |
| PearAI | ~/.pearai/sessions/ |
Continue fork — 相同的会话格式 |
| Goose | …/goose/sessions/sessions.db |
Block 的智能体 — SQLite 会话 + 消息 |
| Crush | 每项目 ./.crush/crush.db |
Charm 的 TUI — SQLite,在常见代码根目录下自动发现 |
| llm | …/io.datasette.llm/logs.db |
Simon Willison 的 CLI — 含 Token 计数的 SQLite conversations/responses |
| Open Interpreter | ~/.openinterpreter/sessions/ |
Codex 格式 rollouts(复用 Codex 解析器;支持 INTERPRETER_HOME 覆盖) |
| Pi | ~/.pi/agent/sessions/ |
按 cwd 分组的 JSONL 转录 — 消息、思考、工具调用、Token 用量 |
| oh-my-pi | ~/.omp/agent/sessions/ |
omp 分支的 Pi 格式会话(共用解析器) |
| Mistral Vibe | ~/.vibe/logs/session/ |
含 reasoning 与工具调用的 OpenAI 风格聊天转录(支持 VIBE_HOME 覆盖) |
| Qwen Code | ~/.qwen/projects/.../chats/ |
每会话 JSONL 记录(工具调用、思维过程、Token 用量) |
| Zed | …/Zed/threads/threads.db |
Agent Panel 线程 — SQLite + Zstd 压缩 JSON |
| Z Code | ~/.zcode/cli/db/db.sqlite |
Z.ai 的 GLM 编程智能体 — session/message/part 三表 SQLite 存储(标题、工具调用、思考过程、Token 用量) |
| OpenHands | ~/.openhands/sessions/ |
经典事件存储对话 |
| Trae | …/Trae/User/workspaceStorage/.../state.vscdb |
按工作区的聊天记录(icube 存储;实验性,逆向工程) |
无供应商锁定。无云依赖。本地对话文件,精美呈现。
Antigravity 说明:查看器将 Antigravity 根目录解析为 ~/.gemini/antigravity,然后从 brain/ 读取会话状态,并从 .token-monitor/rpc-cache/v1/ 读取用量/缓存数据;这与当前运行时布局以及 src-tauri/src/commands/antigravity.rs 中的根目录解析器一致。
目录
功能特性
核心
| 功能 | 描述 |
|---|---|
| 多提供商支持 | 统一查看 31 个 AI 编程助手 — Claude Code、GitHub Copilot、Gemini CLI、Codex CLI、Cursor / Cursor Agent、Cline(含 Roo Code)、Kilo Code、Aider、OpenCode、ForgeCode、CodeBuddy Code、Grok CLI、Kimi、Kiro、Antigravity、Amazon Q CLI、Continue.dev、PearAI、Goose、Crush、llm、Open Interpreter、Pi、oh-my-pi、Mistral Vibe、Qwen Code、Zed、OpenHands、Trae 和 Z Code — 按提供商筛选、跨工具比较 |
| 对话浏览器 | 按项目/会话导航对话,支持工作树分组 |
| 全局搜索 | 即时搜索所有提供商的对话内容 |
| 分析仪表板 | 双模式 Token 统计(计费 vs 对话)、成本明细、提供商分布图表 |
| 会话面板 | 多会话可视化分析,支持像素视图、属性筛选和活动时间线 |
| 设置管理器 | 作用域感知的 Claude Code 设置编辑器,支持 MCP 服务器管理 |
| 消息导航器 | 右侧可折叠目录,快速浏览对话内容 |
| 实时监控 | 实时监听会话文件变化并即时更新 |
Provider 说明
| 提供商 | 说明 |
|---|---|
| Antigravity | 走现有统一 provider 数据流接入。会话来自 token monitor 缓存,可直接参与项目/会话浏览、Token 统计、分析仪表板和全局搜索,无需单独的专用页面。 |
v1.32.0 新增
| 功能 | 说明 |
|---|---|
| 在提示之间跳转 | Alt+↑ / Alt+↓(macOS 为 ⌥↑ / ⌥↓)将消息列表移到你输入的上一条或下一条提示,消息面板关闭时同样可用 |
| 会话小地图 | 可在消息列表旁显示按行类型着色的整段会话条带,点击或拖动即可跳转。设置菜单 → 显示会话小地图 |
| 修复恢复预览 | 最近编辑的恢复确认会显示将要改变的内容(WebUI 中同样可用),并拒绝恢复符号链接目标 |
v1.31.0 新增
| 功能 | 说明 |
|---|---|
| 会话恢复自定义参数 | 在 设置 → 会话恢复参数 中为每个 CLI 指定额外参数,会同时应用于 复制恢复命令 和在终端中恢复会话,提供实时预览,危险参数会高亮提示 |
| 修正 Claude Opus 5.5 费用 | Opus 5.5 会话此前按 Opus 5 价格计算,现已使用 Opus 5.5 自身的价格;并新增 GPT-6、Gemini 3.8 Flash 和 Grok 4.7 的价格 |
v1.30.0 新增
| 功能 | 说明 |
|---|---|
| WebUI 安全加固 | --serve 模式下,会话和项目路径仅限历史记录目录,项目设置仅限已知项目 — 如果你在使用 WebUI,请升级(安全公告) |
| Claude Code 自动标题 | 会话列表、统计、导出和归档中显示 Claude Code 生成的标题(你手动设置的名称优先) |
| 区分你的提示与代理更新 | Messages 面板会区分你输入的提示、代理更新、命令和注入的上下文,并提供“仅显示我的提示”筛选 |
v1.29.0 新增
| 功能 | 说明 |
|---|---|
| Z Code 提供商 | 浏览 ~/.zcode/cli/db/db.sqlite 中的 Z Code(Z.ai)会话,包含标题、工具调用、思考过程和 token 用量 — 共支持 31 个助手 |
| 子代理费用计入会话 | 会话的计费 token 和费用现在包含其委派的子代理运行(Claude Code、Z Code);仅对话 模式仍只显示主对话 |
| 更快的会话列表 | 大型 Claude 和 Codex 历史的会话列表加载速度提升数倍 |
v1.28.0 新增
| 功能 | 说明 |
|---|---|
| 新版 Cline 会话 | 新版 Cline(包括 VS Code 扩展)将会话保存在 ~/.cline/data/sessions/,现在会连同标题、完整对话以及 token/费用统计一起显示。Windows 上也能发现 Cline、Roo Code 和 Kilo Code |
| Kilo Code 新存储 | 将 Kilo Code 的 OpenCode 核心数据库(kilo.db)作为独立提供商读取,支持实时刷新和全局统计 |
| 准确的输出 token | 修复了流式 Claude Code 回合的输出 token 少计约 40% 的问题,每个回合的最终用量只计一次 |
| 会话面板与文件夹合并 | 所选项目的会话在可调整宽度的独立列中打开;多个工具共用的同一文件夹合并为一行,并以提供商标签显示 |
| 更简洁的对话视图 | 折叠行中显示工具调用摘要,连续回合不再重复标题,顶部只保留一个视图切换器 |
| 价格表更新 | 所有费率均已对照官方定价页面重新核实,支持 fast/priority 档位,并标注即将停用的模型及其替代模型 |
| 对话记录保留期 | Claude Code 的 cleanupPeriodDays 可设置长期保留值(如 3650),并明确标注为 Claude Code 的设置 — 本应用不会删除任何会话 |
v1.23.0 新增
| 功能 | 描述 |
|---|---|
| Grok CLI 提供商 | 浏览和搜索 ~/.grok/sessions/ 中的 Grok CLI 会话,并将模型/Token 用量纳入分析 |
| 会话连续性 | 将相关的 Claude 转录文件合并为一个可浏览的对话 |
| WebUI 深链接 | 支持可分享的链接,直接打开指定会话和消息 |
| 更安全的导航与恢复 | 全局搜索选中结果会同步所属项目/会话;不可用工作树的历史仍保留,同时禁用无效恢复操作;Windows 恢复命令同时支持 CMD 和 PowerShell |
| 提供商发现修复 | 提供商专用和 WSL 专用扫描不再假设本机一定存在 Claude 数据目录 |
v1.18.0 新增
| 功能 | 描述 |
|---|---|
| 更快的启动 | 提供商扫描器由顺序执行改为并发执行,与查看器同时运行的其他工具锁住的 SQLite 数据库不再拖慢整个扫描 — 消除数秒的"正在初始化应用…"卡顿 |
| 搜索结果上下文 | 全局搜索结果现在显示每个匹配所属的对话,跨会话出现相同文本的匹配一目了然 |
| 可折叠提供商筛选 | 侧边栏的提供商筛选面板可折叠,为会话列表腾出纵向空间;折叠后的标题仍显示当前筛选摘要和数量 |
| 可验证的项目名称 | 项目标识优先使用磁盘上的文件夹名,而非旧记录中过期的 cwd,被移动或由 subagent 记录的项目现在能正确分组(一次性透明重扫描) |
| 修复 | 导出 subagent 会话现在包含其消息,不再生成空文件;OpenCode 全局会话按目录拆分(空目录会话也能正确加载);OpenCode 会话缓存加上上限,防止内存无限增长 |
v1.17.0 新增
| 功能 | 描述 |
|---|---|
| 十一个新提供商 | 浏览 Continue.dev 和 PearAI(~/.continue / ~/.pearai 会话 JSON)、Goose(SQLite)、Crush(每项目 SQLite)、llm(Simon Willison 的 CLI)、Amazon Q CLI、Open Interpreter(Codex 格式 rollouts)、Qwen Code、Zed(Agent Panel 线程 — SQLite + Zstd)、OpenHands 和 Trae 的历史 — 另有通过 Cline 系列读取器支持的 Kilo Code。覆盖范围从 14 个助手扩展到 25 个。 |
| Kiro Windows 路径修复 | Kiro CLI 数据库在 Windows 上现通过 data_local_dir()(%LOCALAPPDATA%)解析,取代错误的 AppData\Roaming |
v1.16.0 新增
| 功能 | 描述 |
|---|---|
| GitHub Copilot 提供商 | 只读浏览 Copilot CLI(~/.copilot/session-state)、Copilot Desktop 和 VS Code Copilot Chat(workspaceStorage/.../chatSessions)历史 — 支持 WSL,支持全局搜索 |
| 无头会话导出 | 新增 --export <session-id|/abs/path.jsonl> [--format html|json] [--output <file>] 标志,生成 HTML 或 JSON 报告后直接退出,不启动 GUI — 适用于 SSH/CI 场景 |
| 一键完整备份 | 归档管理器新增"完整备份"卡片,一次操作即可将所有 Claude Code 项目的全部会话复制到归档,历史记录不再受 Claude Code 自动清理影响 |
| Skill 与 Subagent 分析 | 新增"最常用 Skills" / "最常用 Subagents"版块,按名称统计 Claude Skill 和 Agent 调用,支持项目和全局两种范围 |
| 修复 | 字体大小设置现在应用于整个应用(消息查看器、分析、会话面板、设置),不再仅限左侧面板;系统回收站不可用时(如 Windows 回收站被禁用),会话删除回退为永久删除 |
v1.15.0 新增
| 功能 | 描述 |
|---|---|
| 三个新提供商 | 浏览 Cursor Agent(agent-transcripts,独立于 Cursor IDE 数据源)、Kimi(~/.kimi,支持 kimi -r 恢复)和 Kiro(基于 SQLite 的 kiro-cli)的历史 |
| Codex 原生重命名与删除 | 重命名 Codex 会话 — 标题写入 state_5.sqlite 并显示在 codex resume 选择器中,rollout 记录保持不可变 — 并可通过应用内新增的确认对话框删除会话;支持 CODEX_HOME(sessions + archived) |
| 更快的扫描与搜索 | Codex 项目列表只扫描 session-meta 行(mmap + memchr),各提供商独立扫描,慢的提供商不再阻塞快的;会话内搜索索引移至 Web Worker,大会话不再冻结 UI |
| 准确的 Claude 项目路径 | 项目名和 claude --resume 工作目录现从会话元数据解析,取代有损的文件夹编码(首次启动时一次性透明重扫描) |
| 修复 | 消除虚拟化消息历史中的空白间隙;修复 macOS 上 Kimi 自动刷新;修复多字节工作区文件夹名导致的 Cursor 扫描崩溃 |
v1.14.0
| 功能 | 描述 |
|---|---|
| CodeBuddy Code 提供商 | 新增 CodeBuddy Code — 与其他 AI 编程助手一起浏览其对话历史 |
| WebUI 账户登录 | --serve 模式新增可选账户认证(Argon2id + 服务端会话 + CSRF)、只读模式和反向代理托管的 base-path 支持 |
| 持久化消息筛选 | 角色和内容类型筛选现在跨会话切换和应用重启后保持 |
| Subagent 会话稳定性 | 修复多 subagent 点击映射错误,以及打开大型 subagent 会话时的偶发崩溃 |
| Linux IME 输入 | 修复 Linux 搜索框中的 ibus/fcitx 输入(韩语、中文、日语) |
v1.13.0
| 功能 | 描述 |
|---|---|
| macOS 自定义标题栏 | 可拖动的覆盖层标题栏替换传统 macOS 标题栏 — 屏幕空间利用更一致;Linux/Windows 不受影响 |
| 会话来源筛选 | 基于 Claude Code 的 entrypoint 字段按创建位置(CLI / VS Code / Desktop)筛选会话 |
| Codex Resume 支持 | 右键"复制 Resume 命令"现支持 Codex 会话,并自动添加 cd '<cwd>' && 前缀 — 粘贴运行即可在原目录恢复 |
| 定价准确性 | 修复 claude-opus-4-7 3 倍超额计费;新增 gpt-5.4/gpt-5.5 定价并分离处理 Codex 缓存 token |
| macOS 更新器稳定化 | 针对 Tauri v2 macOS relaunch bug 的 OS 级原生重启回退 — 不再显示"请手动重启" |
历史版本:v1.12.0 及更早请参见 CHANGELOG.md
更多
| 功能 | 描述 |
|---|---|
| 会话上下文菜单 | 复制会话 ID、恢复命令和文件路径;删除会话、显示 JSONL 文件;原生重命名集成搜索 |
| ANSI 颜色渲染 | 以原始 ANSI 颜色显示终端输出 |
| 多语言 | 英语、韩语、日语、简体中文、繁体中文 |
| 最近编辑 | 查看文件修改历史并恢复 |
| 自动更新 | 内置更新器,支持跳过/延迟选项 |
安装
Homebrew (macOS)
brew tap jhlee0409/tap
brew install --cask claude-code-history-viewer
或者使用完整 Cask 路径直接安装:
brew install --cask jhlee0409/tap/claude-code-history-viewer
如果出现 No Cask with this name exists,请使用上面的完整路径命令。
升级:
brew upgrade --cask claude-code-history-viewer
卸载:
brew uninstall --cask claude-code-history-viewer
从手动安装(.dmg)迁移? 为避免冲突,请先在 Finder 中将现有应用移到废纸篓,然后通过 Homebrew 安装。 请只使用一种安装方式 — 不要混合使用手动安装和 Homebrew。 然后运行:
brew tap jhlee0409/tap brew install --cask claude-code-history-viewer
从源码构建
git clone https://github.com/jhlee0409/claude-code-history-viewer.git
cd claude-code-history-viewer
# Option 1: Using just (recommended)
brew install just # or: cargo install just
just setup
just dev # Development
just tauri-build # Production build
# Option 2: Using pnpm directly
pnpm install
pnpm tauri:dev # Development
pnpm tauri:build # Production build
系统要求: Node.js 20.19+(或 22.12+)、pnpm、Rust 工具链
服务器模式 (WebUI)
无需桌面环境,作为无头 HTTP 服务器运行 — 适合 VPS、远程服务器或 Docker。服务器二进制文件内嵌前端 — 只需一个文件。
快速安装
# Homebrew (macOS / Linux)
brew install jhlee0409/tap/cchv-server
# Or one-line script
curl -fsSL https://raw.githubusercontent.com/jhlee0409/claude-code-history-viewer/main/install-server.sh | sh
两种方式都会将 cchv-server 安装到 PATH。
启动服务器
cchv-server --serve
输出:
🔑 Auth token: b77f41d4-ec24-4102-8f7a-8a942d6dd4a0
Open in browser: http://192.168.1.10:3727?token=b77f41d4-ec24-4102-8f7a-8a942d6dd4a0
👁 File watcher active: /home/user/.claude/projects
🚀 WebUI server running at http://0.0.0.0:3727
在浏览器中打开 URL — 令牌会自动保存。
预构建二进制文件
| 平台 | 资产 |
|---|---|
| Linux x64 | cchv-server-linux-x64.tar.gz |
| Linux ARM64 | cchv-server-linux-arm64.tar.gz |
| macOS ARM | cchv-server-macos-arm64.tar.gz |
| macOS x64 | cchv-server-macos-x64.tar.gz |
从 Releases 下载。
CLI 选项:
| 标志 | 默认值 | 描述 |
|---|---|---|
--serve |
— | 必需。 启动 HTTP 服务器而非桌面应用 |
--port <number> |
3727 |
服务器端口 |
--host <address> |
0.0.0.0 |
绑定地址(仅本地: 127.0.0.1) |
--token <value> |
自动 (uuid v4) | 自定义认证令牌 |
--no-auth |
— | 禁用认证(不建议在公共网络使用) |
--dist <path> |
内嵌 | 使用外部 dist/ 目录替代内嵌前端 |
认证
所有 /api/* 端点受 Bearer 令牌认证保护。令牌在每次服务器启动时自动生成并输出到 stderr。
- 浏览器访问: 使用启动时输出的
?token=...URL。令牌自动保存到localStorage。 - API 访问: 包含
Authorization: Bearer <token>请求头。 - 自定义令牌:
--token my-secret-token设置自定义令牌。 - 环境变量:
CCHV_TOKEN=your-token cchv-server --serve(适用于 systemd/Docker)。 - 禁用:
--no-auth完全跳过认证(仅在可信网络使用)。
实时更新
服务器监控 ~/.claude/projects/ 的文件变化,并通过 SSE(Server-Sent Events)将更新推送到浏览器。在另一个终端使用 Claude Code 时,查看器自动更新 — 无需手动刷新。
Docker
docker compose up -d
启动后检查令牌:
docker compose logs webui
# 🔑 Auth token: ... ← 将此 URL 粘贴到浏览器
docker-compose.yml 将 ~/.claude、~/.codex 和 ~/.local/share/opencode 作为只读卷挂载。
示例 Docker 配置只挂载 Claude、Codex 和 OpenCode。要浏览其他提供商,请将其本地数据目录以只读卷挂载到容器内该提供商预期的路径,然后重启容器。
systemd 服务
在 Linux 上持久运行服务器,使用提供的 systemd 模板:
sudo cp contrib/cchv.service /etc/systemd/system/
sudo systemctl edit --full cchv.service # Set User= to your username
sudo systemctl enable --now cchv.service
从源码构建(仅服务器)
just serve-build # Build frontend + embed into server binary
just serve-build-run # Build and run (embedded assets)
# Or run in development (external dist/):
just serve-dev # Build frontend + run server with --dist
健康检查
GET /health
→ { "status": "ok" }
使用方法
- 启动应用
- 自动扫描全部 31 个支持的提供商(Claude Code、Codex CLI、Gemini CLI、Cursor、Cline、Continue.dev、Goose、Zed、Qwen Code、Amazon Q CLI 等 — 参见上方提供商表格)的对话数据
- 在左侧边栏浏览项目 — 使用标签栏按提供商筛选
- 点击会话查看消息
- 使用标签页在消息、分析、Token 统计、最近编辑和会话面板之间切换
命令行参数
使用以下任一选择器启动应用并预先聚焦到指定会话:
# Full UUID
claude-code-history-viewer --session 1265cd74-caa9-472e-b343-c4f44b5cf12c
# UUID prefix (8+ hex-or-dash chars, up to 36) — first match wins
claude-code-history-viewer --session 1265cd74
# Equals form also works
claude-code-history-viewer --session=1265cd74
# Exact Claude session-folder name under ~/.claude/projects/
claude-code-history-viewer --session-folder my-project
# Case-insensitive substring match against session titles
claude-code-history-viewer --session-title "auth bug"
--session 接受完整 UUID、UUID 前缀或 .jsonl 会话文件的绝对路径。--session-folder 精确匹配 Claude 会话文件夹名称;--session-title 按不区分大小写的标题子字符串搜索,匹配多个会话时可能显示选择器。若同时提供多个选择器,优先级为 --session > --session-folder > --session-title。
注册了协议的桌面环境还支持以下深层链接格式:
file:///absolute/path/to/session.jsonl
claude-code-history-viewer://session/1265cd74-caa9-472e-b343-c4f44b5cf12c
claude-code-history-viewer://session-folder/my-project
claude-code-history-viewer://session-title/auth%20bug
应用会扫描所有已知项目并导航到匹配的会话;若没有匹配会话,则按正常流程启动。
无障碍
为键盘操作、低视力和屏幕阅读器用户提供无障碍功能。
- 键盘优先导航:
- 项目浏览器、主内容区、消息导航器和设置的跳转链接
ArrowUp/ArrowDown/Home/End导航项目树,支持输入即搜,*展开兄弟组ArrowUp/ArrowDown/Home/End导航消息导航器,Enter打开聚焦的消息
- 视觉无障碍:
- 持久化的全局字体大小缩放(
90%、100%、110%、120%、130%) - 设置中高对比度模式切换
- 持久化的全局字体大小缩放(
- 屏幕阅读器支持:
- 地标和树/列表语义(
navigation、tree、treeitem、group、listbox、option) - 状态/加载和项目树导航/选择变更的实时播报
- 通过
aria-describedby提供内联键盘帮助说明
- 地标和树/列表语义(
技术栈
| 层级 | 技术 |
|---|---|
| 后端 | |
| 前端 | |
| 状态管理 | |
| 构建工具 | |
| 国际化 |
数据隐私
桌面模式以本地为主。 对话文件从本地磁盘读取;不会上传对话数据,也没有分析、跟踪或遥测。
服务器模式会有意将本地文件提供给能够访问服务器的浏览器和客户端。仅限本机使用时请绑定到 127.0.0.1;向网络公开前请保持令牌身份验证启用。
常见问题
| 问题 | 解决方案 |
|---|---|
| "未找到 Claude 数据" | 确保 ~/.claude 目录存在且包含对话历史 |
| 缺少某个提供商 | 检查提供商表中的数据路径。要添加其他 Claude 目录,请打开设置 → 自定义 Claude 目录。使用 Docker 时,将该提供商的数据目录作为只读卷挂载。 |
| 无法连接 WebUI | cchv-server 默认使用 3727 端口。使用启动时输出的 URL;远程连接时检查端口冲突以及防火墙/代理规则。 |
| "Unauthorized" / HTTP 401 | 使用启动时输出的令牌 URL,或发送 Authorization: Bearer <token>。固定令牌可通过 --token 或 CCHV_TOKEN 设置。 |
| 性能问题 | 大量历史记录初次加载可能较慢 — 应用使用虚拟滚动优化性能 |
| 更新问题 | 如果自动更新失败,请从 Releases 手动下载 |
贡献
欢迎贡献! 以下是入门指南:
- Fork 本仓库
- 创建功能分支 (
git checkout -b feat/my-feature) - 提交前运行检查:
pnpm exec tsc --build . # TypeScript pnpm vitest run # 测试 pnpm lint # 代码检查 just rust-check-all # Rust 格式检查、clippy 和测试 pnpm run i18n:validate # 语言环境一致性 - 提交更改 (
git commit -m 'feat: add my feature') - 推送到分支 (
git push origin feat/my-feature) - 创建 Pull Request
查看 开发命令 了解完整的可用命令列表。
许可证
MIT — 免费用于个人和商业用途。