Automate workspace operations
LibTmux.Workspace 0.0.0-alpha.20 · Source
Give automation an explicit file, endpoint and attachment choice. Continue the installation walkthrough with this detached operation:
$ tmux-workspace load \ -S "$WORKSPACE_TMP/tmux.sock" \ -d \ --json \ workspace.yamlCheck the process exit status, parse its JSON result, then inspect any reported partial effects. A failed later input does not imply that earlier sessions were removed. Keep stderr separate from the result stream.
Follow progress¶
Use NDJSON when the caller needs records while a load is running:
$ tmux-workspace load \ -S "$WORKSPACE_TMP/tmux.sock" \ -d \ --ndjson \ workspace.yamlParse one complete JSON value per line. Treat a closed stream or missing final result as incomplete work. Do not infer success from an earlier creation event.
Make retries deliberate¶
Use a unique session name for independent jobs. Reusing a name follows the loader’s existing-session policy; it is not a request to reset that session. Capture IDs and retained effects from the result before deciding what to clean up or retry. Remove only sessions the job owns.
Read output and errors for the command’s machine interface. A pane’s process can outlive the CLI and can fail after successful command delivery.