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: about 2 months 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 (5 months ago)
- Default Branch: main
- Last Pushed: 2026-01-24T03:21:06.000Z (4 months ago)
- Last Synced: 2026-01-24T12:38:44.126Z (4 months 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** β Install profiles and components from curated registries.
- π **Auditable** β SHA-verified, code you own.

*Demo uses [oh-my-opencode](https://ocx.kdco.dev/docs/guides/oh-my-opencode). See [more guides](https://ocx.kdco.dev/docs/guides/index).*
## 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
Work in any repo without modifying it. Your config, their code.
```bash
# One-time setup
ocx init --global
# Install the KDCO workspace profile (OpenCode Free Models Only)
ocx profile add ws --source tweak/p-1vp4xoqv --from https://tweakoc.com/r --global
# Launch OpenCode with the profile
ocx oc -p ws
```
Need a custom profile? Open the KDCO Workspace harness in TweakOC: https://tweakoc.com/h/kdco-workspace
Profiles control what OpenCode sees through `exclude`/`include` patterns. Each profile has isolated registries for security. OpenCode config merges safely between profile and local settings.
> **Security Note:** An empty exclude list includes all project instruction files; the default profile template ships a secure exclude list. For trusted repos, edit your profile to loosen the template's exclude list. See [Lock Down Recipe](https://ocx.kdco.dev/docs/profiles/security#lock-down-recipe).
**[Profile Deep Dive β](https://ocx.kdco.dev/docs/profiles/overview)**
## Common Commands
| Command | Description |
|---------|-------------|
| `ocx profile add --source --from --global` | Install a profile from a registry |
| `ocx profile add --clone --global` | Clone an existing profile |
| `ocx oc -p ` | Launch OpenCode with a profile |
| `ocx profile list --global` | List your profiles |
| `ocx config edit --global` | Edit your global config |
| `ocx migrate` | Dry-run preview of v1.4.6 β v2 migration (shows what would change, no writes) |
| `ocx migrate --apply` | Apply migration to receipt format |
| `ocx migrate --global` | Dry-run preview of global root + all profiles migration |
| `ocx migrate --global --apply` | Apply migration across global root and profiles |
**[Full CLI Reference β](https://ocx.kdco.dev/docs/cli/commands)**
## Advanced Usage
### Components
Add individual components to projects (copied to `.opencode/`, not `node_modules`):
```bash
# One-time local setup
ocx init
# Add a registry with a name
ocx registry add https://registry.kdco.dev --name kdco
# Install components using name/component syntax
ocx add kdco/workspace
```
See [Components & Registries](https://ocx.kdco.dev/docs/registries/create) for more.
### Upgrading from v1.4.6
If you have an existing v1.4.6 project, migrate to the receipt format (`.ocx/receipt.jsonc`):
```bash
ocx migrate # Dry-run: shows what would be migrated (no files written)
ocx migrate --apply # Apply migration
ocx verify # Confirm integrity post-migration
```
For global config migration (migrates global root and all profiles):
```bash
ocx migrate --global # Preview migration across global root + all profiles
ocx migrate --global --apply # Apply migration to global root and every profile
```
### Creating Registries
Scaffold and deploy your own registry:
```bash
npx ocx init --registry my-registry
```
See [Creating Registries](https://ocx.kdco.dev/docs/registries/create) for details.
## 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 and verifies integrity. Every component is SHA-256 verified.
*Your AI agent never runs code you haven't reviewed.*
## Documentation
- **[Profiles](https://ocx.kdco.dev/docs/profiles/overview)** β Deep dive into profile configuration and isolation
- **[CLI Reference](https://ocx.kdco.dev/docs/cli/commands)** β Complete command documentation
- **[Creating Registries](https://ocx.kdco.dev/docs/registries/create)** β Build and distribute your own components
- **[Guides](https://ocx.kdco.dev/docs/guides/index)** β Step-by-step tutorials
## 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