Add command to print version info
MODIFY
plex_trakt_sync/cli.py
plex_trakt_sync/cli.py
from plex_trakt_sync.commands.sync import sync
from plex_trakt_sync.commands.trakt_login import trakt_login
from plex_trakt_sync.commands.unmatched import unmatched
+from plex_trakt_sync.commands.version import version
from plex_trakt_sync.commands.watch import watch
from plex_trakt_sync.commands.webhook import webhook
@@ -30,5 +31,6 @@ def cli(ctx):
cli.add_command(sync)
cli.add_command(trakt_login)
cli.add_command(unmatched)
+cli.add_command(version)
cli.add_command(watch)
cli.add_command(webhook)

ADD
plex_trakt_sync/commands/version.py
+import sys
+
+import click
+from trakt import __version__ as TRAKT_API_VERSION
+from plexapi import VERSION as PLEX_API_VERSION
+
+from plex_trakt_sync.version import git_version_info
+
+
+@click.command()
+def version():
+ """
+ Print application and environment version info
+ """
+
+ git_version = git_version_info()
+ if git_version:
+ print(f"PlexTraktSync Git Version: [{git_version}]")
+
+ print(f"Python Version: {sys.version}")
+ print(f"Plex API Version: {PLEX_API_VERSION}")
+ print(f"Trakt API Version: {TRAKT_API_VERSION}")

Add command to print version info