Install and load a workspace
workspace consumer 0.1.0 · Source
Build the documented tmux-workspace revision, then load a small session on a
private socket. Use a Unix shell with tmux 3.3a or newer on PATH.
Build the command¶
Fetch the documented source revision, then build from its repository root.
Keep the exported PATH in this shell for the rest of the walkthrough.
$ git clone --filter=blob:none https://github.com/libtmux/libtmux-cxx.git$ cd libtmux-cxx$ git fetch --depth=1 origin 9c8c6a264114277df84c9f6819855093adae5c6e$ git checkout --detach FETCH_HEADUse the compiler and CMake requirements in the repository’s cxx-dev preset:
$ cmake --preset cxx-dev \ -DLIBTMUX_BUILD_TESTS=OFF \ -DLIBTMUX_BUILD_EXAMPLES=OFF \ -DLIBTMUX_BUILD_MCP_SERVER=OFF$ cmake --build --preset cxx-dev --target tmux-workspace -j2$ export PATH="$PWD/build/cxx-dev/apps/workspace:$PATH"$ tmux-workspace --helpCreate the input¶
Keep this shell open. Create a temporary working directory on a filesystem that supports Unix sockets, then enter it:
$ WORKSPACE_TMP="$(mktemp -d)"$ cd "$WORKSPACE_TMP"Save this as workspace.yaml:
session_name: workspace-guidewindows: - window_name: editor layout: even-horizontal panes: [null, null]Load and inspect¶
$ tmux-workspace load \ -S "$WORKSPACE_TMP/tmux.sock" \ -f /dev/null \ -d \ --json \ workspace.yaml-d leaves the session detached. Inspect its panes using the same socket:
$ tmux -S "$WORKSPACE_TMP/tmux.sock" list-panes -t '=workspace-guide:editor'Attach interactively with tmux -S "$WORKSPACE_TMP/tmux.sock" attach-session -t '=workspace-guide'. Detach with your tmux detach binding before continuing.
Capture and clean up¶
$ tmux-workspace freeze -S "$WORKSPACE_TMP/tmux.sock" --json workspace-guideTry export and reload before cleanup. Capture cannot recover original scripts, command history or application state.
Remove only the session created by this walkthrough when finished:
$ tmux -S "$WORKSPACE_TMP/tmux.sock" kill-session -t '=workspace-guide'The configuration remains in the temporary directory. Keep the session running when following guides that continue this example.
Continue¶
Configuration describes execution fields; discovery finds saved files. Read the load reference and automation for attachment, output and failure handling.