Prerelease This site documents an alpha of libtmux. Its structure, URLs and APIs are subject to change.

capture_pane

Read pane output; accepts no client-supplied executable input. Returned content may be sensitive or untrusted. Read the text a pane is showing, and optionally its scrollback. The newest lines are always kept; anything dropped to fit the budget is reported. To watch a pane across several turns, use capture_since instead — it returns only what is new.

All .NET tools · JSON · Source

Arguments

includeHistory optional · boolean
Include scrollback.

Default: false.

joinWrappedLines optional · boolean
Rejoin tmux-wrapped lines.

Default: false.

maxLines optional · integer | null
Maximum returned lines.

Default: null.

paneId optional · string | null
A pane id. Omit for the active pane.

Default: null.

Schemas

The schema defines required fields, nested values, defaults, and validation constraints.

Input schema
{
"additionalProperties": false,
"properties": {
"includeHistory": {
"default": false,
"description": "Include scrollback.",
"type": "boolean"
},
"joinWrappedLines": {
"default": false,
"description": "Rejoin tmux-wrapped lines.",
"type": "boolean"
},
"maxLines": {
"default": null,
"description": "Maximum returned lines.",
"maximum": 2147483647,
"minimum": -2147483648,
"type": [
"integer",
"null"
]
},
"paneId": {
"default": null,
"description": "A pane id. Omit for the active pane.",
"type": [
"string",
"null"
]
}
},
"type": "object"
}
Output schema
{
"properties": {
"content": {
"properties": {
"droppedBytes": {
"type": "integer"
},
"droppedLines": {
"type": "integer"
},
"lines": {
"items": {
"type": "string"
},
"type": "array"
},
"truncated": {
"type": "boolean"
}
},
"required": [
"lines",
"truncated",
"droppedLines",
"droppedBytes"
],
"type": "object"
},
"paneId": {
"type": "string"
}
},
"required": [
"paneId",
"content"
],
"type": "object"
}
Tool annotations
{
"destructiveHint": true,
"idempotentHint": false,
"openWorldHint": true,
"readOnlyHint": false,
"title": "Capture pane"
}
Esc

Type to search.