Skip to content

davidpp/claude-session-browser

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Session Browser

A terminal user interface (TUI) for browsing and resuming Claude Code sessions.

GitHub release (latest by date) GitHub Workflow Status Go Version

Features

  • 📁 Browse Claude Code sessions with a clean TUI
  • ⚡ Fast and lightweight - parses sessions on demand
  • 📋 Copy resume commands to clipboard with one keystroke
  • 🕐 Relative timestamps (e.g., "2 hours ago")
  • 📍 Auto-detect current project directory
  • 💻 Cross-platform support (macOS, Linux, Windows)

Installation

Download Pre-built Binary (Recommended)

Download the latest release for your platform from the Releases page.

macOS

# For Apple Silicon (M1/M2/M3)
curl -L https://github.com/davidpp/claude-session-browser/releases/latest/download/claude-session-browser-darwin-arm64.tar.gz | tar xz
sudo mv claude-session-browser-darwin-arm64 /usr/local/bin/claude-session-browser

# For Intel Macs
curl -L https://github.com/davidpp/claude-session-browser/releases/latest/download/claude-session-browser-darwin-amd64.tar.gz | tar xz
sudo mv claude-session-browser-darwin-amd64 /usr/local/bin/claude-session-browser

Linux

# For AMD64
curl -L https://github.com/davidpp/claude-session-browser/releases/latest/download/claude-session-browser-linux-amd64.tar.gz | tar xz
sudo mv claude-session-browser-linux-amd64 /usr/local/bin/claude-session-browser

# For ARM64
curl -L https://github.com/davidpp/claude-session-browser/releases/latest/download/claude-session-browser-linux-arm64.tar.gz | tar xz
sudo mv claude-session-browser-linux-arm64 /usr/local/bin/claude-session-browser

Windows

Download the appropriate .zip file from the Releases page:

  • claude-session-browser-windows-amd64.zip for 64-bit systems
  • claude-session-browser-windows-arm64.zip for ARM64 systems

Extract and add to your PATH.

Install from Source

If you have Go 1.24+ installed:

go install github.com/davidpp/claude-session-browser@latest

Build from Source

git clone https://github.com/davidpp/claude-session-browser
cd claude-session-browser
go build -o claude-session-browser

Usage

Simply run the command from anywhere:

claude-session-browser

The app will automatically find your Claude sessions in ~/.claude/projects/. If you're in a directory with an active Claude project, it will open that project directly.

Keyboard Shortcuts

  • ↑↓ or j/k - Navigate through sessions
  • Enter - Copy resume command to clipboard
  • / - Search sessions (full-text search in all messages)
  • Esc - Exit search mode
  • r - Refresh session list
  • q - Quit
  • Ctrl+C - Force quit

Search Feature

The search feature performs full-text search across all messages in all sessions:

Search Modes:

  • Normal Mode: Default view with all sessions
  • Search Input Mode: Typing your search query (bright purple border)
  • Search Results Mode: Navigating filtered results (dimmed border)

How to use:

  1. Press / to enter search mode
  2. Type your search query - results update in real-time
  3. Press Tab or Enter to navigate the filtered results
  4. Use ↑↓ or j/k to move through matching sessions
  5. Press / again to modify your search
  6. Press Esc to clear search and return to all sessions

Features:

  • Shows match count [n] next to each session
  • View match previews in the details pane with context
  • Search bar shows different states (focused/unfocused)
  • Persistent search results until explicitly cleared
  • Requires ripgrep (rg) to be installed for best performance

Command Line Options

# Show help
claude-session-browser --help

# Use a custom Claude directory
claude-session-browser --claude-dir ~/my-claude-projects

How It Works

  1. The app reads JSONL session files from your Claude projects directory
  2. Sessions are displayed with relative timestamps and truncated IDs
  3. Select a session to see details including summary and full JSON data
  4. Press Enter to copy the resume command to your clipboard
  5. Paste the command in your terminal to resume the session

Development

Prerequisites

  • Go 1.24 or higher
  • Make (optional, for using Makefile)

Building

# Development build
go build

# Production build with optimizations
go build -ldflags="-s -w" -o claude-session-browser

# Run tests
go test ./...

Project Structure

claude-session-browser/
├── main.go                 # Entry point
├── internal/
│   ├── model/             # Data models
│   ├── parser/            # JSONL parser
│   ├── ui/                # TUI components
│   └── clipboard/         # Clipboard manager

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

License

MIT License - see LICENSE file for details.

Acknowledgments

Built with:

About

TUI browser for Claude Code sessions - browse and resume your Claude coding sessions

Resources

License

Stars

Watchers

Forks

Packages

No packages published