mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-24 06:45:22 +00:00
renamle plug to plugin command
This commit is contained in:
@@ -7,7 +7,7 @@ Technical reference for the current TUI plugin system.
|
||||
- TUI plugin config lives in `tui.json`.
|
||||
- Author package entrypoint is `@opencode-ai/plugin/tui`.
|
||||
- Internal plugins load inside the CLI app the same way external TUI plugins do.
|
||||
- Package plugins can be installed with `opencode plug <module>`.
|
||||
- Package plugins can be installed with `opencode plugin <module>`.
|
||||
|
||||
## TUI config
|
||||
|
||||
@@ -103,8 +103,8 @@ Example:
|
||||
}
|
||||
```
|
||||
|
||||
- `opencode plug <module>` resolves and installs the package first, then reads `oc-plugin`, then patches config.
|
||||
- Alias: `opencode plugin <module>`.
|
||||
- `opencode plugin <module>` resolves and installs the package first, then reads `oc-plugin`, then patches config.
|
||||
- Alias: `opencode plug <module>`.
|
||||
- `-g` / `--global` writes into the global config dir.
|
||||
- Local installs write into `<git worktree>/.opencode` when inside a git repo, otherwise `<cwd>/.opencode`.
|
||||
- Without `--force`, an already-configured npm package name is a no-op.
|
||||
@@ -180,7 +180,7 @@ Command behavior:
|
||||
- `ui.dialog` exposes the host dialog stack:
|
||||
- `replace(render, onClose?)`
|
||||
- `clear()`
|
||||
- `setSize("medium" | "large")`
|
||||
- `setSize("medium" | "large" | "xlarge")`
|
||||
- readonly `size`, `depth`, `open`
|
||||
|
||||
### Keybinds
|
||||
|
||||
@@ -307,9 +307,9 @@ export function createPlugTask(input: PlugInput, dep: PlugDeps = defaultPlugDeps
|
||||
}
|
||||
}
|
||||
|
||||
export const PlugCommand = cmd({
|
||||
command: "plug <module>",
|
||||
aliases: ["plugin"],
|
||||
export const PluginCommand = cmd({
|
||||
command: "plugin <module>",
|
||||
aliases: ["plug"],
|
||||
describe: "install plugin and update config",
|
||||
builder: (yargs: Argv) => {
|
||||
return yargs
|
||||
|
||||
@@ -34,7 +34,7 @@ import { Global } from "./global"
|
||||
import { JsonMigration } from "./storage/json-migration"
|
||||
import { Database } from "./storage/db"
|
||||
import { errorMessage } from "./util/error"
|
||||
import { PlugCommand } from "./cli/cmd/plug"
|
||||
import { PluginCommand } from "./cli/cmd/plug"
|
||||
|
||||
process.on("unhandledRejection", (e) => {
|
||||
Log.Default.error("rejection", {
|
||||
@@ -153,7 +153,7 @@ const cli = yargs(hideBin(process.argv))
|
||||
.command(GithubCommand)
|
||||
.command(PrCommand)
|
||||
.command(SessionCommand)
|
||||
.command(PlugCommand)
|
||||
.command(PluginCommand)
|
||||
.command(DbCommand)
|
||||
.fail((msg, err) => {
|
||||
if (
|
||||
|
||||
Reference in New Issue
Block a user