Overview
OCX provides a command-line interface for managing OpenCode profiles, component registries, and configuration. This page covers the full command set, global options, and conventions.Short-Flag Policy
OCX follows a minimal short-flag policy inspired by Cargo and CLI Guidelines:- Short flags (
-x) are reserved for high-frequency, cross-command options. - Specialized options use long flags only (
--option-name).
Standard Short Flags
Commands
Global Options
These options are available on all commands:Exit Codes
Environment Variables
Configuration Files
Local Configuration
.opencode/ocx.jsonc
Local project configuration created byocx init:
Global Configuration
~/.config/opencode/ocx.jsonc
Global base configuration (used for downloading global settings like profiles, not applied to projects):Profile Configuration
~/.config/opencode/profiles/<name>/ocx.jsonc
Profile-specific OCX settings:Receipt File
.ocx/receipt.jsonc
Receipt tracking installed components (managed automatically):See Also
- Profiles Overview — Profile concepts and configuration.
- Enterprise Overview — Registry locking and integrity verification.
- Security Policy — Vulnerability disclosure.