new command
keel new [project-name]Alias:
keel n [project-name]project-name argument rules
Section titled “project-name argument rules”- Cannot be empty.
- Cannot contain spaces.
- Cannot contain
/or\. - With
--yes(-y) the name must be passed as an argument.
Interactive flow (without --yes)
Section titled “Interactive flow (without --yes)”The command prompts, in this order:
- Project name (if not passed as argument)
- Module host:
GitHub,GitLab,Custom domainorLocal module - Owner/group/domain based on host
- Confirmation or manual editing of
module path - Use of Air and creation of
.air.toml .envsupport- Initialize Git repository
- Install dependencies (
go mod tidy)
| Flag | Description |
|---|---|
--yes, -y | Skips prompts and applies defaults |
--without-starter-module | Does not create internal/modules/starter |
--with-folder-structure | Creates an opinionated structure (middleware, guards, scheduler, etc.) |
Generated files
Section titled “Generated files”Base:
cmd/main.gogo.modkeel.tomlREADME.md.gitignore
Optional:
.env,.env.example.air.tomlinternal/modules/starter/*- folders:
internal/middleware,internal/guards,internal/scheduler,internal/checkers,internal/events,internal/hooks
Post-setup it may run
Section titled “Post-setup it may run”Depending on your answers:
git init <appName>go mod tidy- initial commit with message:
feat: initial commit keel framework
If something fails, the command continues and shows warnings (⚠) in the console.
Automatic mode (--yes)
Section titled “Automatic mode (--yes)”Defaults applied by the CLI:
moduleName = github.com/my-github-user/<app>useAir = trueincludeAirConfig = trueuseEnv = trueinitGit = trueinstallDeps = true
Examples
Section titled “Examples”Interactive project:
keel new payments-apiAutomatic project with full structure:
keel new payments-api --yes --with-folder-structureProject without starter module:
keel new payments-api --without-starter-moduleCommon errors
Section titled “Common errors”directory '<name>' already existsproject name cannot be emptyproject name cannot contain spacesproject name must not contain '/' or '\\'project name is required when using --yes/-y
Practical recommendation
Section titled “Practical recommendation”If you use --without-starter-module and don’t use --with-folder-structure, create internal/ manually before using keel generate, because that command requires a valid Keel project structure.