# Workspace reference generation

Source: https://libtmux.org/en/py/stable/workspace/internals/documentation/

> Generate command references from the parser and verify task examples against the CLI.

tmuxp uses argparse definitions from [`tmuxp.cli.create_parser`](<https://libtmux.org/en/py/stable/workspace/reference/tmuxp-cli-create_parser/>) for its command
reference. The optional `shtab` integration reads that parser for completion.

## Keep syntax and behavior aligned

Preserve required and mutually exclusive groups when exporting parser metadata.
An optional-looking positional in help can still belong to a required group.
Run examples against the corresponding tmuxp revision, including prompts,
machine formats, child failures and cleanup.

The CLI reference and [workspace builder API](https://libtmux.org/en/py/stable/workspace/internals/) serve different
tasks. Keep their example imports, prerequisites and behavior explicit.

[Parser source](https://github.com/tmux-python/tmuxp/blob/618b398acc05506d3c682906c36cdeb29dcfa1ff/src/tmuxp/cli/__init__.py).
