A chat interface that integrates OpenAI's GPT models with ComputerCraft computers in Minecraft, featuring a Node.js backend server and a Lua client.
- Real-time streaming chat responses
- ComputerCraft-aware chat interface
- Text wrapping and formatting for ComputerCraft terminals
- Express.js backend with OpenAI integration
- Easy-to-use Lua client for ComputerCraft computers
- Node.js (Latest LTS version recommended)
- OpenAI API key
- ComputerCraft mod installed in Minecraft
- Advanced Computer in ComputerCraft
- Clone the repository:
git clone https://github.com/yourusername/ccGPT.git
cd ccGPT- Install dependencies:
npm install- Create a
.envfile in the root directory and add your OpenAI API key:
OPENAI_API_KEY=your_api_key_here
- Start the server:
npm startThe server will run on port 3000 by default. You can change this by setting the PORT environment variable.
- Copy the contents of
chat.luato your ComputerCraft computer - Make sure your computer has internet access enabled in the ComputerCraft config
- Run the chat program:
chat- Start typing messages in the ComputerCraft terminal
- Press Enter to send your message
- The bot will respond with formatted text that wraps properly in the terminal
- Type 'exit' to quit the program
api/index.ts- Express.js server with OpenAI integrationchat.lua- ComputerCraft client implementationpackage.json- Node.js project configuration and dependencies.env- Environment variables configuration
- express
- openai
- cors
- dotenv
- ComputerCraft HTTP API
- ComputerCraft Term API
ISC
Feel free to submit issues and pull requests to improve the project.