Reference
The g command
Reference the real CLI commands, options, version behavior and failure signals.
Install and inspect the tool
The package is GhaylStack.CLI; its executable is g. This documented CLI version targets .NET 11 and is separate from the project-template package.
dotnet tool install --global GhaylStack.CLI --version 1.0.0
g --help
g info
If the tool is already installed, use dotnet tool update --global GhaylStack.CLI --version 1.0.0 to select this version. g info displays the installed CLI, installed template and SDK, and attempts NuGet version lookups. An unavailable online lookup does not establish that your local installation is broken.
Create an application
g new MyCompany --output ./MyCompany --non-interactive
g new MyApi --no-frontend --no-aspire --git false
g new MobileDesk --mobile --skip-install
Running g new without a name prompts for the name, Aspire and frontend choices. Supplying a name uses Aspire and both web apps unless excluded. The mobile client is opt-in. The target must be empty; the CLI rejects an occupied output directory.
| Option | Effect |
|---|---|
--output, -o |
Choose the output directory |
--no-aspire |
Exclude AppHost |
--no-frontend |
Exclude Admin and Dashboard |
--mobile |
Include the Expo client |
--skip-install |
Skip npm installation in the two web clients |
--non-interactive |
Use defaults without prompts; name is required |
--git false |
Skip repository initialization |
--dry-run |
Print the selection without creating files |
Unknown options are rejected. Template-engine switches such as --frontend false belong to dotnet new, not g new.
Know what creation performs
The command ensures a template of at least 1.0.1 is installed, preserves a newer or local template installation, generates the project, and creates development secrets and a Compose .env. It attempts npm installation and Git initialization, then prints next steps.
An npm failure is reported as a warning and does not necessarily make g new fail. Read the output and run npm ci manually where required. Generation succeeds when files are created; compilation, migrations and application acceptance remain separate steps in quick start.
Check the development environment
g doctor
Doctor checks .NET, Git, Docker, template installation and selected API/Aspire ports. Failures return exit code 1; warnings can still return 0. It does not verify Node/npm, every frontend port, actual container startup, the database or PDF rendering. Use prerequisites to finish those checks.
A shell alias may already occupy g. Inspect command resolution in your shell, remove or rename your own alias if desired, or invoke the installed executable by its full path. The tool does not edit shell profiles.
Update tools without overwriting your application
g update updates the global CLI and installs the latest template available from NuGet. It returns 1 if either update fails. These operations affect tooling and future project generation; they do not merge new starter-kit code into an application you have already created. Review release guidance before upgrading an existing project.
Sources
Command registration, new, doctor, update and package identity.