Overview
Work in any repository without modifying it. Your configuration, their code. Time to complete: 5 minutes Prerequisites: OCX installedStep 1: Initialize Global Configuration
Set up the global profile directory:~/.config/opencode/ with the base configuration structure.
Step 2: Install a Profile from a Registry
Install a pre-configured profile using a registry reference:--from flag uses an ephemeral registry reference (not saved to your config).
Step 3: Launch OpenCode with Your Profile
Navigate to any repository and launch OpenCode:Verify Your Setup
List your installed profiles:What Profiles Control
Profiles control what OpenCode sees throughexclude/include patterns. Each profile has isolated registries for security. OpenCode configuration merges safely between profile and local settings.
Common Commands
| Command | Description |
|---|---|
ocx profile add <name> --source <registry/profile> --from <url> --global | Install a profile from a registry |
ocx profile add <name> --clone <existing> --global | Clone an existing profile |
ocx oc -p <name> | Launch OpenCode with a profile |
ocx profile list --global | List your profiles |
ocx config edit --global | Edit your global configuration |
Next Steps
- Profiles Overview — Deep dive into profile configuration and isolation.
- Profile Security — Lock down recipes for untrusted repositories.
- CLI Reference — Full command documentation.