compozy terminal exec
Run a command in the workspace
626 pages in CLI Reference
On this page4
Usage
compozy terminal exec -- <command> [args...] [flags]Options9
- --cwdstring
- Working directory under the workspace
- --envstringArray
- Set an environment variable as K=V
- --grepstring
- Keep matching output lines
- --help-h
- help for exec
- --tailint
- Keep the last N output lines
- --visible
- Run in a watchable interactive terminal
- --workspacestring
- Override workspace (ID, name, or path)
- --worktreestring
- Managed worktree ID or name in this workspace
- --yieldstring
- Return control while a longer command continues (default "10s")
Inherited options4
- --computerstring
- Target a computer by name or ID
- --json
- Emit JSON output
- --output-ostring
- Output format: human, json, jsonl, or toon (default "human")
- --profilestring
- Act as a profile for this command
Output Formats
The root -o, --output flag accepts these values. A renderer is supported only when this command writes that result; jsonl is for commands that emit one JSON record per line.
| Format | Command result |
|---|---|
human | Interactive terminal rendering |
json | Machine-readable JSON rendering |
jsonl | One JSON record per line when supported |
toon | Compact agent-readable rendering |
Example:
compozy terminal exec -o json -- <command> [args...]