Skip to content

ericblue/cowork-explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Cowork Explorer

Python 3.10+ License: MIT

Browse, search, and export Claude Desktop Cowork session history from the command line or a local web UI.

See docs/PRD.md for the full product requirements document.

Quick Start

# List all sessions (shows archive status)
./cowork list

# Show a specific session (prefix match on ID)
./cowork show 43ae3293

# Search across all conversations
./cowork search "context management"

# Export a session to markdown
./cowork export 43ae3293 > session.md

# View usage stats
./cowork stats
./cowork stats 43ae3293

# Restore archived sessions
./cowork unarchive 43ae3293
./cowork unarchive-all

# Migrate sessions (symlink legacy dir for Desktop compatibility)
./cowork migrate

# Launch web UI
./cowork serve
# Open http://127.0.0.1:8484

Using Make

make list                    # List all sessions
make show ID=43ae3293        # Show session transcript
make search Q="context"      # Full-text search
make export ID=43ae3293      # Export to markdown
make stats                   # Usage stats
make unarchive ID=43ae3293   # Restore archived session
make unarchive-all           # Restore all archived sessions
make migrate                 # Symlink claude-code-sessions to legacy dir
make serve                   # Web UI in foreground
make start PORT=9888         # Web UI in background
make stop                    # Stop background server
make status                  # Check server status

Requirements

  • Python 3.10+
  • macOS
  • No external dependencies

Data Paths

The tool scans both session directories (deduplicating by session ID):

  • ~/Library/Application Support/Claude/claude-code-sessions/ (current)
  • ~/Library/Application Support/Claude/local-agent-mode-sessions/ (legacy)

If your old sessions aren't showing in Claude Desktop after an update, run ./cowork migrate to create a symlink from the new path to the legacy directory, then restart Desktop.

CLI Reference

Command Description
list / ls List all sessions (title, date, model, archive status)
show <id> Display full conversation
search <query> Full-text search across all sessions
export <id> Export session as markdown
stats [id] Token usage, costs, tool call counts
unarchive <id> Restore archived session (set isArchived: false)
unarchive-all Restore all archived sessions
migrate Symlink claude-code-sessions to local-agent-mode-sessions
serve Launch local web UI on port 8484

Flags

  • --format json|text|markdown — output format
  • --limit N — limit results
  • --since YYYY-MM-DD — filter by date
  • --thinking — include Claude's thinking blocks
  • --data-path PATH — custom data directory
  • --port PORT — web server port (default: 8484)

Web UI

Run ./cowork serve and open http://127.0.0.1:8484

  • Sessions — sortable list of all cowork sessions (title, date, model, working directory)
  • Session Viewer — full conversation with collapsible thinking blocks, tool calls, and clickable file links (VM paths resolved to host)
  • Search — full-text search with highlighted context snippets
  • Stats — token usage and cost breakdown per session
  • Export — download any session as markdown
  • Light/Dark mode — toggle via button in the header (preference saved in browser)

About

Claude Cowork Explorer is a lightweight CLI and web tool for browsing, searching, and exporting Claude Desktop Cowork session history.

Claude Desktop's Cowork feature stores conversation sessions locally on macOS as JSON files, but provides no built-in way to search across past sessions, review old conversations, track token usage and costs, or export transcripts. As sessions accumulate, finding that one conversation where Claude helped you debug a tricky issue — or understanding how much you've spent — becomes increasingly difficult.

Cowork Explorer fills this gap. It reads session data directly from disk and presents it through both a command-line interface and a local web UI with full-text search, token/cost analytics, clickable file links with VM-to-host path resolution, and markdown export.

Design Principles

  • Zero Dependencies — Pure Python stdlib, no pip install required
  • Read-Only by Default — Never modifies session data (except explicit unarchive)
  • Local Only — All data stays on your machine, no network requests
  • Prefix Matching — Session IDs can be abbreviated for convenience

Created by Eric Blue

Repository: github.com/ericblue/cowork-explorer

Version History

Version Date Description
0.1.0 2026-03-05 Initial release

v0.1.0 — Initial Release

  • CLI with list, show, search, export, stats, unarchive, and migrate commands
  • Web UI with session viewer, search, stats, and markdown export
  • Light/dark mode toggle (preference saved in browser)
  • Collapsible thinking blocks and tool call display in session viewer
  • Clickable file links with VM sandbox path-to-host resolution
  • Inline file viewer with security-scoped access controls
  • Token usage and cost breakdown (per session and aggregate)
  • Full-text search with highlighted context snippets
  • Dual data path scanning with deduplication (current + legacy directories)
  • Session migration via symlink for Claude Desktop compatibility
  • Markdown export from both CLI and web UI

About

Browse, search, and export Claude Desktop Cowork session history from the CLI or a local web UI.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors