Skip to content

feat(cli): --version, -V, and version subcommand (closes #26)#27

Merged
tob-scott-a merged 1 commit intomainfrom
cli-version
Apr 24, 2026
Merged

feat(cli): --version, -V, and version subcommand (closes #26)#27
tob-scott-a merged 1 commit intomainfrom
cli-version

Conversation

@tob-scott-a
Copy link
Copy Markdown
Collaborator

As reported in #26, there was no way to discover the installed Trailmark version from the CLI. Adds three equivalent paths, all printing trailmark <version>:

  • trailmark --version
  • trailmark -V
  • trailmark version

The long/short flags use argparse's built-in action="version" which prints and exits with status 0. The subcommand form dispatches through main() and uses the same version string.

Also bumps version and pyproject.toml to 0.2.2 and refreshes the lockfile.

5 new tests in test_cli_parser.py cover each form end-to-end.

There was no way to discover the installed Trailmark version from the
CLI. Adds three equivalent paths, all printing `trailmark <version>`:

- `trailmark --version`
- `trailmark -V`
- `trailmark version`

The long/short flags use argparse's built-in action="version" which
prints and exits with status 0. The subcommand form dispatches through
main() and uses the same version string.

Also bumps __version__ and pyproject.toml to 0.2.2 and refreshes the
lockfile.

5 new tests in test_cli_parser.py cover each form end-to-end.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@tob-scott-a tob-scott-a merged commit 47cb85c into main Apr 24, 2026
13 checks passed
@tob-scott-a tob-scott-a deleted the cli-version branch April 24, 2026 00:56
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.

1 participant