fix(ocm-cli): include plugin installer in package

This commit is contained in:
Chris Scott committed 2026-07-08 17:44:24 -04:00
1 parent 61efcf9ad1
commit bf54f6e7c8
3 files changed
+15 -13

No files matched your search

+5 -5
View File
@@ -29,13 +29,13 @@ The CLI is published as `@opencode-manager/ocm-cli`. There are two install paths
### Option A — install via OpenCode's plugin loader (recommended)
Add the TUI plugin entry to your OpenCode config and OpenCode will fetch the package on next start. The package `postinstall` script self-installs a `~/.local/bin/ocm` symlink for local plugin installs, so the `ocm` binary becomes available on your PATH automatically.
Add the package to your OpenCode TUI config and OpenCode will fetch it on next start. The package exposes a `./tui` entrypoint, and OpenCode resolves that entrypoint automatically from the package name. The package `postinstall` script self-installs a `~/.local/bin/ocm` symlink for local plugin installs, so the `ocm` binary becomes available on your PATH automatically.
```jsonc
// ~/.config/opencode/opencode.json
// ~/.config/opencode/tui.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@opencode-manager/ocm-cli/tui"]
"$schema": "https://opencode.ai/tui.json",
"plugin": ["@opencode-manager/ocm-cli"]
}
```
@@ -47,7 +47,7 @@ If `~/.local/bin` is not on your PATH, add this to your shell rc:
export PATH="$HOME/.local/bin:$PATH"
```
The `./tui` entry registers `/ocm-move`, a TUI command that keeps the local session and copies the active session to the Manager after pushing the current repo state. Run it from inside a local OpenCode session after `ocm login` and after the repo exists on the Manager (`ocm push --create` if needed).
The `@opencode-manager/ocm-cli` package entry registers `/ocm-move`, a TUI command that keeps the local session and copies the active session to the Manager after pushing the current repo state. Run it from inside a local OpenCode session after `ocm login` and after the repo exists on the Manager (`ocm push --create` if needed).
### Option B — global package manager install
+8 -7
View File
@@ -63,18 +63,19 @@ refuses to overwrite uncommitted local changes unless `--force` is passed.
## OpenCode TUI plugin
The package exposes an OpenCode TUI plugin at
`@opencode-manager/ocm-cli/tui`. It registers `/ocm-move`, which keeps the
local session and copies the active session to the Manager after pushing the
current repo state. Use it from inside an OpenCode session after `ocm login`
and after the repo already exists on the Manager (`ocm push --create` if
needed).
The package exposes an OpenCode TUI plugin through its `./tui` package export.
Configure the package name and OpenCode resolves that TUI entrypoint
automatically. It registers `/ocm-move`, which keeps the local session and
copies the active session to the Manager after pushing the current repo state.
Use it from inside an OpenCode session after `ocm login` and after the repo
already exists on the Manager (`ocm push --create` if needed).
Enable it in `tui.json`:
```jsonc
{
"plugin": ["@opencode-manager/ocm-cli/tui"]
"$schema": "https://opencode.ai/tui.json",
"plugin": ["@opencode-manager/ocm-cli"]
}
```
+2 -1
View File
@@ -22,7 +22,8 @@
},
"files": [
"dist",
"README.md"
"README.md",
"scripts/postinstall.mjs"
],
"scripts": {
"build": "bun scripts/build.ts",