# Capture a workspace

Source: https://libtmux.org/en/py/stable/workspace/cli/freeze/

> Capture a running tmux session as a starting point for a workspace file.

Capture a running tmux session as a starting workspace file. A capture cannot
recover original scripts, plugin intent, comments or every application state.

## Export a named session

After the [installation walkthrough](https://libtmux.org/en/py/stable/workspace/guides/installation/) creates
`workspace-guide`, choose a new destination:

```console
$ tmuxp freeze \
    -L workspace-guide \
    --workspace-format yaml \
    --save-to captured-workspace.yaml \
    --yes \
    workspace-guide
```

Without a session, format or destination, the command can ask for missing
choices. `--yes` answers yes/no questions; it does not supply every choice.
`--quiet` suppresses explanatory status but can still allow prompts.

An explicit `--save-to` path bypasses the overwrite confirmation used by the
prompted path. Select a new path deliberately. A successful export writes a
file; declining a confirmation can return without saving.

Inspect the captured commands and paths before following [export and
reload](https://libtmux.org/en/py/stable/workspace/guides/export-session/).

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