npm.io
0.1.9 • Published yesterdayCLI

spawnpack

Licence
MIT
Version
0.1.9
Deps
2
Size
174 kB
Vulns
0
Weekly
735

Spawnpack

Spawnpack is a Bun-powered CLI for scaffolding Minecraft Bedrock add-on projects with a guided terminal wizard.

It generates BP/RP structure, optional Script API setup, optional rgl integration, marketplace-ready namespaced content folders, and optional AI tooling files.

Features

  • Inline wizard built with @clack/prompts
  • Behavior Pack and Resource Pack scaffold
  • Scripting options: None, JavaScript, TypeScript
  • Optional packages:
    • @minecraft/server
    • @minecraft/server-ui
    • @minecraft/vanilla-data
    • @minecraft/math
  • Optional rgl setup for faster Bedrock builds
  • Optional marketplace add-on structure using nested namespace/projectId folders in BP/RP content directories
  • Optional Rockide recommendation during setup
  • Optional AI setup:
    • CLAUDE.md for Claude
    • AGENTS.md for Other
    • .mcp.json with keyless MCP servers

Runtime Requirement

Spawnpack is published on npm, but it runs on Bun.

Install Bun first:

Install

Global install with Bun
bun add -g spawnpack
Global install with npm
npm i -g spawnpack
One-off run with Bun
bunx spawnpack
Run locally
bun install
bun run src/index.ts

Usage

spawnpack

Show the installed version:

spawnpack -v
spawnpack --version

The wizard walks through:

  1. Project name and author
  2. Marketplace add-on structure toggle
  3. Destination folder
  4. Script API setup
  5. Publisher ID and Project ID when needed
  6. Script packages
  7. rgl toggle
  8. Rockide toggle
  9. AI setup choice (None, Claude, or Other)
  10. Review screen and generation

Generated project options

Depending on your choices, Spawnpack can generate:

  • packs/BP
  • packs/RP
  • data/scripts/main.ts
  • packs/BP/scripts/<publisher-id>/<project-id>/main.js
  • package.json
  • tsconfig.json
  • dprint.json
  • config.json for rgl
  • CLAUDE.md
  • AGENTS.md
  • .mcp.json

AI MCP setup

When AI setup is enabled, Spawnpack generates an .mcp.json that works out of the box without API keys.

Generated MCP servers currently include:

  • Exa hosted MCP (https://mcp.exa.ai/mcp) for free, rate-limited web/documentation search
  • grep_app for code search
  • context7 for library documentation context

You can add your own Exa API key later if you need higher Exa limits, but it is not required for the generated scaffold.

Marketplace structure mode

When enabled, Spawnpack creates marketplace-style nested folders under many BP/RP content directories.

Example:

packs/BP/animation_controllers/publisher/sample/
packs/BP/entities/publisher/sample/
packs/RP/animation_controllers/publisher/sample/
packs/RP/textures/items/publisher/sample/

This helps multiple add-ons coexist more safely in the same world by reducing content path collisions.

Script dependency versions

Spawnpack fetches the latest stable npm versions for:

  • @minecraft/server
  • @minecraft/server-ui
  • @minecraft/vanilla-data
  • @minecraft/math

If version lookup fails, it falls back to baked stable defaults.

Only runtime Script API modules, currently @minecraft/server and @minecraft/server-ui, are written to the behavior pack manifest. npm-side libraries such as @minecraft/vanilla-data and @minecraft/math stay in the generated package.json for imports and bundling.

Development

bun install
bun run typecheck
bun run build

Publish notes

The npm package is configured to publish only:

  • dist/spawnpack.js
  • bin/spawnpack.js
  • templates/CLAUDE.md
  • templates/AGENTS.md
  • README.md
  • LICENSE
  • package.json

Internal planning files and local AI/project notes are excluded from the published tarball.

Keywords