tutorial
Your first script with Boomkat
Build the Boomkat CLI from source, run a TypeScript module, and compare module execution with classic script mode.
Prerequisites
Install the C3 compiler (v0.8.5 or later), just, and python3:
brew install c3c just
1. Build the CLI
From the repository root, build the default boomkat target:
just build boomkat
The binary is written to out/boomkat.
2. Run a JavaScript module
Create a file named hello.js:
const name = "Boomkat";
print(`Hello from ${name}`);
Run it:
./out/boomkat hello.js
Expected output:
Hello from Boomkat
3. Run a TypeScript file directly
Create greet.ts. Boomkat strips erasable TypeScript syntax without a separate build step:
function greet(who: string, count: number): string {
return `${who} x${count}`;
}
print(greet("margay", 3));
Run it the same way:
./out/boomkat greet.ts
Expected output:
margay x3
4. Try classic script mode
Files run as ES modules in strict mode by default. To evaluate a classic sloppy script, pass --script.
Create sloppy.js:
x = 42;
print(x);
Running it without --script throws a ReferenceError because modules are strict. With --script it succeeds:
./out/boomkat --script sloppy.js
Expected output:
42