Skip to main content

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 by ocx 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):
Receipts are advisory records of what was installed. They help track provenance but do not enforce strict lockfile semantics.

See Also