Add read-only laptop doctor and trusted image recovery entrypoints

This commit is contained in:
Codex
2026-10-13 21:52:38 +03:00
parent 87003e92c6
commit 00aa0229cc
7 changed files with 471 additions and 11 deletions
+5
View File
@@ -21,6 +21,8 @@ def parser() -> argparse.ArgumentParser:
help='Distribution preferences for newly created profiles')
commands = cli.add_subparsers(dest='command')
commands.add_parser('menu', help='Open the terminal VM menu')
doctor = commands.add_parser('doctor', help='Read-only laptop hardware observations')
doctor.add_argument('--json', action='store_true', help='Print structured observations')
update = commands.add_parser('update', help='Signed runtime updates and rollback')
update.add_argument('update_args', nargs=argparse.REMAINDER)
download = commands.add_parser('download', help='Download and validate a direct ISO URL')
@@ -95,6 +97,9 @@ def main(argv: list[str] | None = None) -> int:
cli = parser()
args = cli.parse_args(argv)
try:
if args.command == 'doctor':
from .doctor import doctor_main
return doctor_main(['--json'] if args.json else [])
if args.command == 'update':
checkout = Path(__file__).resolve().parents[1]
if checkout == Path('/usr/lib/hydra'):