tmcp is a command palette for tmux. It is designed to run inside tmux display-popup -E and make tmux commands faster to discover, complete, and execute.
- Fuzzy command search for tmux commands and aliases
- Positional and flag-value completion for common tmux targets such as sessions, windows, panes, layouts, options, hooks, and key tables
- User-defined tmux command templates loaded from
$XDG_CONFIG_HOME/tmcp/config.tomlor~/.config/tmcp/config.toml - History search backed by a persistent history file at
$XDG_STATE_HOME/tmcp/historyor~/.local/state/tmcp/history - Inline ghost-text previews that show the currently selected completion without committing it into the input
- Popup-friendly candidate navigation with line-by-line and half-page movement
Enter: execute the typed tmux commandTab: accept the currently selected completionRight: accept the current ghost-text completionUp/Down: move through the candidate listCtrl-P/Ctrl-N: move through the candidate listCtrl-U/Ctrl-D: scroll half a page up or downPageUp/PageDown: scroll half a page up or downCtrl-R: toggle history search modeEsc/Ctrl-C: close the palette
go install github.com/gh-liu/tmcp@latestAdd this to ~/.tmux.conf:
bind-key C-p display-popup -E -w 80% -h 70% tmcpReload tmux config:
tmux source-file ~/.tmux.confCreate config.toml at $XDG_CONFIG_HOME/tmcp/config.toml or ~/.config/tmcp/config.toml:
[[commands]]
name = "swap-left"
note = "swap current pane with the left pane"
run = ["swap-pane", "-t", "{left}"]Custom commands are shown alongside built-in tmux commands in the palette. Any extra arguments you type after the custom command name are appended to the configured run array.
TODO: add a screenshot of the popup UI.