Introduction
ForgeLoop is a maintenance-first scaffolder for discord.js bots. It generates a working TypeScript or JavaScript project, keeps a project manifest on disk (forgeloop.config.mjs), and ships commands to add/remove handlers, validate project health, inspect commands, and deploy application command definitions to Discord.
What you get
- Interactive or scripted
init— pick language, preset, package manager, optional Prisma database, lint/format stack, Git, Docker, and GitHub Actions CI. - Three presets —
basic(inline bot),modular(handler folders + sync on startup),advanced(core runtime modules undersrc/core). - Generators —
addsupports slash commands, context menus, events, modals, buttons, and select menus for modular/advanced projects. - Removal —
removedeletes generated command/event/interaction handlers. - Health checks —
doctorruns grouped diagnostics (files, env, dependencies, command load checks) with optional--jsonand--strict. - Application command tooling —
commands listinspects local payload names,commands diffcompares local vs remote state, andcommands deploysyncs with Discord.
Two ways to run the same CLI
The npm package create-forgeloop exposes two binaries:
| Binary | Typical use |
|---|---|
create-forgeloop | npm create forgeloop@latest, pnpm create forgeloop, etc. Bare arguments are treated as init (e.g. project name). |
forgeloop | Inside a generated project: npx forgeloop …, pnpm forgeloop …, yarn forgeloop … |
If the first argument to create-forgeloop is already a known command (init, add, commands, remove, doctor, info, docs, help), it is passed through unchanged.
What ForgeLoop is not
- Not a hosted bot platform — you run Node and own deployment.
- Not a replacement for discord.js docs — it standardizes structure and boilerplate, not Discord API teaching.
Next steps
- Install — Node version and package managers.
- Quickstart — scaffold and run in a few commands.
- Concepts — manifest, presets, and when generators apply.