From 6f2fe37ae3829e2e9b117933e8c7f2d9ed884414 Mon Sep 17 00:00:00 2001 From: j4rviscmd Date: Tue, 20 Jan 2026 17:23:13 +0900 Subject: [PATCH 1/2] docs: add manual postinstall setup instructions OpenCode does not execute npm postinstall scripts when installing plugins, so users need to manually run the postinstall command once after initial installation to copy slash command files. Co-Authored-By: Claude Opus 4.5 --- README.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index cfee610..bc8caba 100644 --- a/README.md +++ b/README.md @@ -40,8 +40,15 @@ Add the plugin to your `opencode.json`: } ``` -The following command files are automatically copied to -`~/.config/opencode/command/` on installation: +> [!CAUTION] +> **One-time setup required**: OpenCode does not execute npm postinstall scripts. +> Run this command once after initial installation to enable slash commands: +> +> ```bash +> cd ~/.cache/opencode/node_modules/opencode-agent-modes && node dist/postinstall.js +> ``` + +The following command files are copied to `~/.config/opencode/command/`: - `mode-performance.md` - `mode-economy.md` From bd73d639ec860c8a9a634a4ad3d1ec7db560b2b0 Mon Sep 17 00:00:00 2001 From: j4rviscmd Date: Tue, 20 Jan 2026 17:27:26 +0900 Subject: [PATCH 2/2] fix(ci): add --ignore-scripts to bun install postinstall requires dist/ which doesn't exist before build step. Co-Authored-By: Claude Opus 4.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 217abf0..9196320 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: bun-version: latest - name: Install - run: bun install --frozen-lockfile + run: bun install --frozen-lockfile --ignore-scripts - name: Lint run: bun run lint