Skip to content

Add --version flag to aegisflow binary #76

@saivedant169

Description

@saivedant169

Problem

Running ./bin/aegisflow --version currently prints nothing useful. The version constant lives inside cmd/aegisflow/main.go but there is no CLI flag to surface it.

Users need a way to check what version they are running without grepping logs or reading the binary.

Acceptance criteria

  • Adding --version to the aegisflow command prints the version string and exits 0
  • Adding -v as a shorthand also works
  • Output format: aegisflow v0.5.0
  • Works before any config file is loaded (no config required)
  • A unit test covers it in cmd/aegisflow/main_test.go (or a new file if one does not exist)

Files to touch

  • cmd/aegisflow/main.go (the version constant is already there)
  • A new test file if needed

How to test locally

make build
./bin/aegisflow --version
# Expected: aegisflow v0.5.0

./bin/aegisflow -v
# Expected: aegisflow v0.5.0

Notes

Keep it simple. No cobra/cli library unless we already use one. Use the standard flag package.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions