Smart tmux session manager built for Claude Code workflows. Theme-neutral, mobile-friendly, Termius-optimized.
# One-liner
curl -fsSL https://raw.githubusercontent.com/agentik-os/tmux-claude/main/install.sh | bash
# Or clone + install
git clone https://github.com/agentik-os/tmux-claude.git
cd tmux-claude && ./install.shRequirements: tmux 3.2+, fzf 0.40+, bash 4+ or zsh
Fullscreen fzf popup with 4 tabs (sessions / historique / menu / help), grouped per-project layout, live AISB orchestration progress, age bars, and CPU/RAM/disk stats top-right:
sessions historique menu help cpu 19% ram 22% disk 27% 3.6G
ββββββββ
Home βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
* β β Home β°β°β°β°β°β±β±β± 797M 6h42m
> β Β§ β Home-2 β°β°β°β°β±β±β±β± 744M 2h55m
Causio βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Β§ β oracle β°β°β°β±β±β±β±β± [ββββββββββ] 50% 594M 41m main
β Β§ β worker-1-CAU-95 β°β°β±β±β±β±β±β± [ββββββββββ] 80% 590M 8m main
β Β§ β worker-1-CAU-99 β°β°β±β±β±β±β±β± [ββββββββββ] 86% β 599M 8m main
DentistryGPT βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Β§ β oracle-2 β°β°β±β±β±β±β±β± [ββββββββββ] 38% 1.0G 25m main
Tabs (cycle with β β or < >):
| Tab | Content |
|---|---|
sessions |
Live tmux sessions, grouped per-project, with tree (oracle + workers) |
historique |
Killed sessions from /tmp/.tmux-kill-history β Enter recreates the session at the project's path |
menu |
5 actions (open project, clean cache, deep clean, clean history, kill all) |
help |
Searchable keyboard shortcut reference |
Per-session columns (right-aligned, flush to popup edge):
| Column | Description |
|---|---|
> / * / |
Current session / attached elsewhere / detached |
β / β / Β· |
Claude working / idle at prompt / shell only |
Β§ / |
Kill-protected / unprotected |
β |
Status / name separator |
oracle / worker-1-β¦ |
Short name (project prefix stripped, ticket ID preserved via reverse-truncate) |
β°β°β±β±β±β±β±β± |
8-char age bar (log scale 0β24h) |
[ββββββββββ] 50% |
AISB orchestration progress (heavy filled / light empty) β read from ~/.aisb/state/{oracle,worker}-<name>.progress.json. β if any todo is blocked |
594M / 41m / main |
RAM / age / git branch |
Project groups: ordered Home first, projects alphabetical, system last. Each project gets its own flush-left header Causio βββββ... extending to popup width.
Tree decoration: β¬ on root oracle, β β indented under it for worker children β drawn only when the (project, oracle_idx) sub-group has BOTH oracle AND worker.
Keybindings inside the popup:
| Key | Action |
|---|---|
β/β |
Navigate (skips blanks + headers) |
Tab |
Jump to next project group |
β§Tab |
Spawn a fresh ClaudeRoot session at $HOME |
β / β or < / > |
Switch tabs (sessions β historique β menu β help) |
Enter |
Switch to session / run menu action / reopen killed session (historique) |
x |
Kill session |
. |
Toggle kill protection (Β§) |
Β§ |
Refresh in-place β reload list (progress, age, RAM) + preview, cursor preserved |
? |
Jump to help tab |
Esc |
Close |
| Type text | Filter/search (matches both visible name and full session name) |
Menu tab actions:
| Item | Action |
|---|---|
open project |
Pick a project from projects.json, auto-creates session + launches claude --dangerously-skip-permissions |
clean cache |
drop_caches + clear /tmp/.maniac-*, /tmp/browser-screenshots/* (fast) |
deep clean |
Heavy disk reclaim β npm/bun/pnpm/uv/pip/playwright/electron/journal/apt + project .next/cache .turbo .eslintcache (5β7 GB typical, never touches user data) |
clean history |
Wipe kill log + protection state |
kill all |
Kill every session except current |
Auto-protect: sessions detected as working (Claude active with subagents, real tools running, or CPU > 15%) are automatically marked Β§ protected. After 10 minutes of idle the protection is dropped. Manual . toggle overrides auto-protect.
Preview pane shows the last 40 cleaned lines of the selected session's terminal, plus a compact status line (protection, Claude status, path, git branch, RAM).
~400 ms render for 17 sessions on a typical VPS. Optimisations stacked:
- Single
ps -eo+tmux list-panes -asnapshots shared across all sessions (was ~200 forks per open) - Pre-aggregated panes count + path (1 awk pass instead of 2 per session)
- All helpers use
$REPLY(no$(func "$arg")subshell βproject_key,project_role,oracle_idx,short_name,truncate_str/smart,human_time/mb,age_bar) - Bulk-loaded AISB progress β single bash pass over
~/.aisb/state/*.progress.jsonfiles, no per-sessionjqfork readinstead ofcatfor status / RAM files- Bash arithmetic for visible char count (no
awk length()per line) - CPU read from
/proc/statinstead oftop -bn1 - Git branch from
.git/HEADdirectly (nogitfork) - In-place reload on
Β§viafzf reload(self --render $VIEW)+refresh-previewβ no popup flash, cursor preserved
| Shortcut | Where | Description |
|---|---|---|
Ctrl+l |
Anywhere in tmux | Open session manager (Termius-friendly) |
Ctrl+b z |
Anywhere in tmux | Open session manager (prefix-based) |
Option+z |
Anywhere in tmux | Open session manager (no prefix) |
Option+/ |
Anywhere in tmux | Open session manager (alias) |
c-menu |
Any shell, in or out of tmux | Open session manager (works on cold SSH) |
Everything adapts to your terminal's color scheme. Switch themes in Termius, iTerm2, Alacritty, or any terminal - tmux-claude follows automatically. No hardcoded colors in the session manager; selection uses reverse video (fg/bg swap).
The status bar uses colour3 (ANSI yellow) as the only accent, which maps to whatever your theme defines as yellow.
scripts/project-analyzer.sh runs at the end of install.sh and scans the usual project roots:
~/VibeCoding/work β category "work"
~/VibeCoding/clients β category "clients"
~/VibeCoding/1-life β category "life"
~/projects ~/code ~/work ~/dev ~/repos ~/src β category "work"
Detection rule: a directory is a project if it has a .git/, package.json, pyproject.toml, Cargo.toml, go.mod, Gemfile, composer.json, pubspec.yaml, or requirements.txt. Stack is auto-detected (Next.js / Vite / Svelte / Nuxt / Rust / Go / Python / Ruby / Node / generic) and emitted as a comment on each line.
Output: ~/.config/tmux-claude/projects.conf in the format SessionName|/abs/path|category.
Re-run any time:
bash ~/.tmux/scripts/project-analyzer.sh # write conf
bash ~/.tmux/scripts/project-analyzer.sh --dry-run # preview only
bash ~/.tmux/scripts/project-analyzer.sh --root ~/extra --category clientsThe installer scans common directories and creates aliases:
c-home # Home session (shell, no Claude)
c-myproject # Your project session
c-another # Another project
ts # Global session selector
tps # Quick list all sessionsEach alias opens an interactive project menu:
n New session v Dev server
d Delete session g Git push
k Kill all sessions i Init Claude
p List sessions b Background tasks
s Status t Toggle notifications
c Clean RAM
x Nuclear clean
New session options:
n1/Enter- Claude Code (fresh)n2- Claude Code (resume last session)n3- Shell only (no Claude)
Press v in the project menu:
1 Foreground (npm run dev)
2 Background (nohup)
3 Clean restart (cache + restart)
4 Kill port
5 Tail logs
Ports are configurable in ~/.config/tmux-claude/ports.conf:
MyProject=3000
AnotherProject=8080
[90:00] Home | TS 3 | push:2h | main* CC Dfnk | Disk 45% | CPU 8% | RAM 24% | Tunnel 1
| Segment | Description |
|---|---|
[90:00] |
Pomodoro timer (90min work / 15min break, auto-cycling) |
Home |
Current session name |
TS 3 |
Total tmux sessions |
push:2h |
Time since last git push |
main* |
Git branch (* = uncommitted changes) |
CC Dfnk |
Active Claude account (from pool) |
Disk/CPU/RAM |
System stats |
Tunnel 1 |
SSH tunnel count |
Optimized for SSH clients on phones/tablets:
| Shortcut | Action |
|---|---|
Ctrl+b u |
Half-page up (scroll up) |
Ctrl+b d |
Half-page down |
Ctrl+b g |
Top of history |
Ctrl+b G |
Bottom of history |
Ctrl+b Ctrl+b |
Enter copy/scroll mode |
Option+Up/Down |
Scroll even when Claude blocks |
Shift+Up/Down |
Half-page scroll |
| Mouse wheel | Scroll (enters copy-mode automatically) |
Esc or q |
Exit copy/scroll mode |
# ~/.config/tmux-claude/ports.conf
MyProject=3000
ApiServer=8080
Frontend=5173The session manager shortens paths based on known project roots. Customize with:
export TMUX_CLAUDE_PROJECT_ROOTS="$HOME/projects:$HOME/work:$HOME/code"# Add to ~/.zshrc or ~/.bashrc
alias c-newproject='tmux-project NewProject /path/to/project'If you use multiple Claude accounts, create ~/.claude/.pool-status.json:
{ "current": "myaccount" }The status bar will show the active account name.
| File | Purpose |
|---|---|
~/.tmux.conf |
Main tmux config (or sources .tmux.conf.tmux-claude) |
~/.tmux/scripts/ |
Status bar scripts + session manager |
~/.local/bin/tmux-project |
Project menu script |
~/.local/bin/tmux-select |
Global session selector (ts) |
~/.config/tmux-claude/ |
Config (ports, projects, nova) |
# Remove files
rm -f ~/.local/bin/tmux-project ~/.local/bin/tmux-select ~/.local/bin/tmux-nova
rm -rf ~/.tmux/scripts ~/.config/tmux-claude
rm -f ~/.tmux.conf.tmux-claude
# Remove aliases from shell config
# Edit ~/.zshrc or ~/.bashrc and remove the "tmux-claude" block
# Restore original tmux config
mv ~/.tmux.conf.backup ~/.tmux.conf 2>/dev/nullUse /tmux-setup inside Claude Code to auto-detect projects, assign ports, and generate aliases:
> /tmux-setup
This scans your filesystem, detects project types (Next.js, Vite, Expo, Rust, Go, Python), assigns non-conflicting ports, and writes everything to your shell config.
MIT - Agentik OS