MCPcopy Index your code
hub / github.com/alchemmist/lazy-tmux

github.com/alchemmist/lazy-tmux @v0.1.25

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.1.25 ↗ · + Follow
467 symbols 1,555 edges 57 files 58 documented · 12% updated 1d agov0.1.25 · 2026-06-28★ 10432 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
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); add --windows to pick a specific window instead of a whole session.
  • 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

Extension points exported contracts — how you extend this code

Core symbols most depended-on inside this repo

Shape

Function 283
Method 137
Struct 34
Interface 8
TypeAlias 4
FuncType 1

Languages

Go99%
Python1%

Modules by API surface

internal/tmux/client.go64 symbols
internal/app/app.go31 symbols
internal/store/store.go29 symbols
internal/picker/model_test.go27 symbols
internal/picker/sort.go26 symbols
internal/picker/actions.go22 symbols
internal/tmux/client_test.go19 symbols
cmd/lazy-tmux/cli_test.go18 symbols
internal/app/app_test.go16 symbols
internal/picker/model.go15 symbols
internal/store/store_test.go14 symbols
internal/picker/table.go12 symbols

For agents

$ claude mcp add lazy-tmux \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page