Skip to content

Add CLI flag to print City2TABULA version (--version / -v) #17

@jravani

Description

@jravani

Description

City2TABULA should expose a simple CLI command to print the current software version so users can include it when reporting bugs/issues.

Motivation

When users open issues, version information is often missing or wrong. A dedicated version flag makes reporting and support faster, and it’s standard behaviour for CLI tools.

Proposed behaviour

Support both of these:

  • ./city2tabula --version
  • ./city2tabula -v

Output

Print only the version string to stdout:

  • v0.5.0-alpha

(Optionally with a trailing newline, as usual.)

Exit code

  • Exit with code 0 after printing the version.
  • Do not run any other logic (no config loading, no DB calls, no side effects).

Acceptance criteria

  • city2tabula --version prints the current version and exits 0
  • city2tabula -v prints the current version and exits 0
  • Output matches exactly the version string (e.g., v0.5.0-alpha)
  • Works even if required env vars/config are missing
  • Included in --help output (if help exists)

Notes / implementation hint

Ideally the version is injected at build time (e.g., from git tag) so releases don’t require manual edits, but a static constant is acceptable as a first step.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions