Workspace ManagerconceptCLI Manual

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

Evaluate in a workspace

@libtmux/workspace 0.1.0-alpha.12 · Source

tmux-workspace shell opens the optional Python inspection environment for a loaded session. Code passed to -c executes in that environment, with tmux objects such as server, session, window and pane available.

Runtime requirement

Install tmuxp 1.74.0 in a separate Python environment and set TMUX_WORKSPACE_PYTHON to that environment’s Python executable. The native CLI checks the runtime before evaluating code. Ordinary workspace loading does not require this inspection runtime.

Evaluate with a selected server

Continue the installation walkthrough through its detached load. Select its socket, session and window:

Terminal window
$ tmux-workspace shell \
-S "$WORKSPACE_TMP/tmux.sock" \
-c 'print(pane.pane_id)' \
--json \
workspace-guide editor

The result includes captured output and child status. Check the command’s exit status before consuming it. An interactive shell needs a terminal; use -c when stdout belongs to automation.

shell --help lists backend and startup choices. Optional shell backends must be installed in the selected Python environment.

CLI source.

Esc

Type to search.

Reference previewOpen reference