Skip to content

refactor(cli): add --version and -V flags to CLI#44

Merged
thymikee merged 1 commit into
callstack:mainfrom
XiaoPengYouCode:feat/version-flag
Feb 11, 2026
Merged

refactor(cli): add --version and -V flags to CLI#44
thymikee merged 1 commit into
callstack:mainfrom
XiaoPengYouCode:feat/version-flag

Conversation

@XiaoPengYouCode

@XiaoPengYouCode XiaoPengYouCode commented Feb 11, 2026

Copy link
Copy Markdown
Contributor

Summary

This PR adds CLI version flags (--version, -V) and makes version lookup consistent across source and dist execution paths.

What changed

  • Added --version / -V parsing and help/README docs.
  • Introduced shared helper src/utils/version.ts for:
    • readVersion()
    • findProjectRoot()
  • Reused the helper in cli, daemon, and daemon-client to remove duplicated logic.
  • Added smoke coverage for both --version and -V.

Usage

$ agent-device --version
0.3.0

$ agent-device -V
0.3.0

Closes #43

@XiaoPengYouCode XiaoPengYouCode force-pushed the feat/version-flag branch 2 times, most recently from 14016b8 to 7769677 Compare February 11, 2026 11:58
@XiaoPengYouCode XiaoPengYouCode changed the title feat: add --version and -V flags to CLI refactor(cli): add --version and -V flags to CLI Feb 11, 2026
@XiaoPengYouCode XiaoPengYouCode marked this pull request as ready for review February 11, 2026 12:50

@thymikee thymikee left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@thymikee thymikee merged commit 31a639a into callstack:main Feb 11, 2026
5 of 6 checks passed
@XiaoPengYouCode XiaoPengYouCode deleted the feat/version-flag branch February 12, 2026 04:29
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.

Proposal: Add --version / -V and typo suggestions for CLI flags

2 participants