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-1.0.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-1.0.0-py3-none-any.whl (24.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: deja_claude-1.0.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-1.0.0.tar.gz
Algorithm Hash digest
SHA256 9e298799e980168dfb826df15f84d8f53a82d232a468ee4e4c33e7759e7987e7
MD5 cefd7127c12e487fcdd22f03cef18dd6
BLAKE2b-256 3579a9af3a4b7d34a6c93251d53f2379a91a5cefab9a770ac86afee355363b98

See more details on using hashes here.

Provenance

The following attestation bundles were made for deja_claude-1.0.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-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: deja_claude-1.0.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-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 12f363b1707bad1618ff708118bba6c3d5af424f97d03277a1fe48375c92e98d
MD5 96b7a04cca062f55e670931d4e4ac12c
BLAKE2b-256 b409e48fd3c6d5cfe6d3bb9f6abf475dde36b9cb17864dac023f0ab8c0f2f379

See more details on using hashes here.

Provenance

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