feat: add isolated installation and version management for external CLIs#568
Open
ByteYue wants to merge 2 commits intojackwener:mainfrom
Open
feat: add isolated installation and version management for external CLIs#568ByteYue wants to merge 2 commits intojackwener:mainfrom
ByteYue wants to merge 2 commits intojackwener:mainfrom
Conversation
This change adds: - Isolated installation mode: install external CLIs to ~/.opencli/opt/ without polluting global - Version management: support multiple versions, switch between versions - Uninstall: cleanly uninstall isolated installations - New CLI commands: * opencli install <name> [--version <ver>] [--isolated] * opencli uninstall <name> [--version <ver>] * opencli switch <name> <version> - Backward compatible: global installation remains default Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…ment - Add external-cli-management.test.ts with 9 e2e tests covering: register, isolated install, version-specific install, switch, uninstall (specific version and all), and error cases - Fix install/uninstall commands to set process.exitCode on failure - Register new test file in vitest.config.ts
d2c571c to
5670eba
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This PR adds isolated installation and version management for external CLIs in opencli.
New Features
~/.opencli/opt/without polluting the global environmentopencli switch <name> <version>to quickly switch between versionsopencli uninstall <name>completely removes all filesNew CLI Commands
opencli install <name> --isolated [--version <ver>]— Install with optional isolation and versionopencli uninstall <name> [--version <ver>]— Uninstall isolated installationopencli switch <name> <version>— Switch active versionBug Fixes
installanduninstallcommands now properly setprocess.exitCode = 1on failureNew Files
src/external-store.ts— Lock file management for isolated installationstests/e2e/external-cli-management.test.ts— 9 e2e tests covering all new commandsModified Files
src/external.ts— Extended with isolated install, uninstall, switch logicsrc/cli.ts— Added new CLI commands, fixed exit code handlingvitest.config.ts— Registered new e2e test file