tmuxinator

Ruby CLI that creates and starts tmux sessions from YAML project files defining windows, panes, layouts, root directories, and startup hooks.

install

tmuxinator is a session manager for tmux, written in Ruby. Each project is described in a YAML file that lists windows, panes, layouts, a root directory, and the commands to run in each. Starting the project builds the tmux session to match. Commands are sent to the shell with tmux send-keys, as if typed, so a pane can run ssh to a remote host and then run further commands there.

Projects are managed with tmuxinator new [project], open, and edit, which are aliased to n, o, and e. new --local stores the config as .tmuxinator.yml in the current directory instead of the default config location. tmuxinator new [project] [session] records the windows, layouts, panes, session options, and root of an existing tmux session into a new project file.

The config supports per-window roots and the standard tmux layouts or custom layout strings. It also supports named panes, pane titles (tmux 2.6 or later), focused_pane, startup_window, and startup_pane. Lifecycle hooks are available: on_project_start, on_project_first_start, on_project_restart, on_project_exit, and on_project_stop. pre_window runs setup commands such as rbenv shell in every window and pane. Other options include attach: false, tmux_options for a custom tmux.conf, tmux_command for wrappers such as byobu, and socket_name. Project files can use ERB templating. Completion scripts are provided for bash, zsh, and fish.

It is aimed at developers who regularly rebuild the same multi-window, multi-pane terminal layouts for projects, such as an editor, a server, and log tailing. The README assumes you already know tmux windows and panes. It recommends tmux 1.8 or later and says 2.5 is not supported.

Installation

# via RubyGems
gem install tmuxinator
# via Homebrew
brew install tmuxinator

tmuxinator starting a tmux session

Alternatives & related tools

add a badge to your README

Maintain tmuxinator? Show that it's featured on trmn. The badge links back to this page.

Featured on trmn
Markdown
[![Featured on trmn](https://www.trmn.sh/badge/tmuxinator.svg)](https://www.trmn.sh/tools/tmuxinator?utm_source=badge)
HTML
<a href="https://www.trmn.sh/tools/tmuxinator?utm_source=badge"><img src="https://www.trmn.sh/badge/tmuxinator.svg" alt="Featured on trmn" height="20"></a>