npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

minecraft-code

v0.1.0

Published

Control Minecraft with AI agents — Claude Code, Browser Use, and more via tmux-bridge

Downloads

104

Readme

minecraft-code

npm

Turn Minecraft into a terminal interface for AI agents. Spawn Claude Code, Browser Use, or any CLI tool as Minecraft villagers that follow you around, display output above their heads, and respond to your messages.

/agent alex              → spawn Claude villager
/agent rex wolf          → spawn wolf agent
/claude hello            → talk to Claude Code
/browser-use get-schematics castle → download builds
/build 27283             → place schematic via Litematica
/agent-tell alex shawn "review this" → agents talk to each other

Quick Start

# Install
npm install -g minecraft-code

# Check prerequisites
minecraft-code doctor

# Set up everything (venv, mod build, dependencies)
minecraft-code init

# Launch (tmux + sidecar + Claude Code + Minecraft)
minecraft-code start

How It Works

The mod connects to tmux terminal panes via smux/tmux-bridge. Each command you type in Minecraft sends text to a named tmux pane and reads the output back. The mod doesn't know or care what's running in each pane.

Minecraft Chat  →  TmuxBridge.java  →  tmux-bridge CLI  →  tmux pane
     ↓                                                         ↓
  /claude hello     types "hello" into        Claude Code responds
     ↓              the "claude" pane              ↓
  Shows response    reads output back         "Hello! How can I help?"
  in Minecraft chat

Architecture

tmux session "minecraft-code"
┌──────────────┬──────────────┐
│  sidecar     │  claude      │
│  (FastAPI)   │  (lfg)       │
├──────────────┼──────────────┤
│  minecraft   │  browser     │
│  (gradlew)   │  (repl)      │
├──────────────┤              │
│  shell       │              │
│  (bash)      │              │
└──────────────┴──────────────┘

+ "agents" window (created by /agent command)
┌──────────────┬──────────────┐
│  alex        │  shawn       │
│  (lfg)       │  (lfg)       │
└──────────────┴──────────────┘

Commands

Terminal Commands

| Command | Description | |---------|-------------| | /claude <message> | Send a message to Claude Code | | /browser-use <task> | Run a Browser Use task | | /browser-use get-schematics <query> | Search and download schematics | | /shell <command> | Run a shell command | | /tmux-send <pane> <text> | Send text to any tmux pane | | /tmux-read <pane> | Read from any tmux pane |

Agent Villagers

| Command | Description | |---------|-------------| | /agent <name> | Spawn a villager agent (runs Claude Code) | | /agent <name> <mob> | Spawn as specific mob (wolf, pig, creeper...) | | /agent <name> --attach <pane> | Attach villager to existing tmux pane | | /despawn <name> | Remove agent and close its tmux pane | | /agent-tell <from> <to> <msg> | One agent sends a message to another | | /agent-chat <a1> <a2> <prompt> | Multi-round conversation between agents |

Schematics

| Command | Description | |---------|-------------| | /build list | List schematics from Convex database | | /build <name> | Download schematic for Litematica placement | | /catalog | Open in-game schematic catalog GUI |

Agent Villagers

Spawn AI agents as Minecraft mobs that follow you around:

/agent alex              → librarian villager named "alex"
/agent rex wolf          → wolf named "rex"
/agent scout creeper     → creeper named "scout"

Each agent:

  • Follows you (3-6 block distance, teleports if >16 blocks away)
  • Shows output as floating text above its head (with ANSI color rendering)
  • Right-click to open a scrollable chat GUI
  • Dies -> tmux pane closes + custom death sound
  • Custom spawn sounds per name (alex, shawn, magnus, aitor, etc.)

Agents can talk to each other:

/agent-tell alex shawn "tell shawn to review the code"
/agent-chat alex shawn "debate rust vs python"

Schematics Pipeline

Download schematics from the web and place them in Minecraft:

/browser-use get-schematics castle     → Browser Use finds and downloads
                                       → Saves to Convex database
/build list                            → Shows available schematics
/build castle                          → Downloads from Convex
                                       → Load in Litematica (M+C) to place

Supports:

  • minecraft-schematics.com (default, skips non-free)
  • planetminecraft.com (get-schematics castle --site planet)

Prerequisites

| Tool | Version | Install | |------|---------|---------| | Java | 21+ | brew install openjdk@21 | | tmux | 3.x+ | brew install tmux | | Python | 3.12+ | brew install [email protected] | | Node.js | 18+ | brew install node | | smux | latest | auto-installed by minecraft-code init |

Run minecraft-code doctor to check everything.

Environment Variables

Create a .env file in the project root:

BROWSER_USE_API_KEY=bu_your_key_here
OPENAI_API_KEY=sk_your_key_here

CLI

minecraft-code doctor    # Check prerequisites
minecraft-code init      # Set up everything
minecraft-code start     # Launch tmux environment + Minecraft
minecraft-code stop      # Kill tmux session

Development

task build          # Build the Fabric mod
task test           # Run all tests (Java + Python)
task test:python    # Python tests only (50 tests)
task lint           # Run ruff linter
task mc:install     # Copy mod JAR to mods folder
task up             # Start tmux dev environment
task down           # Kill tmux session

Tech Stack

  • Minecraft Mod: Fabric 1.21.1, Java 21, Fabric API 0.107.0
  • Terminal Bridge: smux/tmux-bridge
  • Sidecar: Python 3.12, FastAPI, Browser Use Cloud SDK
  • Database: Convex (schematic storage)
  • Schematic Placement: Litematica
  • Frontend: React 19, Vite, Convex

Supported Mob Types

villager, wolf, cat, pig, cow, sheep, chicken, fox, parrot, rabbit, horse, donkey, llama, goat, bee, axolotl, frog, camel, sniffer, allay, iron_golem, snow_golem, zombie, skeleton, creeper, enderman

License

MIT