reference

CLI reference

runek init / add / list — pull editable component source into your project.

⌖ Explore the library in 3D →

The runek CLI copies component source from the registry into your project — you own and edit the files. Run it with npx @runek/cli <command>.

init

npx @runek/cli init [options]

Writes runek.config.json and creates the install directory. Run it once per project.

add

npx @runek/cli add <name...> [options]

Pulls one or more components. For each, it:

  1. resolves registry dependencies recursively (e.g. house also pulls its walls, floor, roof, door, and window as source),
  2. writes the source into your install directory verbatim (components import @runek/core from npm, so there’s no import to rewrite),
  3. installs the npm dependencies, including @runek/core, with your package manager (auto-detected from the lockfile).
npx @runek/cli add player terrain bookshelf

list

npx @runek/cli list [options]

Prints the catalog, grouped by category.

Options

OptionCommandsDescription
--registry <url|path>allRegistry base. Defaults to the configured one (https://runek.nullorder.org/r). A local path works for development.
--dir <path>init, addInstall directory (default src/runek).
--overwriteaddReplace files that already exist (otherwise they’re skipped).
--no-installaddPrint the dependency install command instead of running it.
--forceinitOverwrite an existing runek.config.json.
-h, --helpShow help.

runek.config.json

{
  "$schema": "https://runek.nullorder.org/registry/config-schema.json",
  "registry": "https://runek.nullorder.org/r",
  "dir": "src/runek"
}

Registry index

The default registry is served at https://runek.nullorder.org/r. Its index lists every component (name, type, description); each entry resolves to a self-contained manifest under components/<name>.json. Point --registry at it (the default) or at a local copy for development.

registry index /r/registry.json The catalog the CLI reads first: every component name, type, and description.