Architecture¶
This page traces how a tmuxp command travels from the CLI down to libtmux, the library that does the actual tmux work. Each subcommand takes its own short path through one or two workspace modules:
load
freeze
convert
shell
ls / search
tmuxp CLI (argparse)
workspace.loader
workspace.builder
libtmux
workspace.freezer
_internal.config_reader
libtmux (interactive)
workspace.finders
Key Components¶
CLI Layer (tmuxp.cli)¶
The CLI uses Python’s argparse with a custom formatter (tmuxp.cli._formatter).
Each subcommand lives in its own module under tmuxp.cli.
The entry point is tmuxp.cli.cli(), registered as a console script in pyproject.toml.
Workspace Layer (tmuxp.workspace)¶
The workspace layer handles configuration lifecycle:
Finding:
tmuxp.workspace.finderslocates config filesLoading:
tmuxp.workspace.loaderreads and validates configsBuilding:
tmuxp.workspace.buildercreates tmux sessions via libtmuxFreezing:
tmuxp.workspace.freezerexports running sessions
Library Layer (libtmux)¶
tmuxp delegates all tmux operations to libtmux.
The ClassicWorkspaceBuilder creates
libtmux Server, Session, Window,
and Pane objects to construct the requested workspace.