{"id":15384971,"url":"https://github.com/manekinekko/minecraft-openai","last_synced_at":"2025-10-11T09:38:48.402Z","repository":{"id":41134924,"uuid":"439383582","full_name":"manekinekko/minecraft-openai","owner":"manekinekko","description":"Controlling a Minecraft NPC using OpenAI 🤖","archived":false,"fork":false,"pushed_at":"2022-04-27T10:13:42.000Z","size":235,"stargazers_count":120,"open_issues_count":6,"forks_count":11,"subscribers_count":11,"default_branch":"main","last_synced_at":"2025-04-21T19:42:26.036Z","etag":null,"topics":["ai","artificial-intelligence","game","gpt-3","minecraft","mineflayer","mineflayer-bot","mineflayer-pathfinder","npc","openai"],"latest_commit_sha":null,"homepage":"https://slides.com/wassimchegham/playing-minecraft-artificial-intelligence-open-ai-gpt-3-javascript","language":"JavaScript","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/manekinekko.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":["manekinekko"],"custom":["https://ecologi.com/wassimchegham?r=5facf70521660a001d024120","https://www.buymeacoffee.com/wassimchegham"]}},"created_at":"2021-12-17T15:50:28.000Z","updated_at":"2025-04-19T22:48:59.000Z","dependencies_parsed_at":"2022-08-26T17:53:04.243Z","dependency_job_id":null,"html_url":"https://github.com/manekinekko/minecraft-openai","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/manekinekko/minecraft-openai","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fminecraft-openai","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fminecraft-openai/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fminecraft-openai/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fminecraft-openai/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/manekinekko","download_url":"https://codeload.github.com/manekinekko/minecraft-openai/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/manekinekko%2Fminecraft-openai/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279006749,"owners_count":26084181,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-11T02:00:06.511Z","response_time":55,"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":["ai","artificial-intelligence","game","gpt-3","minecraft","mineflayer","mineflayer-bot","mineflayer-pathfinder","npc","openai"],"created_at":"2024-10-01T14:43:45.730Z","updated_at":"2025-10-11T09:38:48.381Z","avatar_url":"https://github.com/manekinekko.png","language":"JavaScript","funding_links":["https://github.com/sponsors/manekinekko","https://ecologi.com/wassimchegham?r=5facf70521660a001d024120","https://www.buymeacoffee.com/wassimchegham"],"categories":[],"sub_categories":[],"readme":"# Minecraft OpenAI\n\nA proof of concept for controlling a Minecraft Non-Player Characters using OpenAI and GPT-3.\n\n![playing-minecraft-with-ai-gpt-3-no-text](https://user-images.githubusercontent.com/1699357/165494902-122c763c-7b88-4158-9685-24f0bdecb6b8.jpg)\n\n## Requirements\n\n- Clone this project on your local machine.\n- [Minecraft](https://www.minecraft.net/en-us/get-minecraft) (Java Edition) version 1.17\n- Node.js version 14+\n- An [OpenAI](https://openai.com) account \n- Create a `.env` file and copy your [OpenAI API key](https://beta.openai.com/account/api-keys) and save it\n\n```\nCODEX_API_KEY=\u003cyour_api_key\u003e\n```\n\n## Slide deck\n\nhttps://slides.com/wassimchegham/playing-minecraft-artificial-intelligence-open-ai-gpt-3-javascript\n\n## How to use\n\n### Start the Minecraft server\n\nHere is how to start the Minecraft server:\n\n1. Choose a host computer. This computer should be fast enough to play Minecraft, while running a server for other players as well.\n2. Launch the game and click **Single Player**.\n3. Create a new world or open an existing one. \n4. Inside that world, press the Esc key, and click **Open to LAN**. \n5. Choose a game mode to set for the other players.\n6. Choose **Creative mode** that allows you to fly and place an infinite number of blocks.\n7. Click **Start LAN World**, and you'll see a message that a local game has been hosted.\n8. Take note of the port number.\n\n### Launch the bot\n\nFrom your terminal, run the following commands:\n\n```\nnpm install\nnpm start -- --port [PORT]\n```\n\nIn a few seconds, you should see a message that the bot is running, and you should see the NPC pop up in Minecraft.\n\n### Sending commands\n\nInside the Minecraft client, press the `T` key to open the chat box.\n\n### Loading context\n\nThere are mulptiple supported contexts:\n\n1. `empty`: An empty context (default).\n2. `simple`: A basic context.\n3. `advanced`: A more complex context.\n\nTo load a context, type `load context [context_name]`.\n\nYou can also reset the current context by typing `reset context`.\n\n## Disclaimer\n\nThis is a proof of concept. It is not intended to be used in production.\n\n## Troubleshooting\n\n### On WSL\n\nIf you are using WSL, you may need to provide the host computer's IP address to the bot.\n\n```\nnpm start -- --port [PORT] --host [HOST]\n```\n\nTo get the IP address of your host computer, run the following command:\n\n```\nwsl.exe hostname -I\n```\t\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanekinekko%2Fminecraft-openai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmanekinekko%2Fminecraft-openai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmanekinekko%2Fminecraft-openai/lists"}