# workroom capture

> Print a terminal session's screen, or its history, as text.

<!-- Generated from the workroom binary's commands by `make docs-cli`. Don't edit by hand. -->

```text
workroom capture TARGET
```

## Options

```text
  -h, --help[=true|false]     help for capture
      --all[=true|false]      The whole scrollback, streamed (one envelope per chunk with --json)
      --lines string          Rows of history above the visible screen to add (default "0")
      --unwrap[=true|false]   Join lines the pane wrapped
      --vt[=true|false]       Keep escape codes (colours and styles)
```

## Options inherited from parent commands

```text
      --json[=true|false]      Emit machine-readable JSON (exactly one object on stdout)
  -v, --verbose[=true|false]   Print detailed and verbose output
```

## How to use it

Reads a session's screen as plain text, as it shows now: what to look at before you type, and after a command whose output you need. `--lines N` adds N rows of history above the screen, `--all` streams the whole scrollback (one envelope per chunk with `--json`, each with `chunk` and `more`), `--unwrap` joins lines the pane wrapped and `--vt` keeps escape codes. Every reply has `cursor`, `size`, `alternate_screen` (a full-screen program is up) and the live `title`. A capture never types anything, and works under a full-screen program too.

## See also

* [workroom](/docs/cli/workroom.md)	 - Manage development workrooms
* [workroom help agents](/docs/cli/workroom-help-agents.md)	 - The terminal API, for coding agents
* [Terminal API reference](/docs/reference/terminal-api.md)	 - Every method, event and error of the terminal API
