[PR #134] [MERGED] [cli] Add a --version flag #137

Closed
opened 2026-10-13 19:47:51 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/134
Author: @Glitchy-Sheep
Created: 8/9/2026
Status: ✅ Merged
Merged: 8/9/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: fix/version-flag


📝 Commits (1)

  • 99e812c feat: ✨ --version flag shows the installed version

📊 Changes

2 files changed (+23 additions, -1 deletions)

View changed files

📝 CHANGELOG.md (+1 -0)
📝 boosty_downloader/main.py (+22 -1)

📄 Description

Summary

boosty-downloader --version used to answer "No such option" - the app knew its version (the update checker uses it) but never showed it to the user. Now --version / -V prints the installed version and exits before any other work: no config read, no network.

How it works

  • An eager typer option on the root callback - the canonical pattern from the typer docs
  • The version comes from the installed package metadata, the same source the update checker reads
  • Works even with garbage in the other arguments: the flag is processed first

Tests

  • Verified live: --version and -V print the version instantly, with and without a config present

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Glitchy-Sheep/boosty-downloader/pull/134 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 8/9/2026 **Status:** ✅ Merged **Merged:** 8/9/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `fix/version-flag` --- ### 📝 Commits (1) - [`99e812c`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/99e812c399b5fcc7f8a1904f252418ee352652cd) feat: :sparkles: --version flag shows the installed version ### 📊 Changes **2 files changed** (+23 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `CHANGELOG.md` (+1 -0) 📝 `boosty_downloader/main.py` (+22 -1) </details> ### 📄 Description ## Summary `boosty-downloader --version` used to answer "No such option" - the app knew its version (the update checker uses it) but never showed it to the user. Now `--version` / `-V` prints the installed version and exits before any other work: no config read, no network. ## How it works - An eager typer option on the root callback - the canonical pattern from the typer docs - The version comes from the installed package metadata, the same source the update checker reads - Works even with garbage in the other arguments: the flag is processed first ## Tests - Verified live: `--version` and `-V` print the version instantly, with and without a config present --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-13 19:47:51 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Glitchy-Sheep/boosty-downloader#137
No description provided.