Skip to content

Commit

Permalink
add version cli command
Browse files Browse the repository at this point in the history
  • Loading branch information
miaucl committed Sep 8, 2024
1 parent 6dd30b6 commit c414065
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions systemctl2mqtt/systemctl2mqtt.py
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,9 @@ def main() -> None:
"""
parser = argparse.ArgumentParser()
parser.add_argument(
"--version", action="version", version=f"%(prog)s {__VERSION__}"
)
parser.add_argument(
"--name",
default=socket.gethostname(),
Expand All @@ -1049,6 +1052,7 @@ def main() -> None:
parser.add_argument(
"--port",
default=MQTT_PORT_DEFAULT,
type=int,
help="Port or IP address of the MQTT broker (default: 1883)",
)
parser.add_argument(
Expand Down

0 comments on commit c414065

Please sign in to comment.