opencode-profiles
v1.1.0
Published
OCP CLI - manage and switch between local global opencode profiles
Maintainers
Readme
opencode-profiles (ocp)
A CLI tool for managing and switching between multiple opencode profiles. Each profile points to a directory containing its own opencode.jsonc config, letting you run opencode with different configurations without touching your global setup.
Requirements
Installation
bun install -g opencode-profilesUsage
ocp init
Initialize OCP. Creates the ocp.jsonc config file inside your opencode global config directory.
ocp initocp profile add <name>
Add a new profile pointing to a directory that contains an opencode.jsonc.
# Use a specific path
ocp profile add work --path ~/projects/work
# Use the current directory
ocp profile add personal --cwdocp profile remove <name>
Remove a profile by name.
ocp profile remove workocp profile list
List all profiles. Shows whether each profile is valid (path exists and contains an opencode.jsonc).
ocp profile list
# Output:
# ┌─────────┬──────┬──────────────────────┬───────┐
# │ (index) │ Name │ Path │ Valid │
# ├─────────┼──────┼──────────────────────┼───────┤
# │ 0 │ work │ /home/user/work │ ✓ │
# │ 1 │ old │ /home/user/old │ ✗ │
# └─────────┴──────┴──────────────────────┴───────┘ocp run <profile> [opencode args]
Launch opencode with the given profile. Any extra arguments are passed directly to the opencode CLI.
ocp run workIf the profile has randomPort: true in your ocp.jsonc, a random port is picked each time.
