CLI
The killscript CLI owns the path from TypeScript source to a game-readable
module. A generated project exposes the common commands as npm scripts, so most
development does not require a global installation.
Everyday workflow
Section titled “Everyday workflow”# Create a project and install its folder into the game.npx killscript@0.1.2 new MyModule --modules "/path/to/Modules"
cd MyModule
# Watch, rebuild and synchronize valid changes.npm run dev
# Validate types and generated Lua without installing or packaging.npm run check
# Create dist/MyModule.KillScript.npm run buildUse --reflex on new when the project also needs src/server/main.ts.
Commands by task
Section titled “Commands by task”Create a project
Section titled “Create a project”| Command | Purpose |
|---|---|
killscript new <directory> | Create a new directory from the starter template |
killscript init [directory] | Initialize an existing empty directory |
Both accept:
--author <name>— set module author metadata;--reflex— add the Reflex server entry;--modules <path>— remember the gameModulespath and, unless--no-installis used, install the first build there;--no-install— do not run dependency installation;--no-git— do not initialize a Git repository.
Connect and develop
Section titled “Connect and develop”| Command | Purpose |
|---|---|
killscript link <Modules> | Save this machine’s game path |
killscript install | Build and synchronize the folder module once |
killscript dev | Watch source, configuration and assets; sync the last good build |
killscript dev --once | Perform one watched-style build and sync, then exit |
install and dev accept --modules <path>. Supplying it also saves the path
in .killscript/local.json, which is ignored by Git because the path belongs
to one machine.
Validate and release
Section titled “Validate and release”| Command | Purpose |
|---|---|
killscript check | Type-check each configured context and compile without packaging |
killscript build | Compile and create dist/<name>.KillScript |
killscript build --no-pack | Create only the generated folder |
killscript doctor | Validate config, entries, compiler output and game link |
killscript clean | Remove local generated output |
killscript clean --game | Also remove this project’s managed game folder |
doctor --modules <path> checks a path without replacing the saved one.
Safe synchronization
Section titled “Safe synchronization”The CLI treats the installed folder as managed output:
- a failed build leaves the last working game folder untouched;
- changed files prefer atomic rename and use a recoverable fallback where overwrite is unavailable;
- a folder with another module UUID or without compatible ownership is not overwritten;
clean --gameremoves only the folder proven to belong to this project.
install and dev --once return a failing exit code when their one build
fails, which makes them suitable for scripts and CI.
Run npx killscript@0.1.2 --help or
npx killscript@0.1.2 <command> --help for the exact
options documented here.