add dtc subcommand version #31

Merged
cmo merged 1 commit from version_subcommand into master 2026-02-09 21:25:10 +00:00

View file

@ -0,0 +1,15 @@
import importlib.metadata
import rich_click as click
from rich import print as rprint
subcommand_name = 'version'
@click.command(short_help='Show the version of `dtc`')
def cli():
"""Show the version of `dtc` and exit
"""
rprint(importlib.metadata.version('dump-things-pyclient'))
return 0