TUI browser for Claude Code conversation sessions
Project description
deja-claude
A keyboard-driven TUI for browsing, previewing, and managing Claude Code conversation sessions.
Claude Code stores every conversation as JSONL files in ~/.claude/projects/. With hundreds of sessions, there's no good way to browse, search, preview, or manage them. deja-claude gives you a lazydocker-style interface to navigate your session history.
Installation
With pipx (recommended):
pipx install deja-claude
With pip:
pip install deja-claude
From source:
git clone https://github.com/alpamayo-solutions/deja-claude.git
cd deja-claude
pip install -e ".[dev]"
Usage
deja-claude # browse all sessions
deja-claude /path/to/project # filter to sessions from that folder
The optional path argument filters sessions to only those whose working directory matches the given folder. Without it, the default_folder from settings is used (defaults to ~, which shows everything).
The interface has three panels:
- Left: Project tree with session counts -- navigate to filter instantly
- Center: Session list -- searchable, shows last message from each session
- Right: Conversation preview with styled text
Keyboard Shortcuts
Navigation
| Key | Action |
|---|---|
Left / Right |
Move focus between panels |
Tab |
Cycle focus between panels |
1 2 3 |
Focus panel directly |
Up / Down |
Navigate within a panel |
Actions
| Key | Action |
|---|---|
o / Enter |
Open session in Claude Code (resumes in the original directory) |
d |
Delete session (with confirmation) |
e |
Export session as Markdown |
r |
Rename session (persisted across restarts) |
/ |
Search / filter sessions |
Escape |
Clear search / close dialog |
Display
| Key | Action |
|---|---|
t |
Toggle tool calls in preview |
w |
Toggle thinking blocks in preview |
R |
Refresh (rescan sessions) |
? |
Help |
q |
Quit |
Configuration
Settings are stored in ~/.config/deja-claude/settings.json:
{
"default_folder": "~",
"show_tool_messages": false,
"show_thinking": false,
"sort_by": "date",
"sort_descending": true,
"export_dir": "~/Desktop"
}
| Setting | Description |
|---|---|
default_folder |
Default project folder to filter sessions (overridden by CLI argument) |
show_tool_messages |
Show tool calls in preview by default |
show_thinking |
Show thinking blocks in preview by default |
export_dir |
Directory for exported Markdown files |
Session names (set with r) are stored in ~/.config/deja-claude/metadata.json and persist across restarts.
How It Works
Index scan (~100ms at startup):
- Walks
~/.claude/projects/*/for JSONL files - Reads head + tail of each file to extract metadata and last message
- Cross-references with
~/.claude/history.jsonlfor fallback display text
Preview (on session select):
- Reads the last 512KB of the file (handles 40MB+ sessions without lag)
- Renders the last 40 turns as styled text in a single widget
- Debounced to stay responsive during rapid scrolling
Open in terminal:
cds into the session's original working directory- Runs
claude -r {session_id}via Textual'sapp.suspend() - When the Claude session ends, deja-claude resumes automatically
Requirements
- Python 3.10+
- Textual (installed automatically)
Contributing
See CONTRIBUTING.md for development setup and guidelines.
License
MIT
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 deja_claude-1.0.1.tar.gz.
File metadata
- Download URL: deja_claude-1.0.1.tar.gz
- Upload date:
- Size: 25.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e70a2ca31f165a300958e2d96fa4d04aaf85f7296184ea511dbbbec2056aa5d
|
|
| MD5 |
c78e4859aad0bbdf43b90cdd0ab7092b
|
|
| BLAKE2b-256 |
41213022e2d6968d03527e020f75e695ba2269e22c27de45bbce2338066eafaf
|
Provenance
The following attestation bundles were made for deja_claude-1.0.1.tar.gz:
Publisher:
publish.yml on alpamayo-solutions/deja-claude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deja_claude-1.0.1.tar.gz -
Subject digest:
1e70a2ca31f165a300958e2d96fa4d04aaf85f7296184ea511dbbbec2056aa5d - Sigstore transparency entry: 1110744573
- Sigstore integration time:
-
Permalink:
alpamayo-solutions/deja-claude@4a9f0b026ea68ad635985e6920336eea0d17bd4a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/alpamayo-solutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a9f0b026ea68ad635985e6920336eea0d17bd4a -
Trigger Event:
push
-
Statement type:
File details
Details for the file deja_claude-1.0.1-py3-none-any.whl.
File metadata
- Download URL: deja_claude-1.0.1-py3-none-any.whl
- Upload date:
- Size: 24.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
10dc4d7fef9254e5746662c9d75494329f303999261482677fe42ce5464411fe
|
|
| MD5 |
a372686c5688482eb32ab890863c64f5
|
|
| BLAKE2b-256 |
9485f49c7356e68190d9aeb485d3d2176399dfa14d092ae5bf3963f54164e978
|
Provenance
The following attestation bundles were made for deja_claude-1.0.1-py3-none-any.whl:
Publisher:
publish.yml on alpamayo-solutions/deja-claude
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
deja_claude-1.0.1-py3-none-any.whl -
Subject digest:
10dc4d7fef9254e5746662c9d75494329f303999261482677fe42ce5464411fe - Sigstore transparency entry: 1110744659
- Sigstore integration time:
-
Permalink:
alpamayo-solutions/deja-claude@4a9f0b026ea68ad635985e6920336eea0d17bd4a -
Branch / Tag:
refs/tags/v1.0.1 - Owner: https://github.com/alpamayo-solutions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4a9f0b026ea68ad635985e6920336eea0d17bd4a -
Trigger Event:
push
-
Statement type: