Usage
Description
Initialize OCX configuration in your project directory or globally. When used with--registry, scaffolds a new OCX registry project.
Flags
| Flag | Shorthand | Default | Description |
|---|---|---|---|
--cwd <path> | Current directory | Working directory | |
--quiet | -q | false | Suppress output |
--verbose | -v | false | Verbose output |
--json | false | Output as JSON | |
--registry <path> | Scaffold a new OCX registry project at path | ||
--namespace <name> | Registry namespace (e.g., my-org) | ||
--author <name> | Author name for the registry | ||
--canary | false | Use canary (main branch) instead of latest release | |
--local <path> | Use local template directory instead of fetching | ||
--global | -g | false | Initialize in global OpenCode config (~/.config/opencode) |
Examples
Initialize Local Project
.opencode/ocx.jsonc in the current directory with a default registry configuration.
Initialize Global Configuration
~/.config/opencode/ with base configuration. This is required before creating profiles.
Scaffold a New Registry
See Also
- Quick Start — End-to-end setup walkthrough.
- ocx add — Add components after initialization.
- ocx registry — Manage registries.