Skip to main content

TUI browser for Claude Code conversation sessions

Project description

deja-claude

CI PyPI version Python 3.10+ License: MIT

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.jsonl for 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's app.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

deja_claude-0.1.0.tar.gz (25.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

deja_claude-0.1.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

Details for the file deja_claude-0.1.0.tar.gz.

File metadata

  • Download URL: deja_claude-0.1.0.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

Hashes for deja_claude-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f9e39350165dcc164d0e465cb32e1b6dd7db592cb75dadbd199fbd19321de651
MD5 e99db92fe6f5fef5acae46f16e0e6c3a
BLAKE2b-256 e047f1f44e1e1b97026df8727920b0d1ca765a9675b9ea62bf24441f29bc92bc

See more details on using hashes here.

Provenance

The following attestation bundles were made for deja_claude-0.1.0.tar.gz:

Publisher: publish.yml on alpamayo-solutions/deja-claude

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file deja_claude-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: deja_claude-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 24.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for deja_claude-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 89288d2bfb6088c93207d4556988158e3c9c5a0ec487440af90bc75fad25b344
MD5 f469a8d08c6995e77d431943678bad89
BLAKE2b-256 e255dbeb12ddd18922a072b6f3505477aaad8b82bbaa4279fc8333f4ffc809e8

See more details on using hashes here.

Provenance

The following attestation bundles were made for deja_claude-0.1.0-py3-none-any.whl:

Publisher: publish.yml on alpamayo-solutions/deja-claude

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page