Add init command and first-run guidance flow

This commit is contained in:
Thales Maciel 2026-02-26 17:43:38 -03:00
parent e262b26db7
commit 706d9e2da7
2 changed files with 38 additions and 0 deletions

View file

@ -470,6 +470,7 @@ def _init_command(args: argparse.Namespace) -> int:
def _run_command(args: argparse.Namespace) -> int:
global _LOCK_HANDLE
config_path = Path(args.config) if args.config else DEFAULT_CONFIG_PATH
config_existed_before_start = config_path.exists()
try:
cfg = load(str(config_path))
@ -489,6 +490,9 @@ def _run_command(args: argparse.Namespace) -> int:
str(config_path),
json.dumps(redacted_dict(cfg), indent=2),
)
if not config_existed_before_start and config_path.exists():
logging.info("created default config at %s", config_path)
logging.info("next step: run `aman doctor --config %s`", config_path)
logging.info(
"runtime: pid=%s session=%s display=%s wayland_display=%s verbose=%s dry_run=%s",
os.getpid(),