Skip to content

Commit 160dd1a

Browse files
authored
add --version command
1 parent 489cf3c commit 160dd1a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

kgl/cli.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import os
33
import json
44
from .graph import KnowledgeGraph
5+
from . import __version__
56

67
# Create ~/.cache/kgl if it doesn't exist
78
if not os.path.exists(os.path.expanduser("~/.cache/kgl")):
@@ -18,6 +19,7 @@ def set_current(graph):
1819
json.dump(graph, f)
1920

2021
@click.group()
22+
@click.version_option(version=__version__)
2123
def cli():
2224
pass
2325

0 commit comments

Comments
 (0)