#18545 · @LanternCX · opened Mar 21, 2026 at 5:33 PM UTC · last updated Mar 21, 2026 at 5:35 PM UTC
feat(cli): add manual plugin update command
Score breakdown
Impact
Clarity
Urgency
Ease Of Review
Guidelines
Readiness
Size
Trust
Traction
Summary
This PR introduces a new opencode plugin update CLI command to allow users to manually refresh npm plugins declared in their configuration. The command classifies and handles various plugin specifier types, ensuring only updatable npm packages are refreshed. It includes new tests and documentation.
Description
Issue for this PR
Closes #18544
Type of change
- [ ] Bug fix
- [x] New feature
- [ ] Refactor / code improvement
- [x] Documentation
What does this PR do?
This PR adds a new opencode plugin update command so users can manually refresh npm plugins declared in config.
Changes included:
- Adds a
plugin updateCLI subcommand that classifies plugin specifiers and handles each category explicitly: updatable npm packages are updated, while pinned versions, localfile://entries, ignored plugins, and unsupported specifiers are skipped. - Adds test coverage for classification, successful updates, no-updatable-plugin cases, unchanged-version (
current) cases, and install-failure handling. - Updates CLI and plugin docs to describe how
opencode plugin updateworks and what it does not update.
This gives users a clear manual refresh path for plugin cache updates (without waiting for startup behavior) and provides explicit updated/current/skipped/failed results.
How did you verify your code works?
- Added and reviewed tests in
packages/opencode/test/cli/plugin-update.test.ts. - Ran the following checks locally in
packages/opencode:bun test test/cli/plugin-update.test.tsbun typecheck
- Results:
bun test test/cli/plugin-update.test.ts: 5 passed, 0 failedbun typecheck: passed
Screenshots / recordings
N/A (CLI and docs changes)
Checklist
- [x] I have tested my changes locally
- [x] I have not included unrelated changes in this PR
If you do not follow this template your PR will be automatically rejected.
Linked Issues
#18544 [FEATURE]: Add a manual `opencode plugin update` command
View issueComments
No comments.
Changed Files
packages/opencode/src/cli/cmd/plugin.ts
+189−0packages/opencode/src/index.ts
+2−0packages/opencode/test/cli/plugin-update.test.ts
+174−0packages/web/src/content/docs/cli.mdx
+24−0packages/web/src/content/docs/plugins.mdx
+12−0