npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

claude-code-sessions-manager

v1.2.2

Published

TUI session manager for Claude Code: browse sessions grouped by directory; move, resume, fork, rename, export, and delete them across directories

Readme

claude-code-sessions-manager

A terminal UI for managing Claude Code sessions across directories.

claude-code-sessions-manager TUI: projects, sessions, and a conversation preview

(what you see above is generated demo data — try it yourself with node scripts/make-demo.mjs && ccs --claude-dir demo/claude-data)

Claude Code ties every session to the directory it was launched from (~/.claude/projects/<encoded-path>/). Rename or move a project folder — or just want to continue work somewhere else — and /resume, --continue, and --add-dir all fail with "This conversation is from a different directory". This tool fixes that:

  • Browse every session on the machine, grouped by working directory, with titles, last activity, entry counts, sizes, git branch, and a running indicator.
  • Move any session to another CWD safely. After the move, cd <new-dir> && claude --resume <id> just works, with full conversation memory.

Install / run

npm install -g claude-code-sessions-manager
ccs                     # or: claude-code-sessions-manager

Or without installing:

npx claude-code-sessions-manager

Layout

Three panes: Projects (directory names, All on top) → Sessions of the selected project (numbered, running/sdk badges) → Preview (branch, date, entries, id, directory, and the first conversation turns).

Keys

| Key | Action | |-----|--------| | tab / left/right | switch pane (projects ↔ sessions) | | up/down, j/k | navigate the focused pane | | enter (sessions pane) | action menu: resume, move, fork, rename, export, copy resume cmd, delete | | space | multi-select sessions (then m/d act on the selection) | | m | move — session or selection; on the projects pane: move the whole project | | d | delete (recoverable) — session or selection | | / | search sessions by title, id, or path | | r | rescan | | q | quit |

All features

  • Resume from anywhere — pick any session on the machine and resume it in its own directory; optional --dangerously-skip-permissions variant.
  • Move sessions (or entire project groups, including the project memory dir) between directories.
  • Fork a session into another directory under a new session id, keeping the original untouched.
  • Rename sessions — writes the same ai-title record Claude Code uses, so the new name also shows in the native /resume picker.
  • Export a session to a readable markdown transcript.
  • Delete sessions recoverably — the transcript moves to the backup dir and the manifest contains a working restore command.
  • Bulk operations via multi-select.
  • ccs --json for scripting.

Safety model

Moving a session never destroys data:

  1. The transcript and history.jsonl are backed up to ~/.claude/backups/claude-cwd-sessions/<timestamp>-<id>/ first.
  2. A machine-readable manifest.json records source, destination, SHA-256 hashes, and exact restore instructions.
  3. The rewritten transcript is verified (line-count match) before the source is removed; any failure triggers an automatic rollback.
  4. Sessions owned by a live claude process are refused (the live registry in ~/.claude/sessions/ is checked against actual pids).

What a move changes: the transcript file location, its per-line cwd fields, and matching project fields in ~/.claude/history.jsonl. Per-session state keyed by session id (file-history/, session-env/) is unaffected.

Scripting

ccs --json       # all sessions grouped by directory, as JSON

Custom Claude data directory

By default sessions are read from ~/.claude. To manage a different Claude data dir (a second profile, a mounted backup, another user's copied dir):

ccs --claude-dir /path/to/other/.claude
CLAUDE_CONFIG_DIR=/path/to/other/.claude ccs   # env var also works

Precedence: --claude-dir > $CLAUDE_CONFIG_DIR > ~/.claude. Every operation (scan, move, backups, delete) stays inside that directory, and resume launches claude with CLAUDE_CONFIG_DIR set to it.

License

Proprietary — free to install and use; copying, modification, and redistribution are not permitted. See LICENSE.