{"id":47906675,"url":"https://github.com/c-ehrlich/micropolis","last_synced_at":"2026-04-04T04:54:02.912Z","repository":{"id":336181254,"uuid":"1148570079","full_name":"c-ehrlich/micropolis","owner":"c-ehrlich","description":null,"archived":false,"fork":false,"pushed_at":"2026-02-18T12:16:25.000Z","size":22236,"stargazers_count":24,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-04T04:53:54.022Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://micropolis.vercel.app","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/c-ehrlich.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2026-02-03T05:36:54.000Z","updated_at":"2026-02-27T12:34:15.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/c-ehrlich/micropolis","commit_stats":null,"previous_names":["c-ehrlich/micropolis"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/c-ehrlich/micropolis","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fmicropolis","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fmicropolis/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fmicropolis/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fmicropolis/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/c-ehrlich","download_url":"https://codeload.github.com/c-ehrlich/micropolis/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/c-ehrlich%2Fmicropolis/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31388169,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T04:26:24.776Z","status":"ssl_error","status_checked_at":"2026-04-04T04:23:34.147Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-04T04:54:00.446Z","updated_at":"2026-04-04T04:54:02.897Z","avatar_url":"https://github.com/c-ehrlich.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Micropolis (TypeScript port with gpt-5.3-codex)\n\n![Micropolis Screenshot](_readme/micropolis-screenshot.png)\n\nThe SimCity (1989) codebase was open sourced by EA under the name \"Micropolis\" as part of the OLPC (One Laptop Per Child) project. It's a C codebase, but large parts of it were ported from Assembly.\n\nI wanted to push how long I can run the current generation of LLMs unattended if they are working with a clear spec and verifiable tasks, so I decided to port it to TypeScript and make it run in the browser.\n\nI used exclusively `gpt-5.3-codex` with thinking set to high. After 4 days of work (most of it just letting Codex run unattended), this is what I ended up with.\n\nMy main innovation was creating a harness that calls the C code and uses `fast-check` to assert that my code behaves the same as the source for arbitray input, allowing the model to work unattended until it reaches a complete solution.\n\nSurprisingly this got a lot of attention on Twitter, including\n\n- Garry Tan - https://x.com/garrytan/status/2021241956806922370\n- Greg Brockman - https://x.com/gdb/status/2021272681237361027\n- Sriram Krishnan - https://x.com/sriramk/status/2021268764923244550\n\nSo I decided to publish the codebase.\n\nOriginally my goal was to port the game and then make it multiplayer (humans and LLMs) as a fun/art project. I might still do that in the future, but I'll freeze this codebase as a reference. PRs likely won't be accepted.\n\n## Requirements\n- Node.js \u003e= 24\n- pnpm \u003e= 10.28 (Corepack recommended)\n\n## Getting started\n```bash\ncorepack enable\npnpm install\npnpm dev\n```\n\n## Workspace layout\n- `apps/web`: Vite + React app using TanStack Router (file-based routes live in `src/routes`)\n- `packages`: Ports of the core Micropolis engine, tiles, harness, etc\n\n## Common commands\n```bash\npnpm dev\npnpm build\npnpm lint\npnpm typecheck\npnpm test\npnpm format\n```\n\n## Autonomous task orchestration\nThe repo includes a Codex-driven orchestrator at `scripts/auto-orchestrator.mjs`. I change it for each long-running task, so it just contains whatever made sense for the last iteration.\n\nInspect queue + drift:\n```bash\npnpm auto:queue\npnpm auto:drift\n```\n\nRun unattended (default runtime cap: 24 hours):\n```bash\npnpm auto:run -- --max-runtime-minutes 1440\n```\n\nUseful flags:\n- `--once`: complete exactly one task and stop.\n- `--dry-run`: plan/selection only; no git push or PR changes.\n- `--streams \u003cid,...\u003e`: run only specific stage stream ids (`stage-0` ... `stage-4`).\n- `--no-tests`: remove `pnpm test` from `--checks` if present.\n- `--max-retries-per-task \u003cn\u003e`: retries before a task is marked blocked.\n- `--model \u003cname\u003e`: pass a specific model to `codex exec`.\n\nThe orchestrator stores state/logs in `.automation/`.\nCreate `.automation/STOP` to halt the loop after the current iteration.\n\n## Turborepo remote caching\nRemote caching is ready to wire up when you want it:\n```bash\npnpm dlx turbo login\npnpm dlx turbo link\n```\nThen set `TURBO_TOKEN` and `TURBO_TEAM` in CI secrets.\n\n## License\nThis project is a modified version of the Micropolis source released by Electronic Arts under the GNU General Public License v3 (or later). The full GPLv3 text is in [LICENSE](LICENSE). The original Micropolis license notice and additional terms (including trademark restrictions) are preserved in [ref/micropolis/README](ref/micropolis/README).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-ehrlich%2Fmicropolis","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fc-ehrlich%2Fmicropolis","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fc-ehrlich%2Fmicropolis/lists"}