{"id":50789258,"url":"https://github.com/patlux/pi-deno-runtime","last_synced_at":"2026-07-08T08:01:45.375Z","repository":{"id":361709870,"uuid":"1255482038","full_name":"patlux/pi-deno-runtime","owner":"patlux","description":"Experimental Deno runtime launcher for Pi coding agent","archived":false,"fork":false,"pushed_at":"2026-05-31T22:22:02.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-06-01T00:13:34.800Z","etag":null,"topics":["coding-agent","deno","pi","runtime"],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/patlux.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":null,"dco":null,"cla":null}},"created_at":"2026-05-31T22:02:18.000Z","updated_at":"2026-05-31T22:22:05.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/patlux/pi-deno-runtime","commit_stats":null,"previous_names":["patlux/pi-deno-runtime"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/patlux/pi-deno-runtime","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-deno-runtime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-deno-runtime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-deno-runtime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-deno-runtime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/patlux","download_url":"https://codeload.github.com/patlux/pi-deno-runtime/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/patlux%2Fpi-deno-runtime/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35257106,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-08T02:00:06.796Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["coding-agent","deno","pi","runtime"],"created_at":"2026-06-12T10:00:30.190Z","updated_at":"2026-07-08T08:01:45.368Z","avatar_url":"https://github.com/patlux.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"# pi-deno-runtime\n\nRun [Pi](https://github.com/earendil-works/pi-mono) under Deno.\n\nThis is an experimental Deno runtime launcher for `@earendil-works/pi-coding-agent`. It downloads Pi\nfrom npm, applies a small Deno compatibility patch, caches the patched package locally, and runs the\nPi CLI with Deno.\n\n## Why\n\nI tried Pi on Node, Bun, Bun canary, and Deno because I wanted lower battery drain from long-running\nCLI sessions.\n\nIn local benchmarks, Deno was not the fastest for tiny startup commands, but it had the best balance\nfor actual Pi usage:\n\n- lower RAM than Bun on every tested workload\n- much lower system CPU time than Bun\n- faster than Node on the heavier `--list-models` path\n- lowest RSS in the tested TUI idle runs\n\nBun canary won startup. Deno won the real workload.\n\nSee [`docs/benchmarks.md`](docs/benchmarks.md) for the numbers.\n\n## Install from GitHub\n\nRequires Deno 2.6+.\n\n```bash\ndeno install -g -A -n pi-deno \\\n  https://raw.githubusercontent.com/patlux/pi-deno-runtime/main/src/pi-deno.ts\n```\n\nThen run:\n\n```bash\npi-deno --version\npi-deno --help\n```\n\nThe first run downloads and patches `@earendil-works/pi-coding-agent`.\n\n## Pi version\n\nDefault Pi version:\n\n```text\n0.76.0\n```\n\nOverride per run:\n\n```bash\npi-deno --pi-version 0.76.0 --version\n```\n\nOr via env:\n\n```bash\nPI_DENO_PI_VERSION=0.76.0 pi-deno --version\n```\n\n## Cache\n\nPatched Pi packages are cached in:\n\n```text\n$XDG_CACHE_HOME/pi-deno-runtime\n```\n\nor:\n\n```text\n~/.cache/pi-deno-runtime\n```\n\nOverride:\n\n```bash\nPI_DENO_CACHE_DIR=/tmp/pi-deno-cache pi-deno --version\n```\n\n## What gets patched?\n\nPi does not officially support Deno. This launcher patches Pi's HTTP dispatcher so npm `undici` is\nonly loaded outside Deno.\n\nWhy: Deno already has native `fetch`, while npm `undici` currently fails under this Pi/Deno setup\nwith:\n\n```text\nTypeError: webidl.util.markAsUncloneable is not a function\n```\n\nThe launcher also runs Pi with an import map that maps bare Node builtins like `url`, `fs`, and\n`path` to `node:*` specifiers.\n\n## Caveats\n\nThis is experimental.\n\nKnown risk areas:\n\n- HTTP proxy behavior may differ from Node/Undici.\n- Pi's HTTP idle timeout setting may not affect Deno `fetch` the same way.\n- Provider/SDK edge cases may behave differently.\n- Extensions that rely on Node-only APIs may fail.\n- `pi install` / `pi update` need more testing.\n\nSmoke-tested locally:\n\n- `--version`\n- `--help`\n- `list`\n- `--list-models`\n- TUI startup\n- real OpenAI-compatible provider call\n- built-in tool call\n- MCP tool search\n- sessions / `--continue`\n\n## Benchmarks\n\nLocal benchmark summary on macOS ARM:\n\n- Bun canary was fastest for tiny startup.\n- Deno won the heavier `--list-models` workload.\n- Deno used less RAM than Bun in the tested Pi workloads.\n\nSee [`docs/benchmarks.md`](docs/benchmarks.md).\n\n## Development\n\n```bash\ndeno task check\ndeno task fmt\nscripts/smoke.sh\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatlux%2Fpi-deno-runtime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpatlux%2Fpi-deno-runtime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpatlux%2Fpi-deno-runtime/lists"}