Skip to content

feat; add version flag to agent - #1639

Merged
henrygd merged 9 commits into
henrygd:mainfrom
svenvg93:1638-add-version-agent-flags
Feb 6, 2026
Merged

henrygd merged 9 commits into
henrygd:mainfrom
svenvg93:1638-add-version-agent-flags

Conversation

@svenvg93

Copy link
Copy Markdown
Collaborator

📃 Description

Using flags for version information is more standard than subcommands. This change makes the version flag consistent with how --help/-h works and aligns with common CLI conventions where --version is a standard flag across most command-line tools.

./beszel-agent -h
Usage: ./beszel-agent [command] [flags]

Commands:
  health    Check if the agent is running
  update    Update to the latest version

Flags:
  -c, --china-mirrors   Use mirror for update (gh.beszel.dev) instead of GitHub
  -h, --help            Show this help message
  -k, --key string      Public key(s) for SSH authentication
  -l, --listen string   Address or port to listen on
  -t, --token string    Token to use for authentication
  -u, --url string      URL of the Beszel hub
  -v, --version         Show version information

Closes #1638

🪵 Changelog

➕ Added

  • Add -v and --version flags to display agent version
  • Refactor version handling to use pflag library for consistency with other flags like --help

🗑️ Removed

  • Removed the version subcommand

@svenvg93 svenvg93 changed the title feat; add version flag feat; add version flag to agent Jan 13, 2026
@henrygd

henrygd commented Jan 15, 2026

Copy link
Copy Markdown
Owner

Thank you Sven!

I'm good with removing the version subcommand, but let's wait until 0.19.0 to merge instead of removing it in a patch version.

@svenvg93
svenvg93 requested a review from henrygd as a code owner January 22, 2026 04:47
@henrygd
henrygd merged commit 221be1d into henrygd:main Feb 6, 2026
1 check passed
@svenvg93
svenvg93 deleted the 1638-add-version-agent-flags branch February 6, 2026 05:25
rizkyilhampra pushed a commit to rizkyilhampra/beszel that referenced this pull request Apr 14, 2026
xiaoran7 pushed a commit to xiaoran7/beszel that referenced this pull request Oct 17, 2026
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.

[Feature request ]: New -v --version flag

2 participants