From 4117b6f1440f66a3b18c1fab822eb909f2caeb43 Mon Sep 17 00:00:00 2001 From: Laurent LAPORTE Date: Wed, 24 Apr 2024 10:31:21 +0200 Subject: [PATCH] feat(cli): start CLI implementation --- src/antares_web_installer/__main__.py | 14 ++++++++++++++ src/antares_web_installer/cli.py | 14 ++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 src/antares_web_installer/__main__.py create mode 100644 src/antares_web_installer/cli.py diff --git a/src/antares_web_installer/__main__.py b/src/antares_web_installer/__main__.py new file mode 100644 index 0000000..6077aae --- /dev/null +++ b/src/antares_web_installer/__main__.py @@ -0,0 +1,14 @@ +""" +Main entrypoint for the CLI application. +""" +import sys + +from antares_web_installer.cli import install_cli + + +def main(): + install_cli(sys.argv[1:]) + + +if __name__ == '__main__': + main() diff --git a/src/antares_web_installer/cli.py b/src/antares_web_installer/cli.py new file mode 100644 index 0000000..9b9c78c --- /dev/null +++ b/src/antares_web_installer/cli.py @@ -0,0 +1,14 @@ +import time + +import click + + +@click.command() +@click.argument('target_dir', type=click.Path()) +def install_cli(target_dir): + """ + Install Antares Web. + """ + print(f"Starting installation in directory: '{target_dir}'...") + time.sleep(1) + print("Installation complete!")