feat: add --version flag to CLI (#94)

Print the current version when `agent-browser --version` is passed.

Co-authored-by: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Matthew King
2026-01-16 11:35:06 -06:00
committed by GitHub
co-authored by Claude Opus 4.5
parent 6abee37641
commit 7bdfcf8541
2 changed files with 17 additions and 6 deletions
+5
View File
@@ -1197,6 +1197,7 @@ Options:
--headed Show browser window (not headless)
--cdp <port> Connect via CDP (Chrome DevTools Protocol)
--debug Debug output
--version, -V Show version
Environment:
AGENT_BROWSER_SESSION Session name (default: "default")
@@ -1215,3 +1216,7 @@ Examples:
"#
);
}
pub fn print_version() {
println!("agent-browser {}", env!("CARGO_PKG_VERSION"));
}