Skip to main content

Claude Code Manager — manage Claude Code projects, sessions, and memory

Project description

ccm

Claude Code Manager — a CLI + TUI for everything Claude Code stores under ~/.claude/projects/.

License: MIT Python uv Stars

List projects, browse sessions, view / delete / export them, inspect memory files, see disk-usage stats — without cd-ing into a directory full of URL-encoded path names.


Quick start

uv tool install git+https://github.com/QuocTang/ccm
ccm                  # launches the TUI
ccm ls               # subcommand mode
ccm stats            # disk-usage dashboard

Requires Python 3.10+ and uv.

Why ccm

~/.claude/projects/ accumulates fast: every Claude Code session writes a JSONL file, every project keeps its own memory directory, and the folder names are a one-way path encoding (/home/q/my_projects/foo-home-q-my-projects-foo). Going in with ls and rm is painful.

  • One pane to navigate them all — projects on the left, sessions on the right, Claude-style spinner up top.
  • Subcommands for scriptingccm ls --sort size -n 10, ccm export <project> -f md, ccm stats.
  • Decodes folder names correctly — by reading the real cwd from inside each session's JSONL, not by replacing - with / and hoping.
  • Knows about memory and PRs — surfaces memory/*.md, counts messages by type, picks up custom session titles.
  • No daemon, no config — operates directly on the on-disk layout Claude Code already uses.

Installation

From source (latest)
git clone https://github.com/QuocTang/ccm
cd ccm
uv tool install .            # global, available as `ccm`
# or for dev work:
uv sync --extra dev
uv run ccm --help
Without cloning
uv tool install git+https://github.com/QuocTang/ccm
Run without installing (one-off)
uvx --from git+https://github.com/QuocTang/ccm ccm ls

Usage

ccm                         # launch TUI (default when no args)
ccm ls                      # list projects (sorted by recent activity)
ccm ls -s size -n 10        # sort by size, top 10
ccm show <project>          # detail for one project
ccm sessions <project>      # list sessions of a project
ccm view <project> <sess>   # render messages of a session
ccm rm <project>            # delete a project directory (with confirm)
ccm rm-session <p> <s>      # delete one session
ccm export <p> [<s>] -f md  # export to markdown (or -f json | raw)
ccm memory <project>        # view memory files
ccm memory <p> --show NAME  # print one memory file
ccm memory <p> --rm NAME    # delete one memory file
ccm stats                   # disk usage dashboard
ccm tui                     # launch TUI explicitly

<project> accepts an encoded dir name, the real cwd path, the basename (e.g. my-project), or any unique substring of either.

<session> accepts the full UUID or a unique prefix (the 8-char head shown by ccm sessions is usually enough).

TUI keys

Key Action
↑/↓ j/k Move cursor
h/l ←/→ Focus projects / sessions pane
Tab Switch panes
Enter Drill in (project → sessions → view)
m Show memory for highlighted project
d Delete focused project / session
r Refresh
q Ctrl+C Quit (or back inside a sub-screen)

Inside a delete-confirm modal: y / Enter to confirm, n / Esc to cancel.

Architecture

Three layers, deliberately separated so domain code stays UI-agnostic.

flowchart LR
    User([Terminal user])
    subgraph ccm
        direction TB
        CLI["cli/<br/><sub>typer subcommands</sub>"]
        TUI["tui/<br/><sub>textual app</sub>"]
        CORE["core/<br/><sub>projects · sessions · memory · stats · export</sub>"]
        SHARED["palette.py · paths.py<br/><sub>shared theme & path helpers</sub>"]
    end
    Disk[("~/.claude/projects/<br/>JSONL sessions + memory/")]

    User -- "ccm <subcommand>" --> CLI
    User -- "ccm (no args)" --> TUI
    CLI --> CORE
    TUI --> CORE
    CLI -.-> SHARED
    TUI -.-> SHARED
    CORE --> Disk

The lossy folder-name encoding is the one bit that requires care: Claude Code replaces both / and _ with -, so paths.real_cwd_from_sessions() reads the actual cwd field from the first session JSONL inside each directory. The naive -/ replacement is only a fallback for empty projects.

Development

uv sync --extra dev                                           # install + pytest
uv run pytest -q                                              # run all tests
uv run pytest tests/core/test_paths.py -k naive_decode        # one test
uv tool install . --force --reinstall                         # rebuild global `ccm`

See CLAUDE.md for architecture notes and the textual / typer gotchas we hit (lossy path encoding, Widget._size shadowing, markup escaping, etc).

Contributing

PRs welcome. Keep the three-layer split (core stays UI-agnostic), run uv run pytest -q before pushing, and follow the gotchas in CLAUDE.md if you touch tui/.

Contributors

Contributors

License

MIT © QuocTang

Star history

Star History Chart

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

claudecm-0.1.0.tar.gz (45.2 kB view details)

Uploaded Source

Built Distribution

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

claudecm-0.1.0-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: claudecm-0.1.0.tar.gz
  • Upload date:
  • Size: 45.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for claudecm-0.1.0.tar.gz
Algorithm Hash digest
SHA256 64c64b129bad15ce890db284d075006fcf0597c5869ace331c78023e6cdd8690
MD5 6f441be0932d944885d582abc2e09f13
BLAKE2b-256 f6352b3c186af2f9f030bfe332e38222089f3391a1d7d93de38a136ba48c8517

See more details on using hashes here.

File details

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

File metadata

  • Download URL: claudecm-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 26.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.14 {"installer":{"name":"uv","version":"0.11.14","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"22.04","id":"jammy","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for claudecm-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 af2dcaaa0a52b50789ba824d4156e713f3d61b7b491df49dee056384fa8075b7
MD5 7f5d932a21b890e4750c9e314c1cf001
BLAKE2b-256 d919f1505029cfaa8172b31e46226143fd2b02d4e5211c0d716e69cc5ef0dd44

See more details on using hashes here.

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