tmux-manager

module
v0.2.7 Latest Latest
Warning

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

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

README ΒΆ

tmux-manager

A Dracula-themed TUI for tmux session management

Create, switch, and kill sessions with tm. Define your workspace in YAML and restore it on reboot.

CI Release Go Report Card

One command β€” installs Go (if needed), builds from latest release, and runs setup automatically.


✨ Features

  • TUI session management β€” ↑↓ navigate, Enter attach, Ctrl+N/D/R operate
  • YAML workspaces β€” define session, window, and pane layouts as code
  • Auto-restore β€” tm restore brings your workspace back after reboot
  • cfg tag β€” YAML-managed sessions are tagged cfg in the TUI
  • Dracula theme β€” developer-friendly color scheme

πŸ“Έ Screenshot

TUI Screenshot


πŸ“¦ Installation

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

One command does everything. Automatically:

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

No extra steps. Run tm in a new terminal.

Item Description
~/.local/bin/tm Create symlink
~/.zshrc Register nocorrect tm alias
~/.profile Register tm restore for auto-restore on boot
~/.config/tmux-manager/sessions/ Create config directory
~/.config/tmux-manager/tmux.conf Dracula-themed status bar + keybindings
~/.tmux.conf Register source-file for tmux-manager config
tmux Auto-install tmux if missing (apt/brew/dnf/pacman)

To update, run tm update from any terminal.


πŸš€ Usage

tm                      # Launch TUI
tm restore              # Restore sessions from YAML
tm restore --dry-run    # Show what would be restored
tm setup                # Install symlink and shell integration
tm setup --uninstall    # Remove symlink and shell 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 selected session
Ctrl+D Delete selected session
Ctrl+C Quit

βš™οΈ Configuration

~/.config/tmux-manager/sessions/*.yaml

Format

Always sessions β†’ windows β†’ panes β€” one unified structure.

Single window, single pane
sessions:
  monitoring:
    windows:
      - panes:
          - command: htop
Side-by-side split
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 in one file
sessions:
  dev:
    windows:
      - panes:
          - command: nvim
            directory: ~/projects/myapp
          - command: lazygit
            direction: right
            directory: ~/projects/myapp

  db:
    windows:
      - panes:
          - command: psql myapp
            directory: ~/projects/myapp

πŸ“‹ Field Reference

Field Required Description
sessions βœ… Session map (keys = tmux session names)
sessions[].windows Window list (default: one empty window)
sessions[].windows[].name Window tab name (session name if omitted)
sessions[].windows[].panes Pane layout within the window
panes[].command Command to run in the pane
panes[].directory Working directory for the pane (~/ supported)
panes[].name Pane title (sets tmux pane title)
panes[].direction Split direction: right Β· down (omit for first pane)

πŸ”„ Auto-Restore

tm setup adds this to ~/.profile:

tm restore 2>/dev/null

After a reboot, SSH login automatically creates sessions defined in your YAML files. Existing sessions are skipped (idempotent).


🎨 cfg Tag

Sessions managed via YAML are distinguished in the TUI with a cfg tag:

β—‰  good-giraffe-drawing    attached    cfg
β—‹  myapp-dev               1 windows   cfg
●  temp-session             attached

tmux-manager β€” manage sessions, not commands.

# v0.2.4 test

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