Zentty Docs
Embedded CLI
The bundled zentty command controls panes, layouts, topology, colors, integration hooks, and agent status from inside a Zentty pane.
Applies to current public Zentty builds. Last updated May 11, 2026.
How It Works
Zentty injects ZENTTY_CLI_BIN, the instance socket, pane IDs,
worklane IDs, and a pane token into each terminal session. User-facing
commands send pane or discovery requests to the running app over that
socket. Most commands must run inside Zentty unless you explicitly export
a selected pane context.
Discovery commands use a read-only IPC path and can return JSON. Pane commands use pane IPC and require the pane token when called from outside the original pane.
CLI Path
Inside every Zentty pane, ZENTTY_CLI_BIN points to the
bundled binary and the pane environment supplies the socket, ids, and
token needed for local IPC. Outside Zentty, create your own alias or
symlink if you want convenience, then export pane context with
zentty select pane --shell.
Output And Exit Codes
| Exit | Meaning | Output |
|---|---|---|
0 | Command completed. | Human text or JSON when --json is present. |
1 | Usage, validation, or target error. | Error on stderr; JSON commands may include an error envelope. |
2 | IPC unavailable or unauthorized. | Socket or pane token diagnostic on stderr. |
Command names are intended to be stable. If a command is replaced, the old spelling should remain as an alias for at least one release cycle when practical.
JSON Schemas
JSON output is shaped for scripts: opaque ids stay opaque, indexes are user-facing, and agent status is nested under the pane when available.
zentty list panes --json
{
"windowId": "win_...",
"worklaneId": "lane_...",
"panes": [
{
"id": "pane_...",
"index": 1,
"column": 1,
"workingDirectory": "/Users/you/project",
"title": "Claude",
"agent": {
"tool": "claude",
"phase": "needs-input",
"interaction": "approval"
}
}
]
} Command Groups
Discovery
Inspect the current Zentty topology. Add --json when another tool should parse the result.
| Command | Use | Notes |
|---|---|---|
zentty version | Print the installed app version and git commit. | |
zentty list [--window-id ID] [--worklane-id ID] [--json] | Show windows, worklanes, and panes in one topology view. | |
zentty list windows [--json] | List Zentty windows, focus order, worklane count, and pane count. | |
zentty list worklanes [--window-id ID] [--json] | List worklanes, titles, focus state, column count, focused pane, and pane count. | |
zentty list panes [--window-id ID] [--worklane-id ID] [--json] | List panes, indexes, columns, working directories, agent tool, and status. | |
zentty pane list [--json] | List panes in the current worklane by default. | Inside Zentty, this auto-fills the current window and worklane filters. |
Pane Control
Move focus, close panes, zoom out, resize, and split without leaving the shell.
| Command | Use | Notes |
|---|---|---|
zentty pane focus [left|right|up|down|INDEX|PANE_ID] | Focus a pane by direction, 1-based index, or pane ID. | |
zentty pane close [INDEX|PANE_ID] | Close the target pane, defaulting to the current pane. | |
zentty pane zoom [selectors] | Toggle zoomed-out pane view for the selected pane. | |
zentty pane resize left|right|up|down|60% | Resize by direction or set the focused pane to a percentage. | |
zentty split [right|left|up|down] [--equal|--golden|--ratio N] | Split the focused pane with an optional layout rule. | |
zentty hsplit / zentty vsplit | Aliases for split right and split down. |
Layout & Worklanes
Apply visible layout presets and label worklanes for scanning in the sidebar.
| Command | Use | Notes |
|---|---|---|
zentty layout full|halves|thirds|quarters | Set how many columns are visible in the worklane. | |
zentty layout golden-wide|golden-narrow|golden-tall|golden-short | Bias width or height around the focused pane. | |
zentty layout reset | Return the selected pane area to the adaptive default. | |
zentty layout PRESET --vertical | Apply vertical pane-per-column presets instead of horizontal column presets. | |
zentty worklane color COLOR | Set a sidebar color on the current or selected worklane. | |
zentty worklane color --list | Print available worklane color names. |
Selection & Integrations
Bridge shells, hooks, and agent CLIs back into the current pane.
| Command | Use | Notes |
|---|---|---|
zentty select pane --pane-index N --shell | Resolve a pane and print shell exports for out-of-pane control. | |
zentty select pane --pane-index N --shell --include-control-token | Also print the pane control token. | Use only for trusted local shells that will send pane operations. |
zentty install cursor-hooks | Install Cursor hook integration entries. | |
zentty install kimi-hooks | Install Kimi hook integration entries. | |
zentty uninstall cursor-hooks|kimi-hooks | Remove previously installed hook entries for that target. | |
zentty ipc agent-event | Forward Agent Status Protocol JSON on stdin. | Hidden from normal help because wrappers and hooks usually call it. |
zentty codex-notify / zentty gemini-hook | Forward tool-specific hook payloads. | Hidden helper commands used by generated launch plans. |
Targeting
Pane commands accept selectors for window ID, worklane ID, pane ID, pane index, and pane token. If you omit selectors, commands default to the current pane and worklane when the environment provides enough context.
| Selector | Where It Applies | Behavior |
|---|---|---|
--window-id | Discovery and pane commands | Scopes the request to a specific Zentty window. |
--worklane-id | Discovery and pane commands | Scopes pane indexes to a specific worklane. |
--pane-id | Pane commands | Targets an exact pane. Do not combine with a positional pane ID. |
--pane-index | Pane commands | Targets a 1-based pane index within the selected worklane. |
--pane-token | Pane commands | Authorizes out-of-pane control. |
--include-control-token | Discovery and select | Includes the token in JSON or shell export output. |
zentty pane focus 2
zentty pane focus right
zentty split down --golden
zentty layout thirds
zentty worklane color teal
zentty list --json Out-Of-Pane Control
To control a pane from another shell, resolve it with
zentty select pane and request shell exports. Include the
control token only when you need to send pane operations from outside the
original pane.
Tokens are scoped to the pane and current Zentty instance. They should be treated as local secrets: do not paste them into shared shells, remote sessions, logs, or issue reports. Close the pane to revoke the token.
zentty select pane --pane-index 1 --shell --include-control-token
export ZENTTY_INSTANCE_SOCKET='...'
export ZENTTY_WINDOW_ID='...'
export ZENTTY_WORKLANE_ID='...'
export ZENTTY_PANE_ID='...'
export ZENTTY_PANE_TOKEN='...' Internal Helpers
These commands are hidden from normal help because generated hooks call them, but documenting the I/O contract makes custom integrations easier.
| Helper | Input | Use |
|---|---|---|
zentty ipc agent-event | Agent Status Protocol JSON on stdin | Manual and wrapper integrations. |
zentty codex-notify | Codex notify callback args or stdin | Codex lifecycle and attention events. |
zentty gemini-hook | Gemini hook payload | Gemini lifecycle and ToolPermission events. |
Recipe Book
# Focus the pane currently running Claude
zentty list panes --json | jq -r '.panes[] | select(.agent.tool=="claude") | .id' | head -1 | xargs zentty pane focus
# Apply thirds to the current worklane
zentty layout thirds
# Color the current worklane by repo state
zentty worklane color amber
# Export a trusted control context
zentty select pane --pane-index 1 --shell --include-control-token
# List idle agent panes
zentty list panes --json | jq '.panes[] | select(.agent.phase=="idle")'
# Open a visible right split for a review pane
zentty split right --golden
# Reset layout after a focused debugging session
zentty layout reset
# Forward a custom needs-input event
printf '%s
' '{"version":1,"event":"agent.needs-input"}' | zentty ipc agent-event Hook Install Paths
Manual install commands write only the relevant tool's local hook config and can be undone with the matching uninstall command.
| Command | Writes | Undo |
|---|---|---|
zentty install cursor-hooks | Cursor hook entries in the user's Cursor CLI configuration area. | zentty uninstall cursor-hooks |
zentty install kimi-hooks | Kimi hook entries in the user's Kimi CLI configuration area. | zentty uninstall kimi-hooks |
Automation Patterns
zentty list worklanes --json, select a worklane by title or id, then call zentty pane focus --worklane-id ... --pane-index .... zentty select pane --shell --include-control-token, export the values, then run later pane operations from another trusted local process. zentty ipc agent-event. Include routing environment and an interaction kind when a human needs to act. --json for topology reads. Human tables truncate IDs, titles, and working directories for readability.