Skip to content

Cutwell/merlin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Merlin! It's dangerous to go alone!

Merlin

Merlin helps players discover crafting recipes, smelting processes, and game mechanics.

Try a demo using WebLLM.

Features

  • Multi-LLM Support: Works with Anthropic Claude, OpenAI GPT, local Ollama models, or OpenRouter
  • 3D Character Viewer: Interactive Babylon.js-powered Merlin character model
  • Minecraft-Style UI: Authentic retro interface with recipe components
  • Real-time Streaming: Server-sent events for responsive chat experience
  • Recipe Database: 1000+ Minecraft recipes (crafting, smelting, blasting, smoking, stonecutting, smithing)
  • Wiki Integration: Fetches information from minecraft.wiki with caching

Quick Start

Installation

  1. Clone the repository:

  2. Install dependencies:

# Frontend
cd merlin
npm install

# Backend
cd ../agent
npm install
  1. Configure LLM provider:
cd agent
cp .env.example .env

Edit .env and configure your preferred provider:

Option 1: Anthropic Claude (default)

LLM_PROVIDER=anthropic
ANTHROPIC_API_KEY=your_api_key_here

Option 2: OpenAI GPT

LLM_PROVIDER=openai
OPENAI_API_KEY=your_api_key_here

Option 3: Local Ollama (no API key needed)

LLM_PROVIDER=ollama
OLLAMA_ENABLED=true
OLLAMA_MODEL=llama2

Option 4: OpenRouter

LLM_PROVIDER=openrouter
OPENROUTER_API_KEY=your_api_key_here
  1. Start the servers:
# Terminal 1: Backend
cd agent
npm run dev

# Terminal 2: Frontend
cd merlin
npm run dev
  1. Open your browser:
http://localhost:5173

LLM Provider Configuration

Merlin uses a platform-agnostic provider system, allowing you to switch between different LLM providers without code changes.

Supported Providers

Provider API Key Required Notes
Anthropic Yes Claude 4.5-Haiku (default)
OpenAI Yes gpt-5-mini, Azure OpenAI compatible
Ollama No Run models locally (llama2, mistral, etc.)
OpenRouter Yes Access multiple providers via gateway

Switching Providers

Simply change the LLM_PROVIDER environment variable in agent/.env:

# Use Claude
LLM_PROVIDER=anthropic

# Use GPT-4
LLM_PROVIDER=openai

# Use local Ollama
LLM_PROVIDER=ollama

See agent/.env.example for detailed configuration options for each provider.

License

MIT

Acknowledgments

  • Minecraft textures and recipe data from Minecraft Wiki

About

Merlin helps players discover crafting recipes, smelting processes, and game mechanics.

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published