Skip to content

shivamstaq/ccview

Repository files navigation

ccview

A terminal-based explorer and renderer for Claude Code and OpenCode conversation histories. Browse projects, view conversations with markdown rendering, inspect sub-agents, search across sessions, and export to HTML/Markdown/JSONL.

Built with Bubble Tea, Lip Gloss, and Glamour.

ccview demo

Install

Download binary (easiest)

Download the latest release for your platform from GitHub Releases.

Linux

curl -Lo ccview.tar.gz https://github.com/shivamstaq/ccview/releases/latest/download/ccview_$(curl -s https://api.github.com/repos/shivamstaq/ccview/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')_linux_amd64.tar.gz
tar xzf ccview.tar.gz
sudo mv ccview /usr/local/bin/

macOS

# Apple Silicon (M1/M2/M3/M4)
curl -Lo ccview.tar.gz https://github.com/shivamstaq/ccview/releases/latest/download/ccview_$(curl -s https://api.github.com/repos/shivamstaq/ccview/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')_darwin_arm64.tar.gz
tar xzf ccview.tar.gz
sudo mv ccview /usr/local/bin/

# Intel
curl -Lo ccview.tar.gz https://github.com/shivamstaq/ccview/releases/latest/download/ccview_$(curl -s https://api.github.com/repos/shivamstaq/ccview/releases/latest | grep tag_name | cut -d '"' -f 4 | sed 's/v//')_darwin_amd64.tar.gz
tar xzf ccview.tar.gz
sudo mv ccview /usr/local/bin/

Windows (PowerShell)

$version = (Invoke-RestMethod "https://api.github.com/repos/shivamstaq/ccview/releases/latest").tag_name -replace '^v',''
Invoke-WebRequest -Uri "https://github.com/shivamstaq/ccview/releases/latest/download/ccview_${version}_windows_amd64.zip" -OutFile ccview.zip
Expand-Archive ccview.zip -DestinationPath "$env:LOCALAPPDATA\ccview" -Force
# Add $env:LOCALAPPDATA\ccview to your PATH

Via go install

Requires Go 1.23+. Works on all platforms.

go install github.com/shivamstaq/ccview@latest

From source

git clone https://github.com/shivamstaq/ccview.git
cd ccview
go build -o ccview .

Quick Start

# Launch the interactive TUI explorer
ccview

# Start the web UI
ccview --web

# View a specific conversation file
ccview --file path/to/conversation.jsonl

# Export a conversation to HTML
ccview --export output.html --file path/to/conversation.jsonl

Features

TUI Explorer (default)

ccview

Split-pane interactive explorer. Left pane shows the project tree with conversations, plans, and memory files. Right pane renders conversation content with syntax-highlighted markdown.

  • Multi-provider support - Claude Code (~/.claude/) and OpenCode (~/.local/share/opencode/opencode.db) side by side. Tabbed UI when both are available; tabs hidden with only one provider.
  • Conversations sorted newest-first with smart timestamps
  • Sub-agents collapsed by default, expand on selection
  • Global plans shown in sidebar
  • Tool calls wrap cleanly with aligned continuation lines
  • Mouse selection - Click to focus panes, drag-select text within the content pane, auto-copies to clipboard. Scroll wheel works per-pane.
  • Content search - Press / in the viewer for live debounced search with match highlighting and n/N navigation between matches.
  • Session search - Press / from the project list or sidebar to open a search overlay. Toggle between global and project-scoped results with tab, navigate with j/k, open with enter.
  • Press o to open any file in your $EDITOR
  • Press e for a guided export wizard (format, path, filename)

Web Explorer

ccview --web
ccview --web --port 8080

Opens an interactive web UI at http://localhost:3333 with collapsible thinking blocks, tool call cards, and token usage display.

Export

Press e in the TUI to open the export wizard, or use the CLI:

ccview --export output.html --file conversation.jsonl

Supported formats:

  • HTML - Dark-themed, self-contained, syntax-highlighted
  • Markdown - Clean readable markdown with headers and blockquoted tool calls
  • JSONL - Raw copy of the original conversation file

For full conversations with sub-agents, HTML export creates a directory with index.html linking to individual sub-agent pages.

Keybindings

Sidebar

Key Action
j / k Navigate up/down
Enter Open conversation / expand sub-agents
l / Right Switch to viewer
h / Left / Esc Back to project list
Tab Switch to viewer pane
/ Open session search (project-scoped)
e Export wizard
o Open in $EDITOR
g / G Jump to top/bottom
q Quit

Project List

Key Action
1 / 2 Switch provider tab
/ Open session search (global)

Viewer

Key Action
j / k Scroll up/down
Space / f Page down
b Page up
g / G Jump to top/bottom
/ Search content
n / N Next / previous match
Esc Clear search
Tab / h Switch to sidebar
e Export wizard
o Open in $EDITOR
q Quit

Session Search Overlay

Key Action
tab Toggle global / project scope
j / k Navigate results
Enter Open selected session
Esc Close overlay

What it reads

ccview reads from multiple sources:

Claude Code (~/.claude/)

Source Description
~/.claude/projects/*/ Project directories grouped by working directory
*.jsonl Conversation message logs
*/subagents/*.jsonl Sub-agent conversation threads
*/subagents/*.meta.json Agent type metadata
*/memory/*.md Per-project memory files
*/CLAUDE.md Project-level instructions
~/.claude/plans/*.md Plan documents

OpenCode (~/.local/share/opencode/)

Source Description
opencode.db SQLite database with sessions, messages, and parts
Sessions Grouped by project (worktree path)
Message parts Text, tool calls, reasoning, patches, and file references

Message types rendered

  • User messages - with markdown rendering
  • Assistant messages - with model name, markdown, token usage
  • Thinking blocks - truncated in TUI, collapsible in web/HTML
  • Tool calls - summarized with wrapped overflow (Read, Write, Edit, Bash, Grep, Glob, Agent, etc.)
  • System messages - slash commands shown inline

Architecture

main.go              CLI entry point, flag parsing
provider.go          Provider interface (abstracts data sources)
provider_claude.go   Claude Code provider (filesystem/JSONL)
provider_opencode.go OpenCode provider (SQLite)
data.go              Tree types, project scanning, filesystem loading
parse.go             JSONL parsing, glamour rendering, formatting helpers
ui.go                Bubble Tea TUI with split-pane layout, search
server.go            HTTP server with embedded SPA
export.go            HTML/Markdown/JSONL export

Dependencies

License

MIT

About

A terminal-based explorer and renderer for Claude Code conversation histories. Browse projects, view conversations with markdown rendering, inspect sub-agents, and export to HTML/Markdown/JSONL.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages