Workspace ManagerconceptGuides

Choose documentation 3

latest

Current version

latest
English

Early release libtmux is released, and its APIs may still change between releases. This site's structure and URLs may change too.

Edit this page on GitHub

Export and reload a session

@libtmux/workspace 0.1.0-alpha.12 · Source

Capture the session created by the installation walkthrough to a new YAML file:

Terminal window
$ tmux-workspace freeze \
-S "$WORKSPACE_TMP/tmux.sock" \
--json \
--workspace-format yaml \
--save-to workspace-export.yaml \
workspace-guide

Review the saved commands, directories and layout. Capture reads current tmux state; it cannot recover original arguments, shell history, scripts, comments or application state. A captured command may need editing before replay.

Load a second copy

Use a fresh session name on the same private server:

Terminal window
$ tmux-workspace load \
-S "$WORKSPACE_TMP/tmux.sock" \
-d \
-s workspace-replayed \
--json \
workspace-export.yaml

Inspect the second copy’s panes:

Terminal window
$ tmux -S "$WORKSPACE_TMP/tmux.sock" list-panes -t '=workspace-replayed'

Remove that copy when finished:

Terminal window
$ tmux -S "$WORKSPACE_TMP/tmux.sock" kill-session -t '=workspace-replayed'

Capture explains destination handling. Conversion changes file encoding without proving the document can be loaded.

CLI source.

Esc

Type to search.

Reference previewOpen reference