Skip to main content

Quick Start

Option 1: Interactive mode

Run the generator and follow the prompts:

zgf

Demo

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
OptionAliasTypeDescription
--name-nstringProject name
--pmstringPackage manager (npm, yarn, pnpm)
--langstringLanguage (ts, js)
--archstringArchitecture (fsd, atomic, empty)
--routingbooleanInclude react-router-dom
--privatebooleanAdd public/private routing setup
--smstringState manager (redux, mobx, none)
--helpbooleanShow help
--versionbooleanShow CLI version
--presetstringCreate project by preset
--preset-listbooleanPrint 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

OptionAliasTypeDescriptionChoices
--name-nstringProject name
--pmstringPackage managernpm · yarn · pnpm
--langstringProgramming languagets · js
--archstringArchitecture typefsd · atomic · empty
--routingbooleanInclude react-router-dom
--privatebooleanAdd private/public routes
--smstringState managerredux · mobx · none
--helpbooleanShow help
--versionbooleanShow CLI version
--presetstringCreate project by preset
--preset-listbooleanPrint 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 example
    zgf --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