lazy-tmux

module
v0.1.18 Latest Latest
Warning

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

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

README

Favicon Preview    lazy-tmux

Static Badge License Contributors Go Build

Project architect: @alchemmist

Cli written on Go for saving and restoring tmux sessions lazy. Key features:

  • Save sessions: current, specific, or all — including windows, panes, layouts, running commands, and scrollback history.
  • Lazy restore: restore only what you need, avoiding high RAM usage (unlike tmux-resurrect).
  • Autosave daemon: periodically snapshots all sessions in the background (single instance, no conflicts).
  • Interactive TUI browser: tree view (sessions/windows) + table (commands, snapshot time, counts, status) with fuzzy search.
  • Keyboard-driven picker for fast search, navigation, and manage sessions and windows directly inside picker tree.
  • Flexible sorting via --session-sort or --window-sort (by last-used, time, size, name, command, etc.).
  • Optional fzf integration via --fzf-engine (lighter and no dependencies binary, but without full keyboard control and TUI picker).
  • Bootstrap restore on tmux startup: auto-restore latest or specific session.
  • Full environment snapshots: restore pane layout and commands (e.g. npm, docker-compose, nvim).
  • Optional scrollback capture: preserve and replay previous terminal output.

Chekout lazy-tmux.xyz for more informaiton about installation and usage!

Just for bulding from source you need to have installed go and cloned this project. After that run:

make build

Binary will compiled in bin/lazy-tmux. For more development options run make help.

[!WARNING] tmux version requirement: lazy-tmux requires tmux 3.6 or tmux 3.6a. Older versions may not work correctly.

Configuration

lazy-tmux reads an optional TOML config file. It is looked up in this order:

  1. $LAZY_TMUX_CONFIG (explicit path)
  2. $XDG_CONFIG_HOME/lazy-tmux/lazy-tmux.toml
  3. ~/.config/lazy-tmux/lazy-tmux.toml

The file is optional — a missing file just uses the built-in defaults. Settings are layered: built-in defaults → config file → command-line flags, so a flag always overrides the file for that run.

# ~/.config/lazy-tmux/lazy-tmux.toml — all keys are optional

tmux_bin        = "tmux"      # tmux binary to use
data_dir        = "~/.local/share/lazy-tmux"  # where snapshots are stored
save_interval   = "5m"        # daemon autosave interval (Go duration)
restore_timeout = "5s"        # max wait for restored pane commands to start (0 disables)

# Allowlist of commands lazy-tmux may replay on restore, matched by program
# name. Omit the key to restore every command (default). Set it to restore only
# these programs; set it to [] to restore no commands at all.
restore_allowlist = ["nvim", "vim", "htop", "less", "tail", "ssh"]

[scrollback]
enabled = false               # capture shell pane scrollback
lines   = 5000                # max scrollback lines per pane

Directories

Path Synopsis
cmd
lazy-tmux command
internal
app
testutil
Package testutil holds shared helpers for the integration test suite.
Package testutil holds shared helpers for the integration test suite.

Jump to

Keyboard shortcuts

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