open

A command that opens or switches to a tmux window for an existing Git worktree. A worktree is another working folder connected to the same Git repository, while tmux lets you manage terminal windows and sessions.

In plain words
What is it for?
Opening one or more named worktrees, choosing window or session mode, and creating duplicate tmux windows for the same worktree.
Why use it?
It lets you move quickly to the terminal view for a particular worktree and can create an additional view when needed.

Command

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/raine/workmux/open
Clone the repo
git clone --depth 1 https://github.com/raine/workmux
Per session 13 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 1,264 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00013 $0.01264
Opus 5 $0.00006 $0.00632
Sonnet 5 $0.00003 $0.00253
Haiku 4.5 $0.00001 $0.00126

Measured 2d ago against content hash 98c96de998f7, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

open scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 2d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

docs/src/content/docs/reference/commands/open.md · 92 lines

How it starts

The opening of the file, as written. The whole thing — 92 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Opens or switches to a tmux window for a pre-existing git worktree. If the window already exists, switches to it. If not, creates a new window with the configured pane layout and environment. Accepts multiple names to open several worktrees at once.

workmux open [name...] [flags]

Arguments

  • [name...]: One or more worktree names, matching the worktree directory or handle. The tmux target can differ when a worktree uses --target-name or --parent-session. Optional with --new when run from inside a worktree.

Options

Flag Description
-n, --new Force opening in a new window even if one already exists. Creates a duplicate window with a suffix (e.g., -2, -3). Useful for having multiple terminal views into the same worktree. In tmux, the duplicate appears immediately to the right of the window where the command runs. Cannot be used with session mode.
--mode <window|session> Override the multiplexer mode for this command. session persists the mode change for subsequent opens. window converts a session-mode worktree back to window mode. Session mode is only supported with tmux.
-s, --session Shorthand for --mode session. Persists the mode change for subsequent opens. Cannot be combined with --mode.
--target-name <name> Override the workmux-managed tmux target name for this command. In window mode, creates or selects window <window_prefix><name>. In session mode, creates or selects session <window_prefix><name>. Cannot be used with multiple worktree names.
--parent-session <name> Window mode only. Creates the workmux-managed window inside the named tmux session without applying window_prefix to that parent session. Cannot be used with session mode or multiple worktree names.
--config <path> Use an alternate config file for this invocation. Still merges with global config. Useful for per-command config overrides like workmux open feat/my-branch --config /path/to/workmux.session.yaml.
--run-hooks Re-runs the post_create commands (these block window creation).
--force-files Re-applies file copy/symlink operations. Useful for restoring a deleted .env file.
-p, --prompt <text> Provide an inline prompt for AI agent panes.
-P, --prompt-file <path> Provide a path to a file containing the prompt.
-c, --continue Resume the agent's most recent conversation in this worktree. Injects the appropriate flag for the configured agent (e.g., --continue for Claude, --resume for Gemini).
-e, --prompt-editor Open your editor to write the prompt interactively.
--prompt-file-only Write the prompt file to the worktree without injecting it into agent commands.

Read the full file on GitHub · 92 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 2d ago First seen · 92 lines · 13 tokens per session scan A 98c96de998f7

Subscribe to this mod's changes

open is a command published in the GitHub repository raine/workmux (2,351 stars, last pushed today), licensed MIT. It adds 13 tokens to every session and 1,264 once invoked, about $0.0001 per session on Opus 5. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.