forge init
Scaffold a blueforge.config.json for the current project.
Command
forge init [--name <n>] [--type <t>] [--port <p>] [--domain <d>] [--server <s>] [--yes] [--force]
Arguments
None.
Flags
| Flag | Type | Default | Notes |
|---|---|---|---|
| string | directory | App name |
| enum | auto-detected | | | | |
| int | | App port |
| string | | Custom domain |
| string | | Target server |
| bool | | Skip all prompts |
| bool | | Overwrite existing |
Examples
Auto-detect:
forge init
# → Detected type: next
# → Created blueforge.config.json
Full explicit:
forge init --name my-api --type hono --port 3000 --yes
Errors
| Exit code | Meaning |
|---|---|
| 0 | Config created successfully |
| 1 | Failed to create config |
Pitfalls
- No overwrite — will NOT overwrite an existing
withoutblueforge.config.json
.--force - Type auto-detection — checks
dependencies (e.g.,package.json
for Next.js,next
for Vite,vite
for Express,express
for Hono).hono - Interactive mode — without
, the CLI prompts for any missing values.--yes
See also
{auto-injected}
Tested against
{auto-injected}