Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

tmuxp freeze

Edit this page on GitHub

TmuxWorkspace 0.1.0-alpha.5 · Source

tmuxp compatibility reference. Examples using tmuxp run the Python reference. Local CLI status describes this port’s implemented coverage.

Capture a live session as a starting workspace file. A capture records observable session state; it cannot recover the original scripts, plugin intent, comments, or every application state.

Export a named sessionLink to section

After the installation walkthrough creates workspace-guide, export it to a new destination:

Terminal window
$ tmuxp freeze \
-L workspace-guide \
--workspace-format yaml \
--save-to captured-workspace.yaml \
--yes \
workspace-guide

Without a session argument, tmuxp resolves or asks for a live session. Without a format or destination, it can ask for those choices. --yes answers yes/no questions; it does not supply every missing selection. --quiet suppresses explanatory status, but prompts can still occur. Successful export writes the workspace document to a file, not stdout. Declining a confirmation can return without saving.

In this reference, an explicit --save-to path bypasses the overwrite confirmation used by the prompted path. Select a new path deliberately. The native contract applies the same protection to explicit and prompted destinations and keeps --force distinct from --yes.

Inspect the capture before reloading. See the export and reload workflow and the native machine output for the distinction between a saved file’s format and a CLI result stream.

What the captured document holdsLink to section

The seven native ports agree on three things a capture records, and on one it does not.

Window options are written under options_after. tmux applies them after the panes exist, and options like automatic-rename: off do not hold if they are applied before. load accepts either spelling.

A pane sitting at a shell gets no shell_command. Naming the shell would start a shell inside a shell when the document is reloaded. The shell is recognised by name as well as by the session’s default-shell, because macOS runs bash for /bin/sh and the pane reports bash.

Nothing about the machine it was captured on. No session environment, so a document does not carry the capturing host’s SSH_AUTH_SOCK or DISPLAY, and no default-size, which would otherwise pin a reloaded session to the size of the terminal that captured it.

Arguments and flagsLink to section

Argument or flagsArity / defaultChoices or meaning
"session_name"optional
-Svalue; Nonepass-through for tmux -S
-Lvalue; Nonepass-through for tmux -L
-f, --workspace-formatvalue; Noneyaml, json
-o, --save-tovalue; Nonefile to save to
--yes, -yflag; Falsealways answer yes
--quiet, -qflag; Falsesuppress explanatory/status text; prompts still occur despite the parser help claiming otherwise
--forceflag; Falseoverwrite the workspace file

All commands accept -h / --help. Root options precede the command; see the CLI overview. The output reference distinguishes current Python flags from native all-command JSON and NDJSON.

Parser and implementation source.

tmuxp reference source.

Esc

Type to search.