OC-CODE
OC-CODE is a coding agent for the OpenComputers mod; it is the Codex or Claude Code live in Minecraft. OpenComputers mod is a hidden gem; it can automate IC2 crops breeding, control reactors, and manage AE2 inventory. Yet due to the steep learning curve, it is not popular even among expert communities like GTNH. OC-CODE aims to change that, allowing us to integrate our factory by vibe coding in Minecraft.
Demo
Here is a demo of OC-CODE coding a 3D Spinning Cube, building an 8x8 Checkerboard, and a 3D Hilbert curve.
3D Spinning Cube written by OC-CODE
3D Hilbert Curve written by OC-CODE
AI-SDK
OC-CODE is built on top of AI-SDK, it is a Vercel AI SDK-inspired library that unifies the different API conventions of various LLM providers behind a single, clean interface.
Example:
local ai = require("ai")
local result = ai.generateText({
model = "google/gemini-2.5-flash-lite",
prompt = "Why is the sky blue? (50 words)",
})
print(result.text)
Currently, it supports Vercel, Google, OpenAI, and Groq. It can also incorporate other OpenAI-compatible APIs with minimal effort.
Supported functions:
- generateText
- streamText
- toolCalling
- generateStructuredOutput with schema
Check out the examples for usage details.
If you are interested in it, you can check out the Github Repo for the installation guide.