Skip to main content

Usage

ocx config <subcommand> [options]

Description

View and edit OCX configuration files. Operates on local project config by default; use --global or --profile to target other scopes.

Subcommands


Config Show

Show the merged configuration from the current directory and profile.

Usage

ocx config show [options]

Flags

FlagShorthandDefaultDescription
--originfalseShow the source of each configuration setting
--profile <name>-pUse specific profile for resolution
--jsonfalseOutput as JSON

Examples

# Show config from current scope
ocx config show

# Show config with sources
ocx config show --origin

# Show config using specific profile
ocx config show -p work

# Get JSON output
ocx config show --json

Output

$ ocx config show
Merged configuration:
  Registries: kdco
  Component path: .opencode

$ ocx config show --origin
Configuration sources:
  registries:
    kdco: global profile (work)
  componentPath:
    .opencode: local config

Config Edit

Edit a configuration file in your $EDITOR.

Usage

ocx config edit [options]

Flags

FlagShorthandDefaultDescription
--globalfalseEdit global config
--profile <name>-pEdit specific profile’s config (implies --global)

Environment

  • $EDITOR: Text editor to use (e.g., vim, nano, code).
  • $VISUAL: Fallback editor if $EDITOR is not set.
  • Falls back to vi if neither is set.

Examples

# Edit local .opencode/ocx.jsonc
ocx config edit

# Edit global ocx.jsonc
ocx config edit --global

# Edit specific profile's ocx.jsonc
ocx config edit -p work

File Paths

ScopeFile Path
Local.opencode/ocx.jsonc
Global~/.config/opencode/ocx.jsonc
Profile~/.config/opencode/profiles/<name>/ocx.jsonc

See Also