feat: improve external CLI version display in opencli list#570
Open
ByteYue wants to merge 4 commits intojackwener:mainfrom
Open
feat: improve external CLI version display in opencli list#570ByteYue wants to merge 4 commits intojackwener:mainfrom
ByteYue wants to merge 4 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>
This change adds: - Show installed version for both isolated and global external CLIs - Display installation type marker: (isolated) or (system) - Cache version detection results for 24h to avoid repeated --version calls - Include version and install type in JSON/YAML output formats - Automatic version detection from --version/-v output Output example: lark-cli v1.5.2 (isolated) — Lark/Feishu CLI with 200+ commands gh v2.40.0 (system) — GitHub CLI docker [auto-install] — Docker CLI 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
- Add external-cli-version-display.test.ts with 6 e2e tests covering: table format version/isolated display, JSON format version/installType fields, YAML format version display, lock file version caching, non-installed CLI display - Register new test file in vitest.config.ts
6e389f5 to
2d20cb4
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 improves version display for external CLIs in
opencli list. Depends on #568.Improvements
(isolated)for isolated installations,(system)for global installations--versioncalls--version/-voutputOutput example
New Files
tests/e2e/external-cli-version-display.test.ts— 6 e2e tests for version displayModified Files
src/external.ts— Added version detection, caching, andcollectListEntriessrc/cli.ts— Updatedopencli listoutput to include version informationvitest.config.ts— Registered new e2e test fileBug Fixes (from PR#3 merge)
installanduninstallcommands now properly setprocess.exitCode = 1on failure