Skip to content

alvarosanchez/ocp

Repository files navigation

ocp

Switch OpenCode setups like code, not chaos.

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.

GitHub stars Latest release GitHub downloads License: Apache-2.0 Java 25 Micronaut 4.x

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.


Why developers use ocp

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.

What ocp feels like

# 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-company

That is the core idea: store configuration intentionally, discover it easily, and switch without friction.

What you get

  • 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

Get started

Install with Homebrew

brew install alvarosanchez/tap/ocp

Requirements

  • git in your PATH
  • bat optional for syntax-highlighted previews in interactive mode

Documentation

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.

  • Docs site: Planned for GitHub Pages
  • Product spec: SPEC.md
  • License: LICENSE

Built for developers

ocp is built as a modern CLI with a strong behavior contract and a native-distribution path in mind.

Development

./gradlew test
./gradlew check
./gradlew build

If you are contributing, start with SPEC.md. It is the source of truth for product behavior and acceptance criteria.

Contributing

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.

About

ocp (OpenCode Configuration Profiles) is a CLI to manage OpenCode config profiles stored in Git repositories.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors