Greybel-JS (v3.7.12) is a CLI and library for transpiling, interpreting, and debugging GreyScript, a scripting language for the Grey Hack game. It provides a parser, lexer, compiler, and interpreter with full GreyScript API support. Key differentiators are its ability to manage imports, minimize scripts (up to 40% size reduction), beautify code, and run GreyScript outside the game environment. The package requires Node >=20.17.0 and has optional peer dependencies on React and Monaco editor for the web UI. It offers advanced features like dependency management, environment variables, a REPL, and a debugging UI. Compared to alternatives, Greybel-JS is the main GreyScript toolchain maintained by the community.
npm install greybel-jsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to transpile and interpret GreyScript code using Greybel-JS programmatically.
Use import syntax instead of require(). Update tsconfig.json to target ESNext or use dynamic import for CJS projects.
Use 'Transpiler' instead of 'Compiler' when importing.
Always test scripts in-game before relying on interpreter behavior. Use the 'debugger' for more accurate simulation.
Test minified scripts thoroughly. Use the 'beautify' option to revert minification for debugging.
Set process.env.NO_COLOR = '1' or use any standard NO_COLOR support.
Change to import statement: import { ... } from 'greybel-js'; or use dynamic import: const greybel = await import('greybel-js');Use named import: import { Greybel, Transpiler, Interpreter } from 'greybel-js';Use environment variable: set NO_COLOR=1 before running the CLI.