tmux-manager

module
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2026 License: MIT

README ΒΆ

tmux-manager

TUI session manager for tmux β€” define workspaces in YAML, restore on reboot.

CI Release Go Report Card


✨ Features

  • 🎯 Keyboard-driven TUI β€” browse, create, and kill sessions in seconds
  • πŸ“„ YAML workspaces β€” define sessions, windows, and pane layouts as code
  • πŸ”„ Auto-restore β€” tm restore brings your workspace back after reboot
  • 🏷️ cfg tag β€” visually distinguish YAML-managed sessions from manual ones
  • 🎨 Catppuccin Mocha theme β€” soft pastel status bar, easy on the eyes
  • ⚑ One-command install β€” Go, tmux, shell integration, all set up automatically

πŸ“Έ Screenshot

TUI Screenshot


πŸš€ Quick Start

curl -fsSL https://raw.githubusercontent.com/dohwi/tmux-manager/main/install.sh | bash

That's it. This command:

  1. Installs Go (if missing)
  2. Builds tmux-manager from the latest release
  3. Runs tm setup β€” installs tmux (if missing), configures shell integration, status bar, and auto-restore

After installation, just run tm in a new terminal.


πŸ“¦ Commands

tm                    # Launch TUI
tm restore            # Restore sessions from YAML
tm restore --dry-run  # Preview what would be restored
tm setup              # Install symlink and shell integration
tm setup --uninstall  # Remove all integration
tm update             # Update to the latest release
tm update --check     # Check for updates without installing
tm version            # Print version
⌨️ Keybindings
Key Action
↑ ↓ j k Navigate sessions
Enter Attach to session
Ctrl+N Create new session
Ctrl+R Rename session
Ctrl+D Delete session
Ctrl+C Quit

βš™οΈ Configuration

Workspace definitions go in ~/.config/tmux-manager/sessions/*.yaml.

Single pane
sessions:
  monitoring:
    windows:
      - panes:
          - command: htop
Side-by-side
sessions:
  dev:
    windows:
      - panes:
          - command: nvim
            directory: ~/projects/myapp
          - command: lazygit
            direction: right
            directory: ~/projects/myapp
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚    nvim    β”‚ lazygit  β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Complex layout
sessions:
  dev:
    windows:
      - panes:
          - command: nvim
            directory: ~/projects/myapp
          - command: lazygit
            direction: right
            directory: ~/projects/myapp
          - command: npm run dev
            direction: down
            directory: ~/projects/myapp
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚            β”‚ lazygit  β”‚
β”‚    nvim    β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚            β”‚ npm run  β”‚
β”‚            β”‚   dev    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
Multi-window
sessions:
  myapp:
    windows:
      - name: code
        panes:
          - command: nvim
            directory: ~/projects/myapp
          - command: lazygit
            direction: right
            directory: ~/projects/myapp
      - name: infra
        panes:
          - command: docker-compose up
            directory: ~/projects/myapp
          - command: docker logs -f
            direction: down
            directory: ~/projects/myapp
Multiple sessions
sessions:
  dev:
    windows:
      - panes:
          - command: nvim
            directory: ~/projects/myapp
          - command: lazygit
            direction: right

  db:
    windows:
      - panes:
          - command: psql myapp
            directory: ~/projects/myapp
Field Reference
Field Required Description
sessions βœ… Map of session names to window definitions
sessions[].windows Window list (default: one empty window)
sessions[].windows[].name Window tab name
sessions[].windows[].panes Pane layout within the window
panes[].command Command to run in the pane
panes[].directory Working directory (~/ supported)
panes[].name Pane title
panes[].direction Split direction: right or down (omit for first pane)

🏷️ cfg Tag

YAML-managed sessions appear with a cfg label in the TUI, so you can tell them apart from manually created ones.

β—‹  good-giraffe-drawing
   detached

β—‹  myapp-dev
   1 windows   cfg

β—‰  tmux-manager
   attached   cfg

πŸ”„ Auto-Restore

tm setup adds this to ~/.profile:

tm restore 2>/dev/null

After a reboot, SSH login automatically restores your YAML-defined sessions. Existing sessions are skipped (idempotent).


πŸ› οΈ What tm setup Configures

Path Purpose
~/.local/bin/tm Symlink to the binary
~/.zshrc nocorrect tm alias
~/.profile tm restore for auto-restore on login
~/.config/tmux-manager/ Config directory
~/.config/tmux-manager/sessions/ YAML workspace definitions
~/.config/tmux-manager/tmux.conf Catppuccin Mocha status bar + keybindings
~/.tmux.conf Sources tmux-manager config

πŸ“‹ Requirements

  • tmux β‰₯ 3.2 (auto-installed by tm setup)
  • Go β‰₯ 1.24 (auto-installed by install script)
  • Linux or macOS

🀝 Contributing

See CONTRIBUTING.md for guidelines. Issues and pull requests welcome.

πŸ“„ License

MIT Β© 2024–2026 dohwi

Directories ΒΆ

Path Synopsis
cmd
tmux-manager command
internal
cli
tui

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL