[PR #101] [MERGED] Auth helper and UX/UI restructure (subcommands instead of flags) #110

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

📋 Pull Request Information

Original PR: https://github.com/Glitchy-Sheep/boosty-downloader/pull/101
Author: @Glitchy-Sheep
Created: 4/12/2026
Status: ✅ Merged
Merged: 4/12/2026
Merged by: @Glitchy-Sheep

Base: main ← Head: feat/refactor-commands-structure


📝 Commits (3)

  • 5abeac6 Add auth helper script as show-auth-script subcommand
  • 729f7a7 Split CLI into subcommands with per-command modules
  • deac5eb Fix ci for CHANGELOG.md checks and update README.md

📊 Changes

18 files changed (+747 additions, -324 deletions)

View changed files

📝 .github/workflows/ci.yaml (+4 -3)
📝 CHANGELOG.md (+3 -0)
📝 Makefile (+4 -0)
📝 README.md (+14 -2)
📝 boosty_downloader/main.py (+22 -296)
📝 boosty_downloader/src/application/di/app_environment.py (+1 -1)
➕ boosty_downloader/src/application/di/initialized_app.py (+100 -0)
➕ boosty_downloader/src/cli/boosty_token_viewer.py (+144 -0)
📝 boosty_downloader/src/cli/cli_options.py (+0 -20)
➕ boosty_downloader/src/cli/commands/__init__.py (+0 -0)
➕ boosty_downloader/src/cli/commands/check.py (+69 -0)
➕ boosty_downloader/src/cli/commands/clean_cache.py (+64 -0)
➕ boosty_downloader/src/cli/commands/download.py (+189 -0)
➕ boosty_downloader/src/cli/commands/show_auth_script.py (+22 -0)
📝 poetry.lock (+13 -1)
📝 pyproject.toml (+1 -0)
📝 ruff.toml (+11 -1)
➕ scripts/build_install.py (+86 -0)

📄 Description

📝 Summary

New show-auth-script subcommand that outputs a JS snippet for extracting Boosty auth credentials from the browser console. Copies to clipboard automatically via pyperclip.

CLI restructured into subcommands: download, check, clean-cache, show-auth-script - each in its own module under cli/commands/. This is a breaking change:

# Before
boosty-downloader --username author
boosty-downloader --username author --only-check-total
boosty-downloader --username author --clean-cache

# After
boosty-downloader download --username author
boosty-downloader check --username author
boosty-downloader clean-cache --username author
boosty-downloader show-auth-script

Why this is better: the flow of each command is independent and clean, and the user is focused on the task instead of combination of flags.

main.py reduced from ~380 to ~80 lines. Initialization logic extracted to application/di/initialized_app.py. clean-cache works directly with SQLitePostCache without creating an HTTP session.

Added make build-install for quick global install testing.

✅ Checklist

  • Locally tested (make test)
  • CI checks pass (make ci-check)
  • Added a line to ## Unreleased section in CHANGELOG.md describing the change (or added ci/skip-changelog label if not user-facing)

🔄 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/101 **Author:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Created:** 4/12/2026 **Status:** ✅ Merged **Merged:** 4/12/2026 **Merged by:** [@Glitchy-Sheep](https://github.com/Glitchy-Sheep) **Base:** `main` ← **Head:** `feat/refactor-commands-structure` --- ### 📝 Commits (3) - [`5abeac6`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/5abeac6deeca0c242baf13828f74b0c77744cb8b) Add auth helper script as `show-auth-script` subcommand - [`729f7a7`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/729f7a71545e91c560dd9b5c0003da24692aceda) Split CLI into subcommands with per-command modules - [`deac5eb`](https://github.com/Glitchy-Sheep/boosty-downloader/commit/deac5ebaa5302794453e70cfdd1dec79db09f3a6) Fix ci for CHANGELOG.md checks and update README.md ### 📊 Changes **18 files changed** (+747 additions, -324 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/ci.yaml` (+4 -3) 📝 `CHANGELOG.md` (+3 -0) 📝 `Makefile` (+4 -0) 📝 `README.md` (+14 -2) 📝 `boosty_downloader/main.py` (+22 -296) 📝 `boosty_downloader/src/application/di/app_environment.py` (+1 -1) ➕ `boosty_downloader/src/application/di/initialized_app.py` (+100 -0) ➕ `boosty_downloader/src/cli/boosty_token_viewer.py` (+144 -0) 📝 `boosty_downloader/src/cli/cli_options.py` (+0 -20) ➕ `boosty_downloader/src/cli/commands/__init__.py` (+0 -0) ➕ `boosty_downloader/src/cli/commands/check.py` (+69 -0) ➕ `boosty_downloader/src/cli/commands/clean_cache.py` (+64 -0) ➕ `boosty_downloader/src/cli/commands/download.py` (+189 -0) ➕ `boosty_downloader/src/cli/commands/show_auth_script.py` (+22 -0) 📝 `poetry.lock` (+13 -1) 📝 `pyproject.toml` (+1 -0) 📝 `ruff.toml` (+11 -1) ➕ `scripts/build_install.py` (+86 -0) </details> ### 📄 Description ## 📝 Summary **New `show-auth-script` subcommand** that outputs a JS snippet for extracting Boosty auth credentials from the browser console. Copies to clipboard automatically via pyperclip. **CLI restructured into subcommands**: `download`, `check`, `clean-cache`, `show-auth-script` - each in its own module under `cli/commands/`. This is a breaking change: ```bash # Before boosty-downloader --username author boosty-downloader --username author --only-check-total boosty-downloader --username author --clean-cache # After boosty-downloader download --username author boosty-downloader check --username author boosty-downloader clean-cache --username author boosty-downloader show-auth-script ``` Why this is better: the flow of each command is independent and clean, and the user is focused on the task instead of combination of flags. `main.py` reduced from ~380 to ~80 lines. Initialization logic extracted to `application/di/initialized_app.py`. `clean-cache` works directly with SQLitePostCache without creating an HTTP session. Added `make build-install` for quick global install testing. ## 🎯 Related Issue ## ✅ Checklist - [x] Locally tested (`make test`) - [x] CI checks pass (`make ci-check`) - [x] Added a line to `## Unreleased` section in CHANGELOG.md describing the change (or added `ci/skip-changelog` label if not user-facing) --- <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:25 +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#110
No description provided.