@@ -17,14 +17,25 @@ dist/ # Compiled output (single bundled .mjs executable)
1717
1818### CLI Flow (` src/cli.ts ` )
1919
20- 1 . Display ASCII banner
21- 2 . Prompt for target directory (default: ` nitro-app ` )
22- 3 . Handle existing directory (override/rename/abort)
23- 4 . Select template from registry
24- 5 . Download template via ` giget ` from ` https://raw.githubusercontent.com/nitrojs/starter/templates `
25- 6 . Detect/select package manager and install dependencies
26- 7 . Optionally initialize git repo
27- 8 . Display next steps
20+ The CLI runs in three modes based on environment:
21+
22+ 1 . ** Interactive (TTY)** — full prompts for all options
23+ 2 . ** Non-interactive (no TTY)** — skips prompts, uses defaults
24+ 3 . ** AI Agent (` isAgent ` from ` std-env ` )** — no args: shows usage + exits 1; with args: uses defaults (non-interactive)
25+
26+ Interactive flow:
27+
28+ 1 . Check for agent/help — show usage if needed
29+ 2 . Display ASCII banner
30+ 3 . Prompt for target directory (default: ` nitro-app ` )
31+ 4 . Handle existing directory (override/rename/abort)
32+ 5 . Select template from registry
33+ 6 . Download template via ` giget ` from ` https://raw.githubusercontent.com/nitrojs/starter/templates `
34+ 7 . Detect/select package manager and install dependencies
35+ 8 . Optionally initialize git repo
36+ 9 . Display next steps
37+
38+ Non-interactive/agent defaults: dir=` nitro-app ` , template=` vite ` , PM=detected or ` npm ` , gitInit=` false ` .
2839
2940### CLI Arguments
3041
@@ -38,6 +49,7 @@ dist/ # Compiled output (single bundled .mjs executable)
3849| ` --install ` | Install deps (default: true) |
3950| ` --packageManager/-p ` | Specify PM (npm, pnpm, yarn, bun) |
4051| ` --gitInit ` | Initialize git repo |
52+ | ` --help/-h ` | Show usage information |
4153
4254### Templates
4355
0 commit comments