2.4 KiB
2.4 KiB
name, description, metadata
| name | description | metadata | ||
|---|---|---|---|---|
| script-claude-sessions | claude-sessions — tmux session manager; interactive menu with folder picker, unique topic, and location column |
|
claude-sessions
Python script (scripts/claude-sessions, symlinked to ~/sbin/). Manages Claude Code tmux sessions: list, recover, resume, spawn, gc. Run with no args for the interactive menu.
Menu behaviour (2026-10-26)
- Location column. Live and resumable rows show the session folder (
~for$HOME). Live rows take it from the registry (project_dir), falling back to tmux#{session_path}. nNew session. Asks for a folder: Enter accepts the nearestCLAUDE.mdfolder,bopens the folder browser, or type a project name/path (same lookup asclaude-tmux).- Folder browser.
zenity --file-selection --directorywhenDISPLAY/WAYLAND_DISPLAYis set and zenity exists (has Create Folder). Otherwise a terminal browser: number = open,uup,nnew folder,/textfilter,><page,hhidden,~//pathjump, Enter/sselect,qcancel. - Profile. After the topic, a numbered picker lists every
~/.claude-[company]-[profile]dir that has aprojects/folder, shown asCompany (profile)(e.g.O'Reilly IT (anthropic)). A dir with no profile part (~/.claude-octopus) is skipped;~/.claudeshowsPersonal (main). Company names come fromprofiles.yamldisplay_name(parenthetical stripped), else the Title-Cased segment. Enter acceptsoreillyit-anthropic. The choice is passed as--profiletoclaude-tmux. - Topic. Becomes the tmux session name and the Remote Control name (passed as
--nametoclaude-tmux). Defaults to the Title-Cased folder name. If that name is already a live tmux session, no default is offered and a unique topic is required. Topics containing.or:are rejected because tmux rewrites them to_.
Headless spawn
claude-sessions spawn <folder> --headless [--name topic] [--create] [--mode m] [--profile p] — no prompts, no attach, for scripts and the /spawn-session skill. Exit 1 = folder missing (or --create needs an absolute path); exit 2 = topic in use (default topic is the Title-Cased folder name; no #N suffix is added). Without --headless, spawn behaves as before.
Gotchas
- "In use" means a live tmux session. Resumable registry entries do not block a topic.
claude-tmuxstill auto-appends#Non a collision, but the menu rejects collisions first.