Skip to main content

forgeloop init

Usage

forgeloop init <project-name> [flags]
forgeloop init
  • With project name + --yes or non-TTY: non-interactive; missing enum flags use defaults (TypeScript, modular, npm, no database, eslint-prettier).
  • Interactive: run forgeloop init or forgeloop init without --yes in a TTY — you get prompts for name (if missing), language, preset, package manager, database, ORM, tooling, git, docker, CI, and post-scaffold install.
Non-interactive requires a name

Without a TTY or with --yes, init requires a project name as the first argument after init. Otherwise the CLI exits with a message like init requires a project name in non-interactive mode.

Examples

npx forgeloop init my-bot --yes --preset advanced --language ts --git --install
npx create-forgeloop@latest my-bot -- --yes --database sqlite --orm prisma

Wizard (no args, TTY):

bash
npx forgeloop init
ForgeLoop • discord bot forgeProject wizardAnswer a few questions and ForgeLoop will shape the starter around your bot.? Project name (default: my-discord-bot)> …

Flags

FlagTypeDefaultDescription
--dirstring<project-name>Output directory (resolved with path.resolve).
--languagets | jstsSource language.
--presetbasic | modular | advancedmodularProject shape; see Concepts.
--package-managernpm | pnpm | yarnnpmLockfile/scripts style in generated package.json.
--databasenone | sqlite | postgresqlnoneDatabase wiring; when not none, use --orm prisma.
--ormnone | prismanone (or prisma if database ≠ none)Only Prisma is supported today when a database is selected.
--toolingeslint-prettier | biome | noneeslint-prettierLint/format setup.
--gitbooleanInitialize a git repo and add .gitignore.
--dockerbooleanAdd Dockerfile and dockerignore-style rules.
--cibooleanAdd GitHub Actions workflow for validation.
--installbooleanRun package manager install after writing files (5 min timeout).
--yesbooleanSkip interactive prompts when combined with TTY; always non-interactive path when used with full args.

Directory resolution

If --dir is omitted, ForgeLoop writes to <cwd>/<project-name>.

If --dir is provided and already ends with the project name, ForgeLoop uses it directly. Otherwise it writes to <dir>/<project-name>.

Output

Prints a banner, Project profile lines, optional git/install progress, Next steps (cd, install, .env, optional db:push, dev).

Failure modes

  • Unsupported enum value → lists supported values.
  • npm|pnpm|yarn install failure → non-zero exit with CLI error message.
  • --orm none with --database not none → init option validation error.
  • --database none with --orm prisma → init option validation error.