https://github.com/kdcokenny/ocx
OpenCode extension manager with portable, isolated profiles. Work anywhere with your config.
https://github.com/kdcokenny/ocx
ai-agents bun cli ocx opencode package-manager shadcn typescript
Last synced: 28 days ago
JSON representation
OpenCode extension manager with portable, isolated profiles. Work anywhere with your config.
- Host: GitHub
- URL: https://github.com/kdcokenny/ocx
- Owner: kdcokenny
- License: mit
- Created: 2025-12-28T22:05:08.000Z (about 2 months ago)
- Default Branch: main
- Last Pushed: 2026-01-24T03:21:06.000Z (about 1 month ago)
- Last Synced: 2026-01-24T12:38:44.126Z (about 1 month ago)
- Topics: ai-agents, bun, cli, ocx, opencode, package-manager, shadcn, typescript
- Language: TypeScript
- Homepage: https://kdco.dev
- Size: 1.62 MB
- Stars: 89
- Watchers: 4
- Forks: 4
- Open Issues: 19
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Security: SECURITY.md
- Agents: AGENTS.md
Awesome Lists containing this project
README
# OCX
[](https://github.com/kdcokenny/ocx/actions/workflows/ci.yml)
[](https://www.npmjs.com/package/ocx)
[](https://github.com/kdcokenny/ocx/blob/main/LICENSE)
[](https://deepwiki.com/kdcokenny/ocx)
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.

*Demo uses [oh-my-opencode](./docs/guides/oh-my-opencode.md). See [more guides](./docs/guides/).*
## Installation
OCX supports macOS (x64, Apple Silicon), Linux (x64, arm64), and Windows (x64).
```bash
# 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.
```bash
# 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](./docs/PROFILES.md#lock-down-recipe).
**[Full Profile Guide →](./docs/PROFILES.md)**
## Quick Start: Components
Add components to local projects with automatic dependency resolution.

```bash
# 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:
```bash
ocx diff kdco/workspace
```
*Your AI agent never runs code you haven't reviewed.*
## Commands
| Command | Description |
|---------|-------------|
| `ocx add ` | Add components or npm plugins (`npm:package`) |
| `ocx update [component]` | Update to latest version |
| `ocx diff [component]` | Show upstream changes before updating |
| `ocx profile ` | Manage global profiles (`add`, `list`, `remove`, `show`) |
| `ocx opencode` / `ocx oc` | Launch OpenCode with profile |
| `ocx registry add ` | 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 →](./docs/CLI.md)**
## Creating Registries
Scaffold a complete registry with one-click deploy support:
```bash
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](https://github.com/sst/opencode) in any way.
## License
MIT