feat(cli): Better organized CLI arg parsing

This commit is contained in:
2026-05-14 17:36:06 +02:00
parent e24eb647ca
commit 78eecfc81a
13 changed files with 109 additions and 46 deletions
+21
View File
@@ -0,0 +1,21 @@
import argparse as ap
def add_parser(sp: ap._SubParsersAction[ap.ArgumentParser]):
config = sp.add_parser(
"config", help="prints information about your config and change some of them"
)
conf_sp = config.add_subparsers(title="config options", dest="conf", required=True)
conf_sp.add_parser("show", help="show config options")
config_update = conf_sp.add_parser(
"update", help="update the configuration from various"
)
conf_update_sp = config_update.add_subparsers(
title="Options for automatic configuration updates",
dest="conf_update",
required=True,
)
conf_update_sp.add_parser(
"pkgs",
help="Update the config to reflect the package state of the current system",
)