Skip to content

feat(plugin): add update command, hot reload after install, README section#307

Merged
jackwener merged 1 commit intomainfrom
feat/plugin-update-hotreload
Mar 23, 2026
Merged

feat(plugin): add update command, hot reload after install, README section#307
jackwener merged 1 commit intomainfrom
feat/plugin-update-hotreload

Conversation

@jackwener
Copy link
Copy Markdown
Owner

Changes

  • plugin update — New opencli plugin update <name> command that runs git pull --ff-only + post-install lifecycle (npm install → host symlink → TS transpile)
  • Hot reload — After plugin install and plugin update, commands are immediately available without restarting opencli (discoverPlugins() called inline)
  • README — Added Plugins section to both README.md and README.zh-CN.md with quick start commands and community plugins table
  • Refactor — Extracted shared postInstallLifecycle() helper to deduplicate install/update code

Tests

All 19 existing + new tests pass:

  • parseSource (5 tests)
  • listPlugins (2 tests)
  • uninstallPlugin (2 tests)
  • updatePlugin (1 test — error path for non-existent plugin)
  • discoverPlugins (2 tests)
  • executeCommand (5 tests)
  • discoverClis (2 tests)

…ction

- Add `opencli plugin update <name>` command (git pull + post-install lifecycle)
- Extract shared postInstallLifecycle() helper to deduplicate install/update code
- Hot reload: call discoverPlugins() after install/update (no restart needed)
- Add Plugins section to README.md and README.zh-CN.md
- Add updatePlugin test coverage
@jackwener jackwener merged commit 966f6e5 into main Mar 23, 2026
9 of 10 checks passed
@jackwener jackwener deleted the feat/plugin-update-hotreload branch March 23, 2026 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant