oracletrace icon indicating copy to clipboard operation
oracletrace copied to clipboard

[Feature]: Add --version flag to CLI

Open KaykCaputo opened this issue 7 months ago • 2 comments

Summary

Add a --version flag to the oracletrace CLI so users can quickly report the installed version when opening issues or debugging.

Problem

When troubleshooting unexpected output or CI failures, it's hard to confirm which OracleTrace version is being used. There is currently no standard --version option, which creates friction for support and bug reports.

Proposed Solution

Implement a CLI flag that prints the package version and exits successfully.

  • Command: oracletrace --version
  • Output: oracletrace x.y.z
  • Should not require a target script and should not run any tracing logic.
  • (Optional) also support -V as an alias.

Use Case

A contributor wants to open a bug report and include the exact OracleTrace version, or a maintainer wants to quickly confirm which version is installed in a CI environment.

Example (optional)

oracletrace --version
oracletrace 2.0.1

Alternatives Considered

  • Relying on pip show oracletrace (slower, not always available in minimal environments).
  • Printing the version as part of --help output (less discoverable and harder to parse).

Additional Context

Implementation hint: use importlib.metadata.version("oracletrace") (Python 3.10+) and wire the flag in oracletrace/cli.py. Add a small pytest test to validate output and exit code.

Checklist

  • [ x] I searched existing issues before opening this request
  • [ x] I described the problem and why this feature is useful
  • [ x] I provided enough detail for implementation

KaykCaputo avatar Apr 17 '26 02:04 KaykCaputo

I am about to open a pr for this

waldo121 avatar Apr 29 '26 13:04 waldo121

Very nice

KaykCaputo avatar Apr 29 '26 13:04 KaykCaputo