Scripts2026年5月29日·1 分钟阅读

tmuxinator — Manage Complex tmux Sessions with YAML Configs

A Ruby gem that lets you define tmux sessions, windows, and panes in YAML files and launch them with a single command. Eliminates repetitive manual setup of development environments.

Agent 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
tmuxinator Overview
直接安装命令
npx -y tokrepo@latest install 180b615a-5b7b-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

Introduction

tmuxinator automates the creation of tmux sessions using YAML configuration files. Instead of manually splitting panes, opening windows, and running startup commands every time you sit down to work, you define your layout once and launch the entire environment with a single command.

What tmuxinator Does

  • Creates tmux sessions with multiple named windows and split panes from a YAML config
  • Runs startup commands in each pane automatically (servers, watchers, REPLs, logs)
  • Supports project-level configs so each codebase has its own tmux layout
  • Provides commands to list, edit, copy, and delete saved project configurations
  • Integrates with shell completion for fast project switching

Architecture Overview

tmuxinator is a Ruby CLI that reads a YAML file describing a session layout, then translates it into a sequence of tmux commands. Each window definition maps to tmux new-window, pane splits map to split-window with layout directives, and commands are sent via send-keys. The session is created in detached mode first, then attached, ensuring all panes are initialized before the user sees them.

Self-Hosting & Configuration

  • Requires Ruby 2.6+ and tmux 1.8+ installed on the system
  • Project configs are stored in ~/.config/tmuxinator/ as YAML files
  • Use tmuxinator new <name> to generate a config template with annotated examples
  • Set a root path in the config to auto-cd all panes into the project directory
  • Define pre_window commands that run in every pane before the pane-specific command

Key Features

  • Declarative YAML syntax for defining complex multi-window, multi-pane layouts
  • Per-pane startup commands for launching servers, databases, log tails, and editors simultaneously
  • ERB templating support in YAML files for dynamic configuration based on environment variables
  • Tab completion for Bash, Zsh, and Fish shells
  • Local project configs via .tmuxinator.yml in a repo root for team-shared layouts

Comparison with Similar Tools

  • tmuxp — Python-based tmux session manager with JSON/YAML support; tmuxinator is Ruby-based with a wider plugin ecosystem
  • teamocil — similar YAML-based tmux automation but less actively maintained
  • Zellij — a modern terminal workspace that replaces tmux entirely; tmuxinator extends tmux rather than replacing it
  • devbox / direnv — manage environment variables and dependencies; tmuxinator manages terminal layout and startup commands

FAQ

Q: Do I need Ruby installed? A: Yes, tmuxinator is a Ruby gem. Install it with gem install tmuxinator or through your system package manager.

Q: Can I use tmuxinator without a global installation? A: You can use Bundler to install it locally per project, or run it via npx-style Ruby tools like bundler exec.

Q: How do I define pane splits? A: Under a window definition, add a panes key with a list of commands. tmuxinator splits them using tmux's even-horizontal layout by default, or you can specify a custom layout string.

Q: Can different team members share a tmuxinator config? A: Yes, commit a .tmuxinator.yml file to the project root. Team members can start it with tmuxinator local or by specifying the file path.

Sources

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产