summaryrefslogtreecommitdiff
path: root/gitlab/cli.py
diff options
context:
space:
mode:
Diffstat (limited to 'gitlab/cli.py')
-rw-r--r--gitlab/cli.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/gitlab/cli.py b/gitlab/cli.py
index 7843423..7fa176c 100644
--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -240,8 +240,14 @@ def do_project_owned(gl, what, args):
def main():
+ if "--version" in sys.argv:
+ print(gitlab.__version__)
+ exit(0)
+
parser = argparse.ArgumentParser(
description="GitLab API Command Line Interface")
+ parser.add_argument("--version", help="Display the version.",
+ action="store_true")
parser.add_argument("-v", "--verbose", "--fancy",
help="Verbose mode",
action="store_true")