zsr-transpiler

raw JSON →
1.3.0 verified Fri May 01 auth: no javascript

CLI tool for transpiling ZetSharpRoblox (.zsr) files to Roblox Luau (.luau) without requiring Python. Version 1.3.0, released under MIT license. Actively maintained with a watch mode for auto-transpilation and support for reverse transpilation. Key differentiators: no Python dependency, seamless Rojo integration, and a beginner-friendly language syntax. Prioritizes simplicity over advanced features, making it ideal for Roblox developers new to transpilation.

error zsr-transpiler: command not found
cause zsr-transpiler not installed globally or not in PATH.
fix
Run npm install -g zsr-transpiler to install globally, or use npx zsr-transpiler.
error Error: Cannot find module 'chokidar'
cause Missing dependency due to incomplete installation.
fix
Reinstall the package with npm install -g zsr-transpiler to ensure all dependencies are installed.
gotcha CLI must be installed globally or used via npx; local install may not expose the command directly.
fix Run npm install -g zsr-transpiler to install globally, or use npx zsr-transpiler for on-demand usage.
gotcha No programmatic API; require('zsr-transpiler') will throw Module not found.
fix Use the CLI via command line only; do not attempt to import in code.
breaking Watch mode may fail on older Node versions (<18) due to dependency requirements.
fix Upgrade Node.js to version 18 or higher.
npm install zsr-transpiler
yarn add zsr-transpiler
pnpm add zsr-transpiler

Installs globally, creates a minimal ZSR project, transpiles a script to Luau, and demonstrates watch mode.

npm install -g zsr-transpiler
mkdir my-game && cd my-game
echo '@Players
on Players.PlayerAdded(player) {
    log("Welcome, {player.Name}")
}' > src/main.zsr
zsr-transpiler build src      # output: src/main.luau
zsr-transpiler watch src     # auto-transpile on save