"""Create a human panel administrator without ever printing the password.""" import getpass from central.app.db import SessionLocal from central.app.human_auth import create_admin def main(): username = input("Admin username: ").strip() password = getpass.getpass("Admin password: ") confirmation = getpass.getpass("Confirm password: ") if password != confirmation: raise SystemExit("passwords do not match") with SessionLocal() as session: admin = create_admin(session, username, password) print(f"created admin {admin.username}") if __name__ == "__main__": main()