Oracle Cloud Infrastructure CLI
$ oci Official High RiskThe Oracle Cloud Infrastructure CLI (oci) emits JSON natively on every command, supports JMESPath --query filtering, --from-json payload files, --generate-full-command-json-input schema introspection, and --force for non-interactive operations.
brew install oci-cli oci outputs structured JSON by default and generates exact request schemas via --generate-full-command-json-input without needing an MCP bridge.
Agent-Readiness Checklist
Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.
FCRS-1.0 6-Dimension Breakdown
Default JSON output, JMESPath --query, and --generate-full-command-json-input make complex OCI payloads discoverable.
- JSON output by default; supports
--queryand--generate-full-command-json-input
Explicit --profile, compartment scoping, and confirmation prompts on deletes (unless --force) reduce accidents, though general --dry-run is missing.
- Requires
--forceto bypass delete confirmations
Installable via Homebrew and pip, but Python dependencies are heavy and require PEM key setup in ~/.oci/config.
- Homebrew
oci-cliand PyPIoci-clipackages
Full OCI API coverage with --from-json and --query filtering.
- Supports
--from-jsonand client-side JMESPath projection
Official Oracle repository (oracle/oci-cli) updated alongside OCI service launches.
- First-party
oracle/oci-clirepository
Auto-generated --help and full reference docs match the API spec.
- Complete CLI reference generated from OCI OpenAPI specs
Security, Auth & Guardrails
Reads API signing keys and compartment defaults from ~/.oci/config, or uses OCI_CLI_PROFILE and OCI_CLI_AUTH (e.g. instance/resource principals).
CLI is free (UPL-1.0 / Apache-2.0); OCI resource creation incurs cloud billing.
# OCI CLI Agent Rules - Pin `--profile` and explicit `--compartment-id` OCIDs on every call. - Use `--query` on `list` commands to strip verbose OCIDs and metadata. - Never pass `--force` on `delete`/`terminate` commands without explicit user confirmation.
Agent-Ready Command Recipes
Safe Read-Only Queries
oci iam region-subscription list --query 'data[].{region:"region-name",status:status}' Emits JSON by default and trims fields with JMESPath --query.
oci compute instance launch --generate-full-command-json-input
Prints the complete JSON payload template offline for safe parameter construction.
Strengths for Agents
- + Outputs structured JSON by default without needing an extra output flag.
- +
--generate-full-command-json-inputexposes full payload schemas offline. - + Built-in JMESPath
--querytrims long OCID-heavy responses.
Caveats & Pitfalls
- ! Heavy Python distribution and long OCID identifiers increase setup and prompt friction.
- ! Lacks a universal
--dry-runflag for resource mutations.