- Python 100%
| install | ||
| LICENSE | ||
| README.md | ||
| sxcc | ||
| VERSION | ||
sxcc — snix Claude Code
A command-line tool to manage Claude Code projects, sessions, memory files, and configuration.
Requirements
- Python 3.10+
- rich:
pip install rich
Installation
git clone https://github.com/yourusername/snix-claude-code
chmod +x snix-claude-code/sxcc
ln -s /path/to/snix-claude-code/sxcc ~/.local/bin/sxcc
Usage
Launch Claude (run)
sxcc # launch claude in current directory
sxcc --tmp # launch in a temporary session (auto-deleted on exit)
sxcc myproject # resume latest session of project "myproject"
sxcc myproject --num 3 # resume 3rd oldest session of project "myproject"
sxcc <session-id> # resume a specific session by ID
sxcc run myproject # explicit run (use when project name matches a subcommand)
sxcc run --tmp # explicit temporary session
Session lookup order: session ID → project hash → custom title (from /rename).
After each session, allowedTools is automatically reset in ~/.claude.json.
Temporary sessions clean up /tmp/claude-tmp, ~/.claude/projects/-tmp-claude-tmp, and the project entry in ~/.claude.json both before and after the session.
List projects
sxcc list # list all projects with memory count and last title
sxcc list --json
Sessions
sxcc sessions # sessions for current project
sxcc sessions myproject # sessions for project "myproject", grouped by cwd
sxcc sessions --json
Project lookup order: full cwd path → project hash → custom title.
If multiple projects match by title, a selection list is shown.
Show session details
sxcc show # details of latest session in current project
sxcc show myproject # latest session of project "myproject"
sxcc show <session-id> # specific session
sxcc show myproject --memory # include project memories
sxcc show --json
Dump transcript
sxcc dump <session-id> # full transcript
sxcc dump <session-id> --user # only user messages
sxcc dump <session-id> --claude # only Claude messages
sxcc dump <session-id> --no-tools # hide tool calls
sxcc dump <session-id> --grep text # filter by content
sxcc dump <session-id> --msg 5 # show message #5
sxcc dump <session-id> --msg 3-7 # show messages #3 to #7
sxcc dump <session-id> --json
Stats
sxcc stats # token usage and cost for all projects
sxcc stats <project-hash> # stats per session for a specific project
sxcc stats <session-id> # stats for a single session
sxcc stats --all # include projects with zero tokens
sxcc stats --json
Prices are fetched from LiteLLM and cached for 24h in /tmp/lite_llm_prices.json.
Rename (set title on all sessions)
sxcc rename <hash|name> "new title"
Sets the /rename title on all sessions of a project at once.
Move (copy project with new path)
sxcc move /path/to/myproject /path/to/myproject-new # copy project, keep original
sxcc move /path/to/myproject /path/to/myproject-new --delete # delete source after move
sxcc move /path/to/myproject /path/to/myproject-new --force # skip confirmation
sxcc move <session-id> /path/to/newproject # copy session to new project
sxcc move <session-id> /path/to/newproject --delete # move session (remove from source)
Copies the project folder (or session) in ~/.claude/projects/ to the new encoded path and rewrites the cwd in all session files. If the destination project already exists when moving a single session, the session is added to it.
Merge
sxcc merge <src> <dst> # merge src sessions into dst
sxcc merge <src> <dst> --delete # delete source after merge
sxcc merge <src> <dst> --force # skip confirmation
src and dst accept: absolute path, project hash (MD5), or session ID.
Delete
sxcc delete <session-id> # delete a single session
sxcc delete <project-hash> # delete all sessions of a project
sxcc delete <project-hash> --keep <session-id-1> <session-id-2> # keep listed sessions
sxcc delete <project-hash> --force # skip confirmation
Use sxcc list to find the project hash. Automatically updates ~/.claude.json: removes the project entry if no sessions remain, or updates last* fields if some sessions are kept.
Config
sxcc config # global Claude Code configuration overview
sxcc config projects # list all projects from ~/.claude.json
sxcc config project myproject # configuration for a specific project
sxcc config --json
Version
sxcc version
Configuration
| Environment variable | Default | Description |
|---|---|---|
CLAUDE_CONF |
~ |
Base directory containing .claude/ |
Or use --conf <dir> (accepts ~, ~/.claude, or ~/.claude/projects).
License
GNU General Public License v3.0 — see LICENSE.