Usage
Running @gwigz/slua-create, interactive prompts, and options
Running the CLI
Run without arguments to start the interactive wizard:
npx @gwigz/slua-createPass a directory name to skip the first prompt:
npx @gwigz/slua-create ./my-projectFlags and non-interactive mode
Every prompt can be answered with a flag instead, and any flag-answered question is skipped:
slua-create [directory] [options]
-t, --template <single|multi> project template (default: single)
-e, --extras <list> comma-separated extras, or "none"; repeatable
(jsx, config, utilities, yield, stylua, linting, formatting)
--git / --no-git initialize a git repository (default: git)
--install / --no-install install dependencies (default: install)
-y, --yes accept defaults for all unanswered prompts
-h, --help show this help
-v, --version show versionWith --yes (or whenever the CLI is not attached to a terminal, e.g. in CI
or piped scripts) no prompts are shown, defaults fill anything unanswered, and
the directory argument is required:
npx @gwigz/slua-create my-project --yes
npx @gwigz/slua-create my-project -y -t multi -e config,yield --no-gitInteractive prompts
The CLI asks these in order:
- Project directory where to create the project (skipped if a positional argument is given)
- Template choose between
single(onenew-script.ts) ormulti(custombuild.tswith multiple entry points) - Extras optional add-ons (see below)
- Git whether to initialize a Git repository
- Install packages whether to run the package manager install automatically
Extras
| Extra | Description |
|---|---|
| JSX templates | Adds @gwigz/jsx-inline for JSX template support |
| Config module | Vendors the config module source into your project |
| Utilities module | Vendors the utilities module source into your project |
| Yield module | Vendors the yield module source into your project |
| StyLua formatting | Adds a StyLua config for Lua output formatting |
| Linting | Adds oxlint for TypeScript linting |
| Formatting | Adds oxfmt for TypeScript formatting |
Package manager detection
The CLI detects which package manager you invoked it with (npm, pnpm, or
bun) and uses that one for the install command and the suggested run script
in the final message.