Documentation Index
Fetch the complete documentation index at: https://docs.opencomputer.dev/llms.txt
Use this file to discover all available pages before exploring further.
Running a Command
Use--wait to run a command synchronously — output streams to your terminal and the CLI exits with the process exit code:
--wait, oc exec creates an exec session and prints the session ID with attach instructions. This is useful for long-running commands:
Working Directory & Environment
Timeouts
Set a timeout with--timeout (in seconds). Default is 0 (no timeout). When exceeded, the command is killed:
Creating an Exec Session
Plainoc exec (without --wait) creates a session for long-running commands. The command keeps running even after you disconnect:
Capturing Output as JSON
Combine--json with --wait for scripting:
Managing Exec Sessions
Shell vs Exec
| Use Case | Command |
|---|---|
| Single command, capture output | oc exec --wait |
| Scripting and automation | oc exec --wait --json |
| Long-running background process | oc exec (no --wait) |
| Interactive development, debugging | oc shell |