Start CLI
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
# archmgr
|
# archmgr
|
||||||
|
|
||||||
A nixos-like declarative config and package manager for Arch Linux (or any other distro, with some tweaks).
|
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)
|
||||||
|
|||||||
25
archmgr.py
25
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())
|
||||||
|
|||||||
Reference in New Issue
Block a user