Command Line Interface
ScaffScript provides a command line interface to run scripts and manage your project.
Commands
Section titled “Commands”gen | generate
Section titled “gen | generate”Runs the full pipeline (scan, parse, generate, and integrate), based on the provided configuration.
<pm> scaff gen <project_path> [<options>]<pm> scaff generate <project_path> [<options>]| Argument | Description |
|---|---|
<pm> | Your package manager (bun, npm, or pnpm). |
project_path | Path to your GameMaker .yyp project file. |
<options> | Optional flags to override config options. |
The used source path is based on the source option in scaff.config.*. The project_path must end in .yyp and must exist on disk.
Options
Section titled “Options”| Option | Description |
|---|---|
--integrate | -i | Force integration, even if noIntegration: true is set in the config. |
--no-integration | -!i | Skip integration, even if noIntegration: false is set in the config. |
Examples
Section titled “Examples”Using Script Recommended
Section titled “Using Script ”Make sure you’ve set up the package.json scripts correctly. Here’s an example:
{ // --- snip --- "scripts": { "generate": "scaff gen ./my-game.yyp", "generate": "scaff gen ./path/to/your/my-game.yyp", "help": "scaff help", "scaff": "scaff" }, // --- snip ---}Then, you can run the script with your package manager:
bun run generate # no option overridebun run generate -- --no-integration # override config optionnpm run generate # no option overridenpm run generate -- --no-integration # override config optionpnpm run generate # no option overridepnpm run generate -- --no-integration # override config optionUsing Package Manager
Section titled “Using Package Manager”# no option overridebunx scaff gen ./my-game.yypbunx scaff generate './My Game/My Game.yyp'
# override config optionbunx scaff gen ./my-game.yyp --no-integrationbunx scaff generate './My Game/My Game.yyp' --no-integration# no option overridenpx scaff gen ./my-game.yypnpx scaff generate './My Game/My Game.yyp'
# override config optionnpx scaff gen ./my-game.yyp --no-integrationnpx scaff generate './My Game/My Game.yyp' --no-integration# no option overridepnpm exec scaff gen ./my-game.yyppnpm exec scaff generate './My Game/My Game.yyp'
# override config optionpnpm exec scaff gen ./my-game.yyp --no-integrationpnpm exec scaff generate './My Game/My Game.yyp' --no-integrationhelp | -h | --help
Section titled “help | -h | --help”Prints usage information.
<pm> scaff help<pm> scaff -h<pm> scaff --help| Argument | Description |
|---|---|
<pm> | Your package manager (bun, npm, or pnpm). |
Examples
Section titled “Examples”bunx scaff helpbun run helpnpx scaff --helpnpm run helppnpm exec scaff -hpnpm run helpConsole Output
Section titled “Console Output”| Tag | Color | Meaning |
|---|---|---|
[DEBUG] | Gray | Step tracing (only when debugLevel >= 1) |
[INFO] | Cyan | Progress and success messages |
[WARN] | Yellow | Non-fatal issues, skipped items |
[ERROR] | Red | Fatal issues that abort the run |
[INPUT] | Magenta | Prompt during the integration review step |