Skip to main content

clack

PyPI Python License

A terminal UI for browsing, searching, and resuming Claude Code sessions.

Browse your full session history, read past conversations, jump into stats, and resume any session — all without leaving the terminal.


Install

# pipx
pipx install clack-tui

# uvx (run without installing)
uvx clack-tui

The package name is clack-tui because clack is already taken on PyPI. The package installs both clack and clack-tui executables.

Requires Python 3.11+ and Claude Code installed.


Quick start

clack

clack reads your Claude Code session files directly from ~/.claude/projects/ — no configuration needed.


Features

Tab Key What it does
Dashboard 1 Browse all sessions, search with full-text search (DuckDB FTS / BM25)
Stats 2 Token usage and model breakdown, daily sparklines
Dialog 3 Read any conversation turn-by-turn, export to HTML
Query 4 Write SQL directly against your session data (DuckDB)

Dashboard key bindings

Key Action
/ Focus search
Esc Clear search
Enter Resume session (opens claude --resume)
v View full conversation
p Open the session's PR in a browser (gh pr view -w)
o Page the session's plan doc ($PAGER, default less)
O Open a shell in the session's scratchpad dir
r Refresh session list
a Load all history into raw_records (see Memory)
q Quit

PR column: Each session records the git branch it was working on, so clack can show the pull request that branch belongs to — repo#number with a colored icon for its state:

State
○ blue open
◐ yellow commented
◐ red changes requested
● green approved
✔ dim merged
✕ dim closed

This needs the gh CLI on your PATH and authenticated; without it the column is simply blank. PRs are fetched in the background — one gh pr list per repo, several repos at a time, cached for five minutes — so the dashboard stays responsive and the column fills in repo by repo.

tmux / cmux: If clack is running inside a tmux session, resuming opens the session in a new tmux window (or jumps to the existing pane if that session is already live). The same behavior works inside cmux — clack opens a new cmux workspace via cmux new-workspace --cwd ... --command ..., or focuses the existing pane with cmux focus-pane. Outside any multiplexer, clack suspends the TUI, runs claude --resume, and returns when you exit.

Plan column: A session that ended a plan-mode turn wrote a plan doc to ~/.claude/plans/. Those sessions are marked ▤ in the Plan column (dimmed when the file has since been deleted), the doc's name shows in the detail bar, and o pages it in a new window. Plan bodies are recorded in the transcript itself, so they stay searchable even after the file is gone.

Search scope: The full-text index covers each session's early user messages, its title, summary, and cwd, and the body of its plan doc. If the DuckDB FTS extension is unavailable, dashboard search falls back to simple substring matching.

Query console

The Query console exposes your session data as DuckDB SQL views:

View Contents
v_sessions One row per session — date, project, summary, model, turn count
v_assistant_turns Individual assistant turns with token counts
v_stats Aggregated usage by model
v_sessions_by_day Daily session and token totals
raw_records Raw JSONL records — recently active sessions only; press a to load all history

Example queries:

-- Sessions from the last week
SELECT title, cwd, turn_count FROM v_sessions
WHERE last_active > now() - INTERVAL '7 days';

-- Most token-heavy sessions
SELECT sessionId, SUM(output_tokens) AS total
FROM v_assistant_turns GROUP BY 1 ORDER BY 2 DESC LIMIT 10;

Memory

clack holds your session history in an in-memory DuckDB. To keep that bounded, transcripts for sessions untouched for more than 14 days are not kept resident — only their aggregates are: the dashboard row, token totals, and search text. Everything you see stays complete; the Dashboard, Stats and search all cover your full history regardless of age, and opening an old conversation reads that one file from disk on demand.

The one place the split is visible is the Query console, where raw_records holds recent sessions only. Press a to load the archived transcripts into it — this costs roughly whatever those files weigh on disk, and restarting clack releases it again.

Dev setup

git clone https://github.com/jcc-ne/clack
cd clack
uv sync
uv run clack

Release notes for TestPyPI and Trusted Publishing live in docs/releasing.md.


Requirements

  • Python 3.11+
  • Claude Code (session files at ~/.claude/projects/)
  • tmux or cmux (optional — enables jumping to live sessions and opening resumed sessions in a new window/workspace)

Metadata

Release files for clack-tui 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clack-tui 0.4.3
File Size Uploaded Provenance Actions
clack_tui-0.4.3.tar.gz 44.0 kB With provenance Details for clack_tui-0.4.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for clack-tui 0.4.3
File Interpreter ABI Platform Actions
clack_tui-0.4.3-py3-none-any.whl Python 3 none any Details for clack_tui-0.4.3-py3-none-any.whl

Total release size: 93.5 kB

Release files / clack_tui-0.4.3.tar.gz

Download URL clack_tui-0.4.3.tar.gz
Size 44.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a5f457678b89a6734af9aceb71996b0723fef68c11d5c19dbb073e562cf68718
BLAKE2b-256 checksum
How to use checksums
ec77148b5b329aca491599de9fd40b862b9748b4418ec75a51ba2daf1f22d4aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Release files / clack_tui-0.4.3-py3-none-any.whl

Download URL clack_tui-0.4.3-py3-none-any.whl
Size 49.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3f6bff82075a199a77841684835ef784922d12d03ac4efb8fa7f171f2126809a
BLAKE2b-256 checksum
How to use checksums
1203b71dd912983761df06b8cbd3f2d09f7800c0426f92506c06fd6a4a47536c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

Security for clack-tui 0.4.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for clack_tui-0.4.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Oct 9, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page