Quickstart
1. Create a project
Non-interactive (CI or scripts) — you must pass a project name and --yes skips the wizard. Unspecified options use CLI defaults (modular, ts, npm, eslint-prettier, no database, no git/docker/ci/install unless flags are set):
- npm
- pnpm
- yarn
npm create forgeloop@latest my-bot -- --yes --preset modular --language ts
pnpm create forgeloop my-bot --yes --preset modular --language ts
yarn create forgeloop my-bot --yes --preset modular --language ts
Without a TTY, git, docker, ci, and install are not prompted and default to off unless you pass --git, --docker, --ci, or --install explicitly.
Interactive — run create without a name or with only init to step through prompts (requires a terminal):
npm create forgeloop@latest
or
npx create-forgeloop@latest init
2. Enter the directory and install
- npm
- pnpm
- yarn
cd my-bot
npm install
cd my-bot
pnpm install
cd my-bot
yarn install
If you passed --install during init, dependencies were already installed.
3. Environment variables
Copy the example env file and fill in values from the Discord Developer Portal:
cp .env.example .env
| Variable | Purpose |
|---|---|
DISCORD_TOKEN | Bot token |
CLIENT_ID | Application (client) ID |
GUILD_ID | Guild used for development command sync (modular/advanced) |
DATABASE_URL | Only when you chose a database — see Database |
4. Database (optional)
If you selected SQLite or PostgreSQL + Prisma during init, run the Prisma workflow once before dev:
- npm
- pnpm
- yarn
npm run db:push
pnpm run db:push
yarn db:push
5. Start the bot
- npm
- pnpm
- yarn
npm run dev
pnpm run dev
yarn dev
For modular and advanced projects, the generated runtime calls syncCommands on startup: in development (NODE_ENV not production) commands sync to the guild from GUILD_ID; in production they sync globally.
What init prints
After files are written, the CLI prints a Project profile summary and a Next steps callout (install, .env, optional db:push, dev). Conceptually:
forgeloop init my-bot --yes --preset modular --language ts
Next: Concepts — manifest, presets, and config files.