#!/usr/bin/env python3 """ Install all 19 soul seeds into their own dedicated Engram instances. Runs install_soul.py logic sequentially to avoid port conflicts. Updates registry.json with engram_db_path, engram_port, engram_url, engram_api_key, and engram_root_id for each soul. Usage: python3 install_all.py # skip souls whose data dir exists with root_id python3 install_all.py --force # reinstall all (destructive) python3 install_all.py --only richard-feynman # single soul """ import argparse import sys from pathlib import Path sys.path.insert(0, str(Path(__file__).parent)) from install_soul import install_soul SOULS = [ "bobby-anderson", "alan-turing", "albert-einstein", "nikola-tesla", "leonardo-da-vinci", "richard-feynman", "carl-sagan", "rene-descartes", "robin-williams", "frederick-douglass", "marcus-aurelius", "friedrich-nietzsche", "james-baldwin", "ada-lovelace", "harriet-tubman", "virginia-woolf", "hedy-lamarr", "marie-curie", "helen-keller", ] def main(): parser = argparse.ArgumentParser( description="Install all 19 soul seeds into dedicated Engram instances" ) parser.add_argument( "--force", action="store_true", help="Reinstall all souls even if already installed", ) parser.add_argument( "--only", metavar="SLUG", help="Install only this slug", ) args = parser.parse_args() souls_to_install = [args.only] if args.only else SOULS results = [] for slug in souls_to_install: print(f"\n{'=' * 60}") print(f"Soul: {slug}") print("=" * 60) try: result = install_soul(slug, force=args.force) results.append({"slug": slug, "success": True, **result}) except Exception as exc: import traceback traceback.print_exc() results.append({"slug": slug, "success": False, "error": str(exc)}) print(f"\n{'=' * 60}") print("SUMMARY") print("=" * 60) ok = [r for r in results if r["success"] and not r.get("skipped")] skipped = [r for r in results if r.get("skipped")] failed = [r for r in results if not r["success"]] for r in ok: print(f" [OK] {r['slug']} root={r.get('root_id', '?')}") for r in skipped: print(f" [SKIP] {r['slug']} (already installed)") for r in failed: print(f" [FAILED] {r['slug']} error={r.get('error', '?')}") print(f"\nInstalled: {len(ok)} Skipped: {len(skipped)} Failed: {len(failed)}") if failed: sys.exit(1) if __name__ == "__main__": main()