Why CommandKit?
Every new discord.js project starts the same way: write a command handler, write an event handler, set up interaction collectors, register slash commands with the API, figure out a project structure. It’s hours of boilerplate before you write any real bot logic. Most existing discord.js frameworks solve this by giving you a handler class you instantiate and point at a folder — and that’s about it. They’re loaders, not frameworks. Others go further and have decent features, but require heavy OOP boilerplate where everything is a class extending a base class. CommandKit takes a different approach entirely. It works like a proper meta-framework with:- Convention over configuration: Put a file in
src/app/commands/and it’s a command. Put a file insrc/app/events/and it’s an event listener. - Zero-config CLI: Run
commandkit devand everything just works — bundling, TypeScript/JSX compilation, hot-reloading, command registration, all automatic. - Export-based API: Export a
chatInputfunction and it handles slash commands. Export amessagefunction in the same file and it handles prefix commands too. No registration calls, no base classes, no decorators.
Key features
File-based routing
Drop command files in a folder, export a function, and they just work. Commands are automatically registered and kept in sync with Discord.
JSX components
Write Discord UI in JSX instead of messy builder chains. Clean, declarative syntax for buttons, modals, and embeds.
Built-in handlers
Buttons get
onClick. Modals get onSubmit. No more InteractionCollector setup, timeout management, or cleanup boilerplate.Zero-config TypeScript
Native TypeScript and JSX support with no configuration. No tsconfig fiddling, no separate build step.
What makes it different
Automatic command and event handling
Drop your command files in a folder, export a function, and they just work. Slash commands, context menu commands, and prefix commands are all supported under a single unified command structure — no separate handler for each type. Commands are automatically registered and kept in sync with Discord. Events work the same way: create a file, export a listener, and CommandKit handles the rest.JSX components for Discord UI
discord.js builder chains (ActionRowBuilder → ButtonBuilder → setCustomId → …) get messy fast. CommandKit lets you write Discord components in JSX — the same declarative syntax used in React — so your UI code is clean and readable.
Built-in component handlers
Buttons getonClick. Modals get onSubmit. Select menus get onSelect. Define a component and its behavior in one place — no InteractionCollector setup, no timeout management, no cleanup boilerplate.
Command middlewares
Run logic before or after any command executes — permission checks, cooldowns, logging, analytics — without touching the command itself. A proper middleware layer, like you’d find in Express.Unified prefix commands
Message-based (prefix) commands live in the same file as your slash commands and context menus. One command file handles all input types. No separate handler needed.Plugin system with custom events
Extend CommandKit through plugins that hook into the framework lifecycle. Plugins can emit custom events — for example, listening to an external webhook and firing events your bot can react to. Official plugins include:@commandkit/i18nfor localization@commandkit/analyticsfor usage tracking@commandkit/cachefor caching with Redis support@commandkit/aifor AI-powered command execution
Zero-config TypeScript and JavaScript
Native TypeScript and JSX support with no configuration. Notsconfig.json fiddling, no separate build step, no bundler setup. The CLI handles compilation, bundling, hot-reloading, and project scaffolding.
Who is this for?
Beginners
Don’t spend hours building handlers before you can do anything useful. Start building features immediately.
Experienced developers
Tired of rebuilding the same boilerplate for every new bot project. Jump straight to the logic that matters.
Teams and freelancers
Need a reliable, structured foundation to build on quickly. CommandKit has been used in production client projects.
Next steps
Installation
Set up your first CommandKit project
Quickstart
Build and run your first bot in minutes