docs(RMGR-WP-0001): complete T04 implementation foundation
Accept ADR-001: Python 3.12, FastAPI, Postgres/SQLAlchemy async, src layout, uv/hatchling, pytest. Scaffold package, rmgr CLI stub, and version tests.
This commit is contained in:
parent
3fa8d0b4c4
commit
e02f5a258a
9 changed files with 342 additions and 7 deletions
51
src/repo_manager/cli.py
Normal file
51
src/repo_manager/cli.py
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
"""CLI entry point ``rmgr`` (skeleton — commands land with extract phases)."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
|
||||
|
||||
def main(argv: list[str] | None = None) -> int:
|
||||
parser = argparse.ArgumentParser(
|
||||
prog="rmgr",
|
||||
description="Repo Manager CLI (helixforge.repo-manager)",
|
||||
)
|
||||
parser.add_argument(
|
||||
"--version",
|
||||
action="store_true",
|
||||
help="Print package version and exit",
|
||||
)
|
||||
sub = parser.add_subparsers(dest="command")
|
||||
|
||||
sub.add_parser("version", help="Print version")
|
||||
|
||||
# Placeholders — implemented as extraction phases land (RMGR-WP-0001-T05+).
|
||||
p_rec = sub.add_parser(
|
||||
"reconcile",
|
||||
help="Run consistency reconcile (not yet implemented)",
|
||||
)
|
||||
p_rec.add_argument("--path", default=".", help="Repository checkout path")
|
||||
p_rec.add_argument("--fix", action="store_true", help="Apply safe fixes")
|
||||
|
||||
args = parser.parse_args(argv)
|
||||
if args.version or args.command in (None, "version"):
|
||||
from repo_manager import __version__
|
||||
|
||||
print(__version__)
|
||||
return 0
|
||||
|
||||
if args.command == "reconcile":
|
||||
print(
|
||||
"rmgr reconcile: not implemented yet "
|
||||
"(see docs/adr-001-implementation-foundation.md, phase P0)",
|
||||
file=sys.stderr,
|
||||
)
|
||||
return 2
|
||||
|
||||
parser.print_help()
|
||||
return 0
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
raise SystemExit(main())
|
||||
Loading…
Add table
Add a link
Reference in a new issue