Files
archmgr/archmgr.py
2026-02-02 16:52:17 +01:00

26 lines
981 B
Python

import argparse
ap = argparse.ArgumentParser(
"archmgr",
description="A nixos-like declarative config and package manager for Arch Linux (or any other cdistro, with some tweaks)",
usage="archmgr [command] [options]",
)
ap.add_argument("--version", "-v", action="version", version="%(prog)s V0.0.1")
sp = ap.add_subparsers(
title="Commands",
metavar="Use 'archmgr [command] --help' to see help for each command",
dest="cmd"
)
# Apply subcommand
commit = sp.add_parser("commit", help="apply pending changes and commit to git repo")
commit.add_argument("--force", "-f", help="force apply", action="store_true")
commit.add_argument(
"--dry-run", "-d", help="print out files that would be changed", action="store_true"
)
push = sp.add_parser("push", help="push pending changes to git remote")
pull = sp.add_parser("pull", help="pull changes from git remote")
init = sp.add_parser("init", help="initialize a new archmgr repository")
print(ap.parse_args())