diff --git a/ugit/cli.py b/ugit/cli.py index d0765a3..f79cc66 100644 --- a/ugit/cli.py +++ b/ugit/cli.py @@ -1,2 +1,22 @@ +import argparse + + def main(): + args = parse_args() + args.func(args) + + +def parse_args(): + parser = argparse.ArgumentParser() + + commands = parser.add_subparsers(dest="command") + commands.required = True + + init_parser = commands.add_parser("init") + init_parser.set_defaults(func=init) + + return parser.parse_args() + + +def init(args): print("Hello, World!")