docs(ocm-cli): update plugin config to tui-only entry and clarify session history source

This commit is contained in:
Chris Scott committed 2026-07-08 17:06:12 -04:00
1 parent b4dd57a862
commit 436ef83df5
1 file changed
+6 -6
+6 -6
View File
@@ -29,20 +29,20 @@ 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 package to your OpenCode config and OpenCode will fetch it on next start. The package's plugin entry self-installs a `~/.local/bin/ocm` symlink, so the `ocm` binary becomes available on your PATH automatically.
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.
```jsonc
// ~/.config/opencode/opencode.json
{
"$schema": "https://opencode.ai/config.json",
"plugin": ["@opencode-manager/ocm-cli", "@opencode-manager/ocm-cli/tui"]
"plugin": ["@opencode-manager/ocm-cli/tui"]
}
```
The next time OpenCode starts it will run `bun install` for the plugin and import it once. You'll see:
The next time OpenCode starts it will run `bun install` for the plugin. You'll see:
```
ocm-cli: installed `ocm` at /Users/you/.local/bin/ocm
ocm installed at /Users/you/.local/bin/ocm
```
If `~/.local/bin` is not on your PATH, the message will tell you. Add this to your shell rc:
@@ -51,7 +51,7 @@ If `~/.local/bin` is not on your PATH, the message will tell you. Add this to yo
export PATH="$HOME/.local/bin:$PATH"
```
The default plugin entry only installs the bin symlink. 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 `./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).
### Option B — global package manager install
@@ -131,7 +131,7 @@ The child takes over the terminal (`stdio: inherit`); closing the TUI exits `ocm
### TUI `/ocm-move`
When the TUI plugin entry is installed, `/ocm-move` is available in local OpenCode sessions. It checks that the matching Manager repo has not diverged, pushes the local git state with the fast bundle + working-tree patch path, exports the active session history from the local OpenCode `/sync` API, rewrites local repo directories to the Manager repo directory, and replays the session through `/api/opencode-proxy/sync/replay`. The local session is retained.
When the TUI plugin entry is installed, `/ocm-move` is available in local OpenCode sessions. It checks that the matching Manager repo has not diverged, pushes the local git state with the fast bundle + working-tree patch path, reads the active session history from the local OpenCode SQLite event database, rewrites local repo directories to the Manager repo directory, and replays the session through `/api/opencode-proxy/sync/replay`. The local session is retained.
- `--force` skips the dirty-working-tree check on `pull` and the safety bail on `push`.
- `--create` (on `push`) creates a new Manager repo when no `origin` match is found.