Skip to content

Conversation

@HeikoWasTaken
Copy link
Contributor

@HeikoWasTaken HeikoWasTaken commented Aug 26, 2025

Summary

This PR adds version arguments (-v and --version ) to TagStudio's main entrypoint.
Version information is formatted as follows: TagStudio v{VERSION} {VERSION_BRANCH}

Examples:

## With TS 9.5.3 on main branch
$ tagstudio --version
TagStudio v9.5.3
## With TS 9.5.4 on a pre-release branch
$ tagstudio --version
TagStudio v9.5.4 Pre-Release

Seeing as this is only a small change, I've opted to open this PR without prior discussion.

Tasks Completed

  • Platforms Tested:
    • Windows x86
    • Windows ARM
    • macOS x86
    • macOS ARM
    • Linux x86
    • Linux ARM
  • Tested For:
    • Basic functionality
    • PyInstaller executable

@HeikoWasTaken
Copy link
Contributor Author

One caveat. Due to the way logging and argument parsing is set up, some logging info is printed just before the version is displayed. Hiding those logs specifically when tagstudio --version is invoked would require considerably more refactoring, and is out of the scope of this PR.

So the output of running tagstudio --version looks more like this in reality:

$ tagstudio --version
2025-08-26 04:22:52 [info     ] [FFmpeg] Using FFprobe location: ffprobe (Found)
2025-08-26 04:22:52 [info     ] [FFmpeg] Using FFmpeg location: ffmpeg (Found)
2025-08-26 04:22:52 [info     ] [ResourceManager] Resources Registered: count=34
TagStudio v9.5.3

@CyanVoxel CyanVoxel added Type: Enhancement New feature or request Type: Installation Installing, building, and/or launching the program Type: QoL A quality of life (QoL) enhancement or suggestion labels Aug 26, 2025
@CyanVoxel CyanVoxel added this to the Alpha v9.5.4 milestone Aug 26, 2025
@CyanVoxel CyanVoxel moved this to 👀 In review in TagStudio Development Aug 26, 2025
@xarvex
Copy link
Member

xarvex commented Aug 26, 2025

The quirks with the logging executing before the arguments are parsed is due to something firing off the moment it is imported, and something I am addressing now after pulling this PR locally and testing. In terms of what you've done here, this is all good and mergeable. Thanks for the PR!

@xarvex xarvex merged commit 02a5689 into TagStudioDev:main Aug 26, 2025
5 checks passed
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in TagStudio Development Aug 26, 2025
@HeikoWasTaken HeikoWasTaken deleted the feat-cli-version-arg branch August 26, 2025 03:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Type: Enhancement New feature or request Type: Installation Installing, building, and/or launching the program Type: QoL A quality of life (QoL) enhancement or suggestion

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

3 participants