Quick Start
Option 1: Interactive mode
Run the generator and follow the prompts:
zgf
Prompts include:
- Project name
- Package manager
- Language (TypeScript / JavaScript)
- Architecture (FSD / Atomic / Empty)
- Routing (optionally with private route setup)
- State manager (RTK / Mobx / None)
Option 2: CLI options
Show CLI options
Example:
CLI example
zgf --name=my-app --pm=yarn --lang=ts --arch=fsd --routing --private --sm=redux
Option | Alias | Type | Description |
---|---|---|---|
--name | -n | string | Project name |
--pm | string | Package manager (npm , yarn , pnpm ) | |
--lang | string | Language (ts , js ) | |
--arch | string | Architecture (fsd , atomic , empty ) | |
--routing | boolean | Include react-router-dom | |
--private | boolean | Add public/private routing setup | |
--sm | string | State manager (redux , mobx , none ) | |
--help | boolean | Show help | |
--version | boolean | Show CLI version | |
--preset | string | Create project by preset | |
--preset-list | boolean | Print list of presets |
🆘 CLI Help
Run the following command to see all available CLI options:
zgf --help
Or to check the installed version:
zgf --version
Example output:
Show example output
Options
Option | Alias | Type | Description | Choices |
---|---|---|---|---|
--name | -n | string | Project name | — |
--pm | string | Package manager | npm · yarn · pnpm | |
--lang | string | Programming language | ts · js | |
--arch | string | Architecture type | fsd · atomic · empty | |
--routing | boolean | Include react-router-dom | — | |
--private | boolean | Add private/public routes | — | |
--sm | string | State manager | redux · mobx · none | |
--help | boolean | Show help | — | |
--version | boolean | Show CLI version | — | |
--preset | string | Create project by preset | — | |
--preset-list | boolean | Print list of presets | — |
Examples
CLI example
zgf --name=my-app \
--pm=yarn \
--lang=ts \
--arch=fsd \
--routing \
--private \
--sm=redux
note
Create your own preset for faster initialization:
zgf-preset
Attention! For presets and other functions to work correctly, you must install the CLI globally — see Installation.
🍳 Recipes
-
[FSD + TypeScript + routing]
CLI examplezgf --name=my-app --pm=yarn --lang=ts --arch=fsd --routing --private --sm=redux
-
[Minimal empty JS app]
zgf --name=playground --pm=npm --lang=js --arch=empty --sm=none
-
[Using a preset]
zgf --preset=my-preset
🧰 Troubleshooting
-
"zgf: command not found" — install globally:
npm i -g zero-guess-frontend
-
Windows: cannot run scripts — enable script execution in PowerShell:
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned
-
EACCES / permissions — ensure you have write access to the target folder.
See also
- Installation: installation
- FAQ: faq