CH·02CLI reference
gpu operations get
Get an operation's current state
Get an operation's current state
Synopsis
Fetches an operation by id. By default (--wait-timeout 0) it prints the current state once and exits 0, whatever that state is — a plain status read never fails your script.
With --wait-timeout greater than zero the CLI polls until the operation reaches a terminal state (succeeded, failed, or cancelled) or the deadline elapses, and exits non-zero when the operation failed or was cancelled — so a script can do gpu operations get op-123 --wait-timeout 10m && next-step. The operation's details are printed to stdout before the non-zero exit, so a failing run still shows the error code and detail.
gpu operations get <operation-id> [flags]
Examples
# Fetch the current state once and exit 0
# Operation ids are UUIDs, returned by the command that started the work
gpu operations get 7a1e9d84-2c50-4f6b-9b31-0c5f2a6d8e19
# Block until the operation settles (up to 10 minutes), then gate the next step
gpu operations get 7a1e9d84-2c50-4f6b-9b31-0c5f2a6d8e19 --wait-timeout 10m && echo "ready"
Options
-h, --help help for get
--wait-timeout duration How long to poll the operation; 0 = fetch once, don't poll
Options inherited from parent commands
--api-base string API base URL (override with GPUAI_API_BASE env) (default "https://api.gpu.ai/v1")
--debug Enable debug logging to stderr
-o, --output string Output format: table|json (default table on TTY, json otherwise)
SEE ALSO
- gpu operations - Inspect async operations