Skip to content

feat(cli): Add --version flag support - #220

Merged
edenreich merged 1 commit into
mainfrom
feature/add-version-flag
Nov 21, 2025
Merged

edenreich merged 1 commit into
mainfrom
feature/add-version-flag

Conversation

@edenreich

Copy link
Copy Markdown
Contributor

Summary

  • Add support for --version flag to match standard CLI conventions
  • Both infer --version and infer version now work identically

Changes

  • Added --version flag definition in root command initialization
  • Added version flag check in root command's Run function to invoke version subcommand

Test Plan

  • Build and install binary using task install
  • Verify infer --version displays version information
  • Verify infer version still works as before
  • Pre-commit hooks passed (formatting, linting)

Motivation

Previously, users expecting standard CLI behavior with --version would get an "unknown flag" error. This change improves UX by supporting the conventional --version flag alongside the existing version subcommand.

🤖 Generated with Claude Code

Add support for --version flag to match standard CLI conventions.
Previously only 'infer version' subcommand was available, now both
'infer --version' and 'infer version' work identically.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <[email protected]>
@edenreich
edenreich merged commit 21dd893 into main Nov 21, 2025
@edenreich
edenreich deleted the feature/add-version-flag branch November 21, 2025 14:55
inference-gateway-releaser Bot pushed a commit that referenced this pull request Nov 21, 2025
## [0.58.0](v0.57.1...v0.58.0) (2025-11-21)

### 🚀 Features

* **cli:** Add --version flag support ([#220](#220)) ([21dd893](21dd893))

### ♻️ Code Refactoring

* **ui:** Remove GetWidth from Theme interface ([#222](#222)) ([893e5f8](893e5f8))
* Update config structure and handling ([#221](#221)) ([22d9096](22d9096))
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.58.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant