diff --git a/README.md b/README.md index 35aa117..fc3944a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ # archmgr -A nixos-like declarative config and package manager for Arch Linux (or any other distro, with some tweaks). \ No newline at end of file +A nixos-like declarative config and package manager for Arch Linux (or any other distro, with some tweaks). + +See the [Wiki](https://git.janishutz.com/janishutz/archmgr/wiki) diff --git a/archmgr.py b/archmgr.py index e69de29..21179c4 100644 --- a/archmgr.py +++ b/archmgr.py @@ -0,0 +1,25 @@ +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())