Terminal UI for browsing, previewing, resuming and managing Claude Code sessions
Project description
ccsessions
A fast terminal UI for browsing, previewing, resuming and managing Claude Code terminal sessions.
Features
-
Project & session browser — every Claude Code project on your machine, newest first, with live-session indicators (●), message counts and token usage (input / output / cache read / cache write)
-
Conversation preview — the tail of any session rendered with roles, Markdown (for Claude's replies), tool calls (⚙) and slash commands (⌘), without opening Claude Code
-
One-key resume —
rreplaces the TUI withclaude --resume <id>in the session's working directory;ccopies a readycd <dir> && claude --resume <id>command to the clipboard (OSC 52) -
Archive & delete — move sessions out of
claude --resume(reversibly) or delete them for good, per session or per project, with confirmation dialogs; sessions whose transcript lives on another synced machine are detected and marked (✕) -
Responsive layout — wide terminals get a side-by-side layout with a full-height conversation pane; narrow (half-screen) terminals get a stacked layout with a full-width conversation pane:
-
Fast — token stats are cached per transcript (invalidated by mtime + size), scanning runs off the UI thread, and conversation previews read only the tail of multi-megabyte files
Requirements
- Python ≥ 3.10
- Claude Code installed (
claudeon PATH — needed only for resuming) - macOS or Linux (Windows untested)
Installation
pipx install ccsessions-tui # or: uv tool install ccsessions-tui
Both install the ccsessions command.
Or from a clone:
git clone https://github.com/miskiewiczm/ccsessions
pip install -e ccsessions
Usage
ccsessions
| Key | Action |
|---|---|
j / k / arrows |
Move within the focused pane |
Tab / Shift+Tab |
Switch panes |
r |
Resume the selected session (in place) |
c |
Copy the resume command to the clipboard |
a |
Archive ↔ restore session · archive ↔ restore project |
d |
Delete session / project (with confirmation) |
n |
Rename project (set a display alias) |
/ |
Filter the focused list (projects or sessions) |
Ctrl+R |
Rescan ~/.claude |
q |
Quit |
a and d act on the session when the Sessions pane is focused and on
the whole project when the Projects pane is focused.
Project names default to the last component of the project's working
directory. n sets a purely cosmetic alias (stored in
~/.config/ccsessions/aliases.json — nothing under ~/.claude is touched);
submitting an empty alias removes the entry and restores the default name.
Configuration
- Theme — switch at runtime with Ctrl+P → "Change theme"; the choice is
remembered across runs (
~/.config/ccsessions/settings.json). TheCCSESSIONS_THEMEenv var overrides it. The defaultansi-darkfollows your terminal's palette and keeps terminal transparency; RGB themes (nord,gruvbox,tokyo-night,dracula, …) paint opaque backgrounds. - Code blocks — fenced code follows the app theme with a matching
pygments style. Set
CCSESSIONS_CODE_THEMEto pin a specific one (any name frompygments.styles.get_all_styles()). ~/.config/ccsessions/aliases.json— project display aliases, managed with thenkey.
How it works
ccsessions reads the data Claude Code already keeps on disk:
~/.claude/projects/<encoded-path>/*.jsonl— session transcripts~/.claude/projects/<encoded-path>/sessions-index.json— session metadata (summaries, first prompts, message counts)~/.claude/sessions/*.json— live-session records (PID liveness is checked with signal 0)
Archiving a session moves its transcript into an archived/ subdirectory of
the project folder (invisible to claude --resume, fully restorable).
Archiving a project moves the whole folder to ~/.claude/projects-archive/;
archived projects stay listed (dimmed, ▪) after the active ones and can be
restored with a. Deleting removes the transcript and its index entry.
Token-stats caching lives in ~/.cache/ccsessions/.
Note: Claude Code automatically deletes transcripts older than its
cleanupPeriodDayssetting (30 days by default). If you rely on your session history, raise that value in~/.claude/settings.json.
Privacy
Everything happens locally: ccsessions only reads files under ~/.claude/
and writes its cache under ~/.cache/ccsessions/. It makes no network
requests and sends nothing anywhere.
Development
pip install -e . --group dev
pytest
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccsessions_tui-0.1.0.tar.gz.
File metadata
- Download URL: ccsessions_tui-0.1.0.tar.gz
- Upload date:
- Size: 3.2 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c22ce530c616e9baad643cb6c7e2c7f0560303e6050366e9a14f0df6e71557dd
|
|
| MD5 |
63876c11a5043a68a874d912cd72827b
|
|
| BLAKE2b-256 |
ab8b7e771a429255b06a631f187e3c4edd171b5b97d24422f37322080d652f24
|
Provenance
The following attestation bundles were made for ccsessions_tui-0.1.0.tar.gz:
Publisher:
publish.yml on miskiewiczm/ccsessions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccsessions_tui-0.1.0.tar.gz -
Subject digest:
c22ce530c616e9baad643cb6c7e2c7f0560303e6050366e9a14f0df6e71557dd - Sigstore transparency entry: 2272274282
- Sigstore integration time:
-
Permalink:
miskiewiczm/ccsessions@020e7d97d8e9559ce9411c67bd1f33780c4412c8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miskiewiczm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@020e7d97d8e9559ce9411c67bd1f33780c4412c8 -
Trigger Event:
release
-
Statement type:
File details
Details for the file ccsessions_tui-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ccsessions_tui-0.1.0-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c6430f5daffb5026aba65bcdfa144597fd7f645a7683d6bfd6cb0318a11b65f
|
|
| MD5 |
c5aab1ba20f12d2a3c05c019aee80181
|
|
| BLAKE2b-256 |
cdcf4216c97621a5d3e6232a3c11acc030aa7bfa2dc31cc88757f9a67e1116e9
|
Provenance
The following attestation bundles were made for ccsessions_tui-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on miskiewiczm/ccsessions
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ccsessions_tui-0.1.0-py3-none-any.whl -
Subject digest:
6c6430f5daffb5026aba65bcdfa144597fd7f645a7683d6bfd6cb0318a11b65f - Sigstore transparency entry: 2272274326
- Sigstore integration time:
-
Permalink:
miskiewiczm/ccsessions@020e7d97d8e9559ce9411c67bd1f33780c4412c8 -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/miskiewiczm
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@020e7d97d8e9559ce9411c67bd1f33780c4412c8 -
Trigger Event:
release
-
Statement type: