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.

deja-claude screenshot

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-1.0.1.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-1.0.1-py3-none-any.whl (24.5 kB view details)

Uploaded Python 3

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

Hashes for deja_claude-1.0.1.tar.gz
Algorithm Hash digest
SHA256 1e70a2ca31f165a300958e2d96fa4d04aaf85f7296184ea511dbbbec2056aa5d
MD5 c78e4859aad0bbdf43b90cdd0ab7092b
BLAKE2b-256 41213022e2d6968d03527e020f75e695ba2269e22c27de45bbce2338066eafaf

See more details on using hashes here.

Provenance

The following attestation bundles were made for deja_claude-1.0.1.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-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

Hashes for deja_claude-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 10dc4d7fef9254e5746662c9d75494329f303999261482677fe42ce5464411fe
MD5 a372686c5688482eb32ab890863c64f5
BLAKE2b-256 9485f49c7356e68190d9aeb485d3d2176399dfa14d092ae5bf3963f54164e978

See more details on using hashes here.

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

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