This document provides a reference for the gmux command-line interface, covering all subcommands and their options.
Launches an interactive interface to browse and switch between projects.
gmux sz [path]When run without arguments, gmux sz starts a terminal user interface (TUI) that lists projects discovered from configured search paths. The list displays project names, paths, and status indicators for running tmux sessions and Git repositories. The view refreshes its data sources every 10 seconds.
If an optional [path] argument is provided, the TUI is bypassed, and the command directly creates or switches to a tmux session for that path.
# Open the interactive sessionizer TUI
gmux sz
# Directly create or switch to a session for a specific project
gmux sz ~/Work/grove-tmuxAdds a project path to the explicit_projects list in the configuration file.
gmux sz add [path]This command adds a project that is outside of the configured search_paths. If no [path] is provided, it adds the current working directory.
# Add the project at ~/Code/special-project to the configuration
gmux sz add ~/Code/special-projectRemoves a project from the explicit_projects list in the configuration file.
gmux sz remove [path]This command removes a project previously added with gmux sz add. If no [path] is provided, it removes the current working directory.
# Remove the project at ~/Code/special-project from the configuration
gmux sz remove ~/Code/special-projectManages tmux session hotkey bindings.
Lists configured session key bindings.
gmux key list [--style <style>]Displays the mapping between hotkeys and projects from tmux-sessions.yaml. The default output is a table.
Flags:
--style <style>: Set the output format. Options aretable(default) orcompact.
# Show all key mappings in a table
gmux key list
# Show only mapped keys in a compact format
gmux key list --style compactOpens a TUI to manage session key bindings.
gmux key manageProvides a terminal interface to view available keys, see which projects they are mapped to, and interactively map or unmap bindings. It includes a project search interface. Changes are saved to the configuration file on exit.
# Open the interactive key manager
gmux key manageMaps a discovered project to an available key.
gmux key addStarts an interactive workflow that shows a list of unmapped projects discovered from configured search paths, then prompts the user to select an available key to assign.
# Start the interactive flow to add a new key mapping
gmux key addUnmaps a project from a key.
gmux key unmap [key]Removes the project path mapping for a specific key, making the key available again. If [key] is not provided, it prompts for a selection from currently mapped keys.
# Unmap the project assigned to the 'd' key
gmux key unmap dChanges the key for an existing session mapping.
gmux key update [current-key]Prompts for a new, available key for an already mapped project. If [current-key] is omitted, it prompts for a selection of which mapping to update.
# Change the key for the session currently mapped to 'a'
gmux key update aEdits the path of a mapped session.
gmux key edit [key]Allows changing the file path associated with a specific key. If a [key] is not provided, it prompts for a selection of which mapping to edit.
# Edit the details for the session mapped to the 's' key
gmux key edit sLaunches a new tmux session with specified options.
gmux launch <session-name> [--window-name <name>] [--working-dir <path>] [--pane <command>]...Creates a new tmux session. It can specify the initial window name, a working directory for the session, and create multiple panes.
Flags:
--window-name <name>: Name for the initial window.--working-dir <path>: Working directory for the new session.--pane <command>: Adds a pane. Can be used multiple times. Supportscommand@/path/to/workdirsyntax to set a working directory for a specific pane.
# Launch a session with two panes, each in a different directory
gmux launch my-app --pane "npm run dev@/app/frontend" --pane "go run .@/app/backend"Performs direct operations on tmux sessions.
Checks if a tmux session exists.
gmux session exists <session-name>Exits with code 0 if the session exists, and 1 if it does not. Intended for use in scripts.
if gmux session exists my-session; then
echo "Session is running."
fiTerminates a tmux session.
gmux session kill <session-name># Kill the session named 'dev-old'
gmux session kill dev-oldCaptures the visible content of a tmux pane and prints it to standard output.
gmux session capture <target>The <target> can be a session name (my-session) or a specific pane target (my-session:0.1).
# Capture the content of the first pane in the 'my-session' session
gmux session capture my-session:0.0Shows the Git status for repositories configured in tmux-sessions.yaml.
gmux statusgmux statusLists configured session key bindings. This is an alias for gmux key list.
gmux list [--style <style>]# Show configured keys in a compact format
gmux list --style compactBlocks execution until a specified tmux session is closed.
gmux wait <session-name> [--timeout <duration>] [--poll-interval <duration>]Polls at a regular interval to check if a session still exists. Exits with status 0 when the session closes. Exits with a non-zero status if a timeout is reached.
Flags:
--timeout <duration>: Maximum time to wait (e.g.,10m,30s).0smeans wait indefinitely.--poll-interval <duration>: How often to check if the session exists (e.g.,1s,500ms).
# Wait up to 5 minutes for the 'review-task' session to close
gmux wait review-task --timeout 5mStarts a pre-configured tmux session by its hotkey.
gmux start <key>Finds the project mapped to the given <key> in tmux-sessions.yaml and launches a new tmux session for it. The session is named grove-<key>.
# Start the session configured for the 'a' key
gmux start aPrints version information for the gmux binary.
gmux version [--json]--json: Output version information in JSON format.
gmux version