{"id":50318377,"url":"https://github.com/mode89/pi-minecraft","last_synced_at":"2026-05-29T01:32:44.941Z","repository":{"id":353551759,"uuid":"1216728796","full_name":"mode89/pi-minecraft","owner":"mode89","description":null,"archived":false,"fork":false,"pushed_at":"2026-04-24T16:05:54.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-04-24T18:11:16.327Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mode89.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":null,"dco":null,"cla":null}},"created_at":"2026-04-21T07:14:27.000Z","updated_at":"2026-04-24T16:05:57.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/mode89/pi-minecraft","commit_stats":null,"previous_names":["mode89/minecraft-bot","mode89/pi-minecraft"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/mode89/pi-minecraft","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fpi-minecraft","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fpi-minecraft/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fpi-minecraft/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fpi-minecraft/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mode89","download_url":"https://codeload.github.com/mode89/pi-minecraft/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mode89%2Fpi-minecraft/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"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-05-28T02:00:06.440Z","response_time":99,"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":[],"created_at":"2026-05-29T01:32:43.516Z","updated_at":"2026-05-29T01:32:44.915Z","avatar_url":"https://github.com/mode89.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pi-minecraft\n\nAI-powered Minecraft bot for Pi.\n\nThis package adds Pi commands that manage a background Mineflayer runtime (`mcbot.js`) and inject Minecraft bot-operator instructions (`system.md`) while the runtime is active. Pi then controls the bot through the runtime's local HTTP API.\n\n## Usage\n\nInstall this repository as a Pi package:\n\n```sh\npi install .\n```\n\nThen restart Pi or run `/reload`.\n\nCommands:\n\n```text\n/minecraft:start [mcbot args]\n/minecraft:status\n/minecraft:stop\n```\n\nOnce the runtime is started, you can operate the bot either through Pi chat or through normal Minecraft chat. Minecraft chat messages from other players are forwarded into Pi as user messages.\n\nIn Minecraft chat, the token `@aim` is replaced with the `(x, y, z)` of the block you are currently looking at, so you can say things like `mine @aim` or `place a torch on @aim`.\n\nExample:\n\n```text\n/minecraft:start --server localhost:25565 --http localhost:3000\ncollect some wood\n/minecraft:stop\n```\n\nThe background process writes state and logs under `.pi/minecraft/` in the current project.\n\n## User snippets\n\nUsers may define `.pi/minecraft/snippets.js` as a local CommonJS helper library for reusable bot code. The runtime reloads this file before each `/eval` request and exposes its exports to eval scripts as `snippets`.\n\nExample:\n\n```js\n// .pi/minecraft/snippets.js\nexports.countItem = (bot, name) =\u003e bot.inventory\n  .items()\n  .filter((item) =\u003e item.name === name)\n  .reduce((total, item) =\u003e total + item.count, 0)\n```\n\nThen an eval script can use:\n\n```js\nprint(\"oak_log\", snippets.countItem(bot, \"oak_log\"))\n```\n\nIf the file is missing, `snippets` is an empty object. If it exists but fails to load, the eval request fails with the import error. Keep snippet module load side-effect-free; define helpers only, and pass `bot` or other eval-scope values into helpers explicitly.\n\n## Development\n\n```sh\nnode --test\n```\n\nIntegration tests boot a real Minecraft server and are skipped by default. To run them, ensure `minecraft-server` is on `PATH` and set `INTEGRATION_TESTS=1`:\n\n```sh\nINTEGRATION_TESTS=1 node --test test/integration/\n```\n\n## Security\n\nThe managed bot runtime executes arbitrary JavaScript received over HTTP. Keep `--http` bound to localhost unless you fully trust the network. Game/world changes made by scripts are real and are not rolled back.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmode89%2Fpi-minecraft","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmode89%2Fpi-minecraft","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmode89%2Fpi-minecraft/lists"}