Skip to content
/ ocx Public
forked from kdcokenny/ocx

OpenCode extension manager with portable, isolated profiles. Your setup, anywhere.

License

Notifications You must be signed in to change notification settings

Prmsnls/ocx

 
 

Repository files navigation

OCX

CI npm License Ask DeepWiki

Your OpenCode config, anywhere.

Why OCX?

  • 👻 Profiles — Work in any repo with YOUR config. Control exactly what OpenCode sees.
  • 📦 Registries — npm plugins, MCP servers, components from curated registries.
  • 🔒 Auditable — SHA-256 verified, version-pinned, code you own.

OCX Profiles Demo

Demo uses oh-my-opencode. See more guides.

Installation

OCX supports macOS (x64, Apple Silicon), Linux (x64, arm64), and Windows (x64).

# Recommended (macOS/Linux)
curl -fsSL https://ocx.kdco.dev/install.sh | sh

# Or via npm (any platform)
npm install -g ocx

The install script handles PATH configuration automatically or prints instructions if manual setup is needed.

Quick Start: Profiles

Work in any repo without modifying it. Your config, their code.

# One-time setup
ocx init --global           # Initialize global profiles
ocx profile add work        # Create a work profile

# Install pre-configured profile (optional)
ocx registry add https://ocx-kit.kdco.dev --name kit --global
ocx profile add work --from kit/omo

# Use in any repo
cd ~/oss/some-project
ocx oc -p work              # Launch OpenCode with your work profile

# Or set default
export OCX_PROFILE=work
ocx oc                      # Uses work profile automatically

Profile settings control what OpenCode sees through exclude/include patterns. Registries are isolated per profile for security. OpenCode config merges safely between profile and local settings.

Security Note: By default, profiles include project AGENTS.md files. For untrusted repos, uncomment **/AGENTS.md in your profile's exclude list. See Lock Down Recipe.

Full Profile Guide →

Quick Start: Components

Add components to local projects with automatic dependency resolution.

OCX Components Demo

# Initialize local config
ocx init

# Add a registry
ocx registry add https://registry.kdco.dev --name kdco

# Install components
ocx add kdco/workspace

# Or install npm plugins directly
ocx add npm:@franlol/opencode-md-table-formatter

After installation, components live in .opencode/ where you can customize freely. OCX handles npm dependencies, MCP servers, and config merging automatically.

Philosophy

OCX follows the ShadCN model: components are copied into your project (.opencode/), not hidden in node_modules. You own the code—customize freely.

Like Cargo, OCX resolves dependencies, pins versions, and verifies integrity. Every component is SHA-256 verified and version-pinned. See changes before updating:

ocx diff kdco/workspace

Your AI agent never runs code you haven't reviewed.

Commands

Command Description
ocx add <component> Add components or npm plugins (npm:package)
ocx update [component] Update to latest version
ocx diff [component] Show upstream changes before updating
ocx profile <cmd> Manage global profiles (add, list, remove, show)
ocx opencode / ocx oc Launch OpenCode with profile
ocx registry add <url> Add a component registry (--global for global, -p for profile)
ocx config show View config from current scope
ocx config edit Edit local or global config (--global)
ocx self update Update OCX to latest version
ocx self uninstall Remove OCX config and binary

Full CLI Reference →

Creating Registries

Scaffold a complete registry with one-click deploy support:

npx ocx init --registry my-registry

This creates a complete registry template with deploy buttons for Cloudflare, Vercel, and Netlify.

Disclaimer

This project is not built by the OpenCode team and is not affiliated with OpenCode in any way.

License

MIT

About

OpenCode extension manager with portable, isolated profiles. Your setup, anywhere.

Resources

License

Contributing

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 99.0%
  • Shell 1.0%