A terminal UI for browsing your Claude Code session history, previewing conversations, and resuming or starting sessions in their original working directory.
Sessions grouped by project with an expanded group showing individual sessions. The right pane displays a scrollable conversation preview with the session's working directory and git branch in the info bar.
Cycle through display modes with Tab to change how projects are labeled in the session list.
Tree view — project:
Tree view — short directory path:
Tree view — full directory path:
All sessions in a single chronological list with project name, relative timestamp, and message count.
Flat view — project name:
Flat view — short directory path:
Flat view — full directory path:
Press r to rename a session with a custom title that appears alongside the timestamp and message count.
Press N to open a full directory browser overlay for starting a new Claude session in any directory.
- Tree view (default) — sessions grouped by project, collapsed on startup, expand/collapse with arrow keys
- Flat view — all sessions in a single sorted list with project name, date, and message count
- Display modes — cycle through Name, Short Dir, and Full Dir labels for project groups in tree view
- Shows a scrollable preview of conversation messages (last 20 turns)
- Session info bar — displays working directory and git branch for the selected session; shows the project directory even when a header row is selected with no active session
- Resume any session directly — opens
claude --resume <id>in the original project directory - New session — launch a new Claude session in the selected project's directory (
n) or browse to any directory (N) - Directory browser — full overlay for navigating the filesystem, with path input and directory listing
- Search and filter sessions by project name or path
- Toggle visibility of empty sessions (no data file) with
e - Lazy-loads and caches session previews for fast navigation
- Auto-update — checks GitHub Releases in the background on startup (every 24h), shows a centered prompt with current vs new version, and self-updates the binary on confirm
- Session names — custom titles loaded in the background for fast startup
- Persistent config — view mode, display mode, hide-empty preference, and update check timestamp saved to
~/.config/ccsm/config.json - Optional path argument to scope sessions to a specific directory
- Version label displayed in the bottom-right of the help bar
- Catppuccin Mocha-inspired color theme
- macOS (ARM64) — additional platforms coming soon
- Claude Code CLI installed and on your
PATH - Existing session history in
~/.claude/
curl -fsSL https://raw.githubusercontent.com/faulker/ccsm/main/remote-install.sh | bashThis downloads the latest release binary from GitHub and installs it to ~/.local/bin/ccsm. Make sure ~/.local/bin is in your PATH.
./install.shThis builds a release binary and symlinks it to ~/.local/bin/ccsm. Requires Rust 1.75+.
cargo build --releaseThe binary will be at target/release/ccsm.
cargo run --release
# or
./target/release/ccsmOptionally pass a path to show only sessions from that directory:
./target/release/ccsm ~/projects/my-appUse --flat to start in flat view instead of the default grouped tree view:
./target/release/ccsm --flat
./target/release/ccsm --flat ~/projects/my-app| Key | Action |
|---|---|
j / ↓ |
Next session |
k / ↑ |
Previous session |
l / → |
Expand group (tree view) |
h / ← |
Collapse group (tree view) |
Enter |
Resume session / toggle group |
Tab / Shift + Tab |
Cycle: tree [name] → tree [short dir] → tree [full dir] → flat → tree [name] |
Shift + J |
Scroll preview down |
Shift + K |
Scroll preview up |
/ |
Activate search/filter mode |
e |
Toggle show/hide empty sessions |
n |
New Claude session in selected project's directory |
Shift + N |
Open directory browser to start a new session anywhere |
r |
Rename selected session |
q / Esc / Ctrl+C |
Quit |
When an update is available, a centered dialog appears:
| Key | Action |
|---|---|
y |
Download and install the update |
n / Esc |
Dismiss until next run |
When filter mode is active (triggered by /):
| Key | Action |
|---|---|
| Type characters | Filter sessions by project name or path (case-insensitive) |
↓ / ↑ |
Navigate results (stays in filter mode) |
Enter |
Exit filter mode (keeps filter active) |
Backspace |
Delete last character |
Esc |
Clear filter text and exit filter mode |
When the directory browser is open (triggered by N):
| Key | Action |
|---|---|
↑ / ↓ |
Navigate directory listing |
Enter |
Enter selected directory |
Space |
Select current directory and launch new session |
/ |
Type a path directly |
Esc |
Cancel and close browser |
Settings are persisted to ~/.config/ccsm/config.json and automatically saved when changed:
{
"tree_view": true,
"display_mode": "name",
"hide_empty": true,
"last_update_check": 1710200000
}| Field | Values | Description |
|---|---|---|
tree_view |
true / false |
Start in tree or flat view |
display_mode |
"name", "short_dir", "full_dir" |
How project groups are labeled in tree view |
hide_empty |
true / false |
Whether to hide sessions with no data file |
last_update_check |
Unix timestamp | When the last update check was performed (auto-managed) |
- Reads
~/.claude/history.jsonlto build a list of sessions with project paths and timestamps - On selection, loads the session file from
~/.claude/projects/{path}/{sessionId}.jsonl - Extracts session metadata (working directory, git branch) and displays it in an info bar
- Filters to user/assistant messages and displays the last 20 turns as a preview
- On startup, spawns a background thread to check GitHub Releases for newer versions (respects 24h cooldown)
- Session custom titles are loaded in the background to avoid blocking startup
- On Enter, suspends the TUI and runs
claude --resume <id>in the session's original directory - On
n/N, launches a newclaudesession in the chosen directory - If the user accepts an update, the TUI suspends, downloads the new binary, replaces the current executable, and resumes
- After Claude exits, the TUI resumes
ratatui— TUI rendering frameworkcrossterm— terminal backend and event handlingserde/serde_json— JSON parsingdirs— home directory and config directory detectionchrono— relative timestamp formattinganyhow— error handlingureq— lightweight HTTP client for GitHub Releases APIflate2— gzip decompression for release archivestar— tar archive extraction
cargo test







