An interactive CLI to generate fully-typed TypeScript Discord bots with discord.js v14, Components v2, slash & prefix commands, economy, i18n, SQLite/PostgreSQL and more — all from a single command.
Powered by @clack/prompts — beautiful interactive setup with smart defaults and keyboard navigation
Choose from basic, moderation, or full — each preset wires up the right commands, events and utilities automatically
SQLite via better-sqlite3 or PostgreSQL via Drizzle ORM — economy commands adapt automatically to your chosen DB
TypeScript locale files (not JSON), useT() helper, /locale command with ManageGuild permission and guild-aware switching
Every generated command uses discord.js Components v2 — ContainerBuilder, TextDisplayBuilder and MessageFlags.IsComponentsV2
Add commands, events, buttons, modals, select menus and services to an existing project with a single command
Minimal setup — slash commands, event handler, TypeScript config
--template basicModeration + utility commands, cooldown system, Components v2
--template moderationEverything: economy, i18n, database, paginator, embed builder
--template fulldiscgen-cli g command <name>discgen-cli g event <name>discgen-cli g guard <name>discgen-cli g button <name>discgen-cli g select <name>discgen-cli g modal <name>discgen-cli g service <name>Works in any project
The generate command drops files into the correct folder relative to your current working directory. All output is TypeScript, typed and ready to use.
Run npx discgen-cli <name> and the interactive wizard guides you through command type, features and database in seconds
Select your template preset, enable features like economy or i18n, and choose SQLite or PostgreSQL — or none
Dependencies are installed automatically, git is initialized and your bot compiles with zero TypeScript errors out of the box
Yes. Choose 'Prefix', 'Slash', or 'Both' in the wizard. Prefix bots get a full messageCreate router using process.env.PREFIX, with the prefix commands loaded into client.prefixCommands.
One command. A fully-typed, production-ready Discord bot with everything already wired up.