# Workspace reference generation

Source: https://libtmux.org/en/rs/latest/workspace/internals/documentation/

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

**Workspace Manager concept example** A working example of the core library. It can change without notice.



The executable's parser owns its command names, arguments and options. Keep
reference generation tied to those definitions.

## Command metadata

clap owns the command definitions. `--generate schema` exports command metadata, `--generate man` writes the manual, and completion generation uses the same graph.

See [shell completion](https://libtmux.org/en/rs/latest/workspace/cli/completion/) for end-user setup. A generated
parser reference describes syntax; task examples also need to exercise the
underlying services and their cleanup.

## Site integration

Record the CLI's own source revision independently from the core library
reference. Keep commands, configuration and examples specific to that source.
Use the same content selection for HTML, search, Markdown and machine exports.

Verify guides against a private tmux server, with cleanup limited to the objects
the test owns. Check failure cases as well as successful construction.

[CLI source](https://github.com/libtmux/libtmux-rs/blob/e9be0b6f6d22cd2eb79b0ec08964f82e717e5fe4/crates/tmux-workspace/docs/cli.md).
