ocp is a developer-first CLI for managing OpenCode profiles in Git, so work, personal, OSS, and experimental environments stay clean, reproducible, and one command away.
Get started · Read the docs · Star on GitHub · Contribute
If ocp is useful to you, please consider starring the repository. It helps more developers discover the project.
OpenCode configuration tends to drift into local state: copied files, one-off edits, and fragile “don’t touch this” setups that nobody wants to revisit.
ocp turns that into a versioned workflow. Profiles live in repositories, changes are reviewable, switching contexts is fast, and your active setup becomes explicit instead of accidental.
|
⚡ Fast context switching Move between work, personal, OSS, and experiment setups without manually rewriting config files. |
🧬 Configuration in Git Treat OpenCode profiles like code: version them, review them, share them, and keep them reproducible. |
🛡️ Safer local changes `ocp` links active profile files into your OpenCode directory and creates backups when replacing existing files. |
# Add a profile repository
ocp repository add git@github.com:my-org/opencode-profiles.git --name my-org-opencode-profiles
# See what is available
ocp repository list
ocp profile list
# Switch your active OpenCode setup
ocp profile use my-companyThat is the core idea: store configuration intentionally, discover it easily, and switch without friction.
- Repository-backed profiles for OpenCode configuration
- Simple switching between named environments
- Interactive terminal UI for day-to-day workflows
- Profile inheritance for layered configuration setups
- Backup-aware file replacement when applying profiles
- Native-image distribution target for a fast CLI experience
brew install alvarosanchez/tap/ocpgitin yourPATHbatoptional for syntax-highlighted previews in interactive mode
The README is intentionally a landing page. Detailed documentation is planned for GitHub Pages and, until it is published, the product specification remains the best source of detailed behavior and contract information.
ocp is built as a modern CLI with a strong behavior contract and a native-distribution path in mind.
./gradlew test
./gradlew check
./gradlew buildIf you are contributing, start with SPEC.md. It is the source of truth for product behavior and acceptance criteria.
Issues and pull requests are welcome as ocp moves toward its 1.0 release.
If you want to help, the highest-value contributions are the ones that improve developer experience, reliability, and the clarity of the configuration workflow.