Skip to content

Commit bf54f6e

Browse files
fix(ocm-cli): include plugin installer in package
1 parent 61efcf9 commit bf54f6e

3 files changed

Lines changed: 15 additions & 13 deletions

File tree

docs/ocm-cli.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ The CLI is published as `@opencode-manager/ocm-cli`. There are two install paths
2929

3030
### Option A — install via OpenCode's plugin loader (recommended)
3131

32-
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.
32+
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.
3333

3434
```jsonc
35-
// ~/.config/opencode/opencode.json
35+
// ~/.config/opencode/tui.json
3636
{
37-
"$schema": "https://opencode.ai/config.json",
38-
"plugin": ["@opencode-manager/ocm-cli/tui"]
37+
"$schema": "https://opencode.ai/tui.json",
38+
"plugin": ["@opencode-manager/ocm-cli"]
3939
}
4040
```
4141

@@ -47,7 +47,7 @@ If `~/.local/bin` is not on your PATH, add this to your shell rc:
4747
export PATH="$HOME/.local/bin:$PATH"
4848
```
4949

50-
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).
50+
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).
5151

5252
### Option B — global package manager install
5353

ocm-cli/README.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -63,18 +63,19 @@ refuses to overwrite uncommitted local changes unless `--force` is passed.
6363

6464
## OpenCode TUI plugin
6565

66-
The package exposes an OpenCode TUI plugin at
67-
`@opencode-manager/ocm-cli/tui`. It registers `/ocm-move`, which keeps the
68-
local session and copies the active session to the Manager after pushing the
69-
current repo state. Use it from inside an OpenCode session after `ocm login`
70-
and after the repo already exists on the Manager (`ocm push --create` if
71-
needed).
66+
The package exposes an OpenCode TUI plugin through its `./tui` package export.
67+
Configure the package name and OpenCode resolves that TUI entrypoint
68+
automatically. It registers `/ocm-move`, which keeps the local session and
69+
copies the active session to the Manager after pushing the current repo state.
70+
Use it from inside an OpenCode session after `ocm login` and after the repo
71+
already exists on the Manager (`ocm push --create` if needed).
7272

7373
Enable it in `tui.json`:
7474

7575
```jsonc
7676
{
77-
"plugin": ["@opencode-manager/ocm-cli/tui"]
77+
"$schema": "https://opencode.ai/tui.json",
78+
"plugin": ["@opencode-manager/ocm-cli"]
7879
}
7980
```
8081

ocm-cli/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,8 @@
2222
},
2323
"files": [
2424
"dist",
25-
"README.md"
25+
"README.md",
26+
"scripts/postinstall.mjs"
2627
],
2728
"scripts": {
2829
"build": "bun scripts/build.ts",

0 commit comments

Comments
 (0)