Skip to main content

Usage

Description

Manage global profiles for different OpenCode configurations. Profiles give you portable, isolated configurations that work across repositories.

Subcommands


Profile List

List all available global profiles.

Usage

Flags

Examples

Output


Profile Add

Create a new profile, clone from existing, or install from a registry.

Usage

Arguments

Flags

Examples

Notes

  • Profile names must be valid filesystem names.
  • Spaces are automatically converted to hyphens.
  • --clone accepts: existing profile name.
  • --source accepts: registry/component shorthand for profile components.
  • --from (with --source) provides ephemeral registry URL without saving to config.
  • To overwrite an existing profile, remove it first with ocx profile rm <name> --global, then add again.

Profile Remove

Delete a profile.

Usage

Arguments

Flags

Examples

Notes

  • Deletion is immediate (Cargo-style, no confirmation prompt).
  • Cannot delete the last remaining profile.

Profile Move

Rename a profile.

Usage

Arguments

Flags

Examples

Notes

  • Profile names must be 1–32 characters, alphanumeric with dots, underscores, hyphens.
  • Cannot rename to a name that already exists (remove target first).
  • Warns if renaming the active profile (update OCX_PROFILE env var).
  • Self-rename (same old and new name) is a silent no-op.

Errors


Profile Show

Display profile configuration and contents.

Usage

Arguments

Flags

Examples

Output

See Also