fix: expose the CLI package version - #110
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe CLI adds a ChangesCLI version reporting
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant CLI as openbrain CLI
participant Reader as readCurrentVersion()
participant Package as installed package.json
CLI->>Reader: handle version, --version, or -V
Reader->>Package: read installed version
Package-->>Reader: return package version
Reader-->>CLI: print version and exit
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/cli.ts (1)
642-642: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDocument the supported version aliases.
The usage text lists
openbrain version, but it omitsopenbrain --versionandopenbrain -V. Add both aliases so users can discover every supported version form.Proposed usage update
openbrain version + openbrain --version + openbrain -V🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/cli.ts` at line 642, Update the usage text around the existing “openbrain version” entry in the CLI help to also list the supported “openbrain --version” and “openbrain -V” aliases, so all version invocation forms are documented.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@src/cli.ts`:
- Line 642: Update the usage text around the existing “openbrain version” entry
in the CLI help to also list the supported “openbrain --version” and “openbrain
-V” aliases, so all version invocation forms are documented.
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 4f1ff148-162d-4576-af7d-618d7a6455a2
📒 Files selected for processing (2)
src/cli.tstests/install-script.test.ts
Summary
openbrain version,openbrain --version, andopenbrain -VWhy
The CLI previously treated every version form as an unknown command and printed general help instead.
Testing
pnpm lintpnpm buildpnpm test(128 passed, 1 skipped)dist/cli.jsfor all three version formsSummary by CodeRabbit
New Features
versioncommand to display the installed application version.--versionand-Valiases for quick version checks.Bug Fixes