Codemux
Manage tmux sessions from the VS Code sidebar.
Features
- Tmux Sessions view: lists all running tmux sessions with window count and
attached state. The list auto-refreshes while the view is visible
(
codemux.refreshInterval, default every 5 s).
- Click to attach: clicking a session opens an integrated terminal attached
to it. If a terminal for that session is already open, the view switches to
it instead of opening a second one.
- Claude Code status: if a Claude Code process runs inside a session, the
session shows its state —
claude: working (blue icon) while it is busy, or
claude: needs input (yellow icon) when it is waiting for you. The tooltip
shows Claude's current task.
- New session: the
+ button prompts for a name, creates the session in the
workspace folder, and attaches.
- Kill / rename: inline trash icon and context menu on each session.
- Presets: define sessions that start with a command. Running a preset
creates the session (if it does not exist yet), types the command into its
shell, and attaches. The shell stays alive after the command exits. If the
session already exists, the preset simply attaches to it.
Presets
Manage presets with the + / pencil / trash buttons in the Presets view, or
edit them directly in your user settings:
"codemux.presets": [
{
"name": "Dev server", // display name (required)
"command": "npm run dev", // typed into the shell (optional)
"sessionName": "dev", // tmux session name (optional)
"promptSessionName": false, // ask for a session name on every run (optional)
"cwd": "/path/to/project" // working directory (optional)
}
]
If sessionName is empty and promptSessionName is true, you are asked for
a session name each time the preset runs — handy for starting several
instances of the same preset (dev-1, dev-2, …). Entering the name of an
existing session just attaches to it.
Settings
| Setting |
Default |
Description |
codemux.tmuxPath |
tmux |
Path to the tmux executable. |
codemux.refreshInterval |
5 |
Auto-refresh interval in seconds (0 disables it). |
codemux.presets |
[] |
Session presets (see above). |
Requirements
tmux installed and on your PATH (or set codemux.tmuxPath).
Development
npm install
npm run compile # or: npm run watch
npm test # unit + integration tests (vitest)
npm run test:coverage # with v8 coverage report
npm run typecheck # type-checks sources and tests
Unit tests mock the vscode module and child_process; integration tests run
against a real tmux server on a private socket (tmux -f /dev/null -L …), so
they never touch your own tmux sessions.
Press F5 in VS Code to launch an Extension Development Host.
Package a .vsix with npx @vscode/vsce package, then install it via
"Extensions: Install from VSIX…".