Skip to main content

cli

Create a JavaScript or TypeScript project with the packs and tools you need.

Create a project​

Use Node.js 26.13.0 or newer. For Yarn or pnpm, install Corepack with npm install --global corepack and run corepack enable.

npx @bedrock-core/cli my-project

The CLI prompts for missing details and your package manager, creates a Git repository without a commit, and installs dependencies. Choose none to create files without installing them.

Choose a starter​

PresetPacksIncluded content
full (default)Behavior and resourceRuntime registration, config, translations, guides, JSX screens, JSON templates and a GameTest
scriptOne behavior packPlain Minecraft scripting and a GameTest
resourceOne resource packResource-pack manifest and language files
npx @bedrock-core/cli my-script --preset script
npx @bedrock-core/cli my-textures --preset resource

These are starting layouts. A project can contain any number of packs, including independent addons.

Build and develop​

cd my-project
npm run build
npm run watch

build exports the completed packs to build/. watch rebuilds into Minecraft's development folders after changes. Edit the default profile's export paths for your installation; the generated defaults use Windows Minecraft development folders.

The full starter downloads the shared UI resource pack selected by its behavior manifest. Import that .mcpack into the world for client testing. If the download fails, the CLI prints the selected asset's exact release link and preserves the project.

Lint sources​

npm run lint

The full starter adds the Core hook preset exported by @bedrock-core/ui/eslint to eslint.config.mjs. Lint components and hooks covers its checks and configuration. Script and resource starters use the same file with the shared checks and no UI tooling.

Test and optimize​

The full and script starters include one headless GameTest:

npm run test:mc

This builds the test profile and runs the example suite on BDS. The test manifest selects gametest.js and enables the beta GameTest module; regular builds select main.js. Add tests under the behavior pack's scripts/tests/ directory and update the command's --expect-registered count when the suite grows.

Every starter includes pack optimization for Windows:

npm run build:optimized

Optimized output goes to dist/. The build-optimized profile exports production packs to build/production/ for conversion. bds-runner.json pins the server used for both tests and conversion. Run bds:fetch to download it or bds:where to inspect the selection. BDS runner explains results and supported inputs.

Resource-only projects have no GameTest registration; add a behavior pack test harness when testing their resources with GameTests. Client rendering and input need in-game checks.

Project files​

File or directoryPurpose
config.jsonProject metadata, pack paths, profiles and exports
package.jsonDependencies, project version and commands
packs/Authored packs; each has its own manifest
packs/BP/ui/Full starter's authored screens, components and UI helpers
packs/BP/i18n/index.tsFull starter's shared translation instance beside its locale modules
bds-runner.jsonPinned headless server
.bedrock-core/Generated editor declarations and local build cache

The full starter demonstrates JSON generation, translations, guides and navigation. Keep the features your project needs. Editor schemas covers schema URLs and local references for project configuration and stage settings.

Command options​

OptionPurpose
[project-name]Directory and npm package name
--preset <preset>full, script or resource
-a, --author <name>Author display name
-d, --description <text>Project description
-p, --package-manager <manager>npm, yarn, pnpm or none
--display-name <name>Human-readable project name
--creator-id <id> / --pack-id <id>Stable runtime identifiers, independent of display names

Show the full command reference:

npx @bedrock-core/cli --help

Next steps​