Skip to content

feat: add version flag to CLI entry points#53

Merged
Hell1213 merged 1 commit into
Hell1213:mainfrom
Jiya3177:feat/version-flag-cli-25
Jun 1, 2026
Merged

feat: add version flag to CLI entry points#53
Hell1213 merged 1 commit into
Hell1213:mainfrom
Jiya3177:feat/version-flag-cli-25

Conversation

@Jiya3177

Copy link
Copy Markdown

Summary

Add --version support to both CLI entry points.

Related Issue

Fixes #25

Type of Change

  • Bug fix
  • New feature
  • Documentation
  • Refactoring
  • Test changes
  • CI/Chore

Testing

  • uv run ruff check passes
  • uv run mypy passes
  • uv run pytest passes
  • Manual testing done

Manual testing:

  • PYTHONPATH=src python3 -m pytest tests/cli/test_new_cli.py::test_typer_app_version_option tests/cli/test_oss_commands.py::test_main_version_option
  • python3 -m ruff check main.py src/oss_dev/cli/app.py tests/cli/test_new_cli.py tests/cli/test_oss_commands.py

Note: Running the broader CLI test file still shows unrelated existing environment/config failures around missing Gemini API key.

Description

Added Click --version / -V support to the top-level oss-dev CLI using the shared version string from src/oss_dev/_version.py.

Verified the Typer oss-dev-new CLI already uses the same shared version string and added test coverage for it.

Both entry points now print:

oss-dev v0.2.0

and exit cleanly without requiring config or API keys.

@Hell1213 Hell1213 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review: version flag for CLI entry points

Hi @Jiya3177, this looks good.

Verified:

  • Tests pass (74/74, including 2 new version tests)
  • Ruff checks clean
  • No circular import risk (oss_dev._version is a standalone module)

Changes look correct:

  • oss-dev --version prints oss-dev v0.2.0 via Click version_option
  • oss-dev-new --version works via Typer callback (already existed)
  • Both use shared version from oss_dev._version

Approving this PR.

@Hell1213 Hell1213 merged commit 6c62fe1 into Hell1213:main Jun 1, 2026
@Jiya3177 Jiya3177 deleted the feat/version-flag-cli-25 branch June 1, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add --version flag to both CLI entry points

2 participants