Terminal UI to navigate, resume, and start Claude Code sessions across all your projects
Project description
railmux — Claude Code session manager
A terminal UI to navigate, resume, and start Claude Code sessions across all your projects from one place. railmux lives in the left pane of a tmux window; the right pane shows the currently-active claude. Each claude session runs as its own detached tmux session in the background, so switching between sessions preserves all in-progress work — no responses or tool calls are interrupted.
This is a fork of regmi-saugat/railmux (v0.1.5), developed with agent-assisted programming using Claude Code.
Install
pip install railmux
Requires Python 3.12+, tmux, and less on PATH.
Run
railmux
If you're not already inside a tmux session, railmux will launch one automatically. The most recent project is auto-selected on startup.
Keys
Navigation
| Key | Action |
|---|---|
↑ / ↓ |
Move selection within the focused pane |
Tab / Shift-Tab |
Cycle focus through Projects, Sessions, Running panes |
Esc |
Move focus up: Running → Sessions → Projects |
/ |
Filter the focused pane by name |
Session actions
| Key | Action |
|---|---|
Enter |
Resume or start the selected session |
n |
Start a fresh claude session in the current project |
i |
Popup with session details |
r |
Rename the focused session |
s |
Toggle star — starred sessions pinned to top with ⭐ |
k |
Kill the running Claude process (keeps session file) |
d |
Delete the focused session (prompts for confirmation) |
t |
Open a terminal in the active project directory |
F9 |
Fullscreen the agent pane (toggle) for clean text selection |
? |
Full help popup with all keybindings |
q or Ctrl-C |
Quit with confirmation |
Mouse
| Action | Effect |
|---|---|
| Left-click (non-running) | Preview session history in the right pane |
| Left-click (running) | Attach to the running session (focus stays left) |
| Double-click | Open/attach and move focus to the right pane |
| Right-click | Context menu (Open, Info, Rename, Star, Kill, Term, Delete) |
History preview
Left-click a non-running session to view its conversation history in the right pane without starting Claude. The transcript is colour-coded (user = cyan, assistant = green, tool use = yellow) and displayed via less. Press q to exit — the right pane restores whatever was there before. Double-click to skip the preview and open the session directly.
Clicking a running session attaches to it immediately (focus stays left so you can keep browsing). Double-clicking steals focus to the right pane for both running and non-running sessions.
Status indicators
Each session shows a coloured ● reflecting its current state:
- Green — idle (assistant last responded normally)
- Yellow — busy (assistant is processing)
- Red — blocked (waiting for tool approval)
How it works
railmux reads ~/.claude/projects/* (Claude's per-project session history) and lists everything. Pressing Enter on a session does two things: (1) if a detached tmux session running claude --resume <id> doesn't already exist, railmux creates one with tmux new-session -d; (2) railmux's right pane runs tmux attach -t cc-<id> so you see and interact with that claude. Switching sessions just respawns the right pane to attach to a different background tmux session — the detached claudes keep running with all their state intact.
SSH / remote use
railmux works over SSH and benefits from a few tweaks for responsiveness and scrollback:
Server (~/.tmux.conf on the remote machine):
set -sg escape-time 0 # eliminate delay after Escape key
set -g history-limit 10000 # generous scrollback per pane
Client (~/.ssh/config on your local machine):
Host your-server
Compression yes # smoother tmux pane scrolling over SSH
Copying text from the Claude pane
Selecting text is awkward under tmux: the sidebar and Claude share the screen, and over SSH your clipboard lives on the local machine.
- OSC 52 (iTerm2, kitty, WezTerm, Alacritty, foot, Windows Terminal): drag-select in the Claude pane — copies to local clipboard automatically, even over SSH. No Shift needed. (iTerm2: enable Settings → General → Selection → "Applications in terminal may access clipboard".)
- Without OSC 52 (Terminal.app, etc.): F9 to fullscreen the agent →
Shift-drag to select →
Cmd/Cto copy → F9 to return.Ctrl-B zalso toggles fullscreen (built into tmux) but zooms whichever pane has focus, so it may fullscreen the sidebar instead.
Configuration
Optional config at ~/.config/railmux/config.toml:
[claude]
# Path to the claude binary (default: "claude")
binary = "claude"
[live]
# How often to refresh the session list (ms)
poll_interval_ms = 1000
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file railmux-0.1.0.tar.gz.
File metadata
- Download URL: railmux-0.1.0.tar.gz
- Upload date:
- Size: 135.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8954eca3215628da9f43d58f5dddf21d34f070d9be540e05027a0e2f16f5bd1
|
|
| MD5 |
931936ed264195ac98970e3e23e95edf
|
|
| BLAKE2b-256 |
b4e2eda129f22d55b1020578c2200af1471fc4e9ad34156fc12cd14ca360e65e
|
File details
Details for the file railmux-0.1.0-py3-none-any.whl.
File metadata
- Download URL: railmux-0.1.0-py3-none-any.whl
- Upload date:
- Size: 97.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56a0c79acfefb7ddeab80d484d837a5f89495c8504bb5b5ec1d6a1a4ccde81aa
|
|
| MD5 |
605452817f252e262ce7adfdc583b818
|
|
| BLAKE2b-256 |
88b6a56909356854352acc86a6ffdc02cc0f5a970df13d9569d08437f2740c77
|