ucli agent guide
CLI: ucli [global flags] <group> <command> [args...]
Recommended defaults
ucli --output json --quiet <group> <command>
--output jsonfor machine-readable output--quietto suppress decorative text--fieldsto shrink payloads--filterand--sortto shape data before it hits your context
Guardrails
- Prefer read-only commands first. Inspect before acting.
- Use
--yesonly in deliberate automation paths, never speculatively. - Pair destructive actions with explicit identifiers. No fuzzy matching in the shell.
- Re-fetch state after any mutation. Do not trust a prior cache.
- Treat exit code
0as success. Non-zero: capture stderr, retry only on transient failures.
Command groups
| Group | Typical use |
|---|---|
system | info, health, status, resources, uptime |
array | status, devices, parity, parity-check actions |
disks | Inventory, SMART, temp, usage, mount |
containers | list, inspect, logs, stats, lifecycle actions |
notifications | list, latest, get, create, archive |
vms | list, inspect, lifecycle actions |
shares | list, get, usage |
logs | list, get, system, tail, search |
services | list, get, status |
network | Interfaces, status |
schema | API introspection |
diagnostics | ping, latency, env, doctor |
Workflow: health check
ucli system info --output json --quiet
ucli system health --output json --quiet
ucli array status --output json --quiet
ucli services status --output json --quiet
- Fetch each separately. Fail fast on non-zero exits.
- Summarize array state, service state, resource pressure, warnings.
- Only pull logs if the snapshot shows trouble.
Workflow: container management
# list running
ucli containers list --output json --quiet --fields id,names,state,status --sort names:asc
# inspect one
ucli containers inspect <id> --output json --quiet
# restart
ucli containers restart <id> --yes --output json --quiet
- Resolve target by
idornames. - Inspect current state.
- Execute with
--yeswhen confirmation would block automation. - Re-read status after mutation.
Anti-patterns
- Don't parse human-readable output. Always use
--output json. - Don't assume partial success from human-readable text. Check exit codes.
- Don't retry on non-transient errors (auth, bad arguments, missing resources).
- Don't skip
--fieldson large result sets. Token waste adds up fast. - Don't chain mutations without re-fetching state between them.
- Don't use
--forceunless you understand exactly what it skips.
Configuration
Default config path: ~/.config/ucli/config.yaml
default_profile: lab
profiles:
lab:
host: http://192.168.1.10:7777
apiKey: YOUR_API_KEY
output: json
timeout: 30
Prefer --host and --api-key explicitly for isolated jobs, --profile <name> for stable environments.
ucli agent guide
CLI: ucli [global flags] <group> <command> [args...]
Recommended defaults
ucli --output json --quiet <group> <command>
--output jsonfor machine-readable output--quietto suppress decorative text--fieldsto shrink payloads--filterand--sortto shape data before it hits your context
Guardrails
- Prefer read-only commands first. Inspect before acting.
- Use
--yesonly in deliberate automation paths, never speculatively. - Pair destructive actions with explicit identifiers. No fuzzy matching in the shell.
- Re-fetch state after any mutation. Do not trust a prior cache.
- Treat exit code
0as success. Non-zero: capture stderr, retry only on transient failures.
Command groups
| Group | Typical use |
|---|---|
system | info, health, status, resources, uptime |
array | status, devices, parity, parity-check actions |
disks | Inventory, SMART, temp, usage, mount |
containers | list, inspect, logs, stats, lifecycle actions |
notifications | list, latest, get, create, archive |
vms | list, inspect, lifecycle actions |
shares | list, get, usage |
logs | list, get, system, tail, search |
services | list, get, status |
network | Interfaces, status |
schema | API introspection |
diagnostics | ping, latency, env, doctor |
Workflow: health check
ucli system info --output json --quiet
ucli system health --output json --quiet
ucli array status --output json --quiet
ucli services status --output json --quiet
- Fetch each separately. Fail fast on non-zero exits.
- Summarize array state, service state, resource pressure, warnings.
- Only pull logs if the snapshot shows trouble.
Workflow: container management
# list running
ucli containers list --output json --quiet --fields id,names,state,status --sort names:asc
# inspect one
ucli containers inspect <id> --output json --quiet
# restart
ucli containers restart <id> --yes --output json --quiet
- Resolve target by
idornames. - Inspect current state.
- Execute with
--yeswhen confirmation would block automation. - Re-read status after mutation.
Anti-patterns
- Don't parse human-readable output. Always use
--output json. - Don't assume partial success from human-readable text. Check exit codes.
- Don't retry on non-transient errors (auth, bad arguments, missing resources).
- Don't skip
--fieldson large result sets. Token waste adds up fast. - Don't chain mutations without re-fetching state between them.
- Don't use
--forceunless you understand exactly what it skips.
Configuration
Default config path: ~/.config/ucli/config.yaml
default_profile: lab
profiles:
lab:
host: http://192.168.1.10:7777
apiKey: YOUR_API_KEY
output: json
timeout: 30
Prefer --host and --api-key explicitly for isolated jobs, --profile <name> for stable environments.