Skip to main content
CommandKit is the discord.js meta-framework that eliminates boilerplate and lets you focus on building your bot. Think Next.js for Discord bots — convention-based routing, zero-config TypeScript/JSX, hot-reloading, and a powerful CLI that handles the heavy lifting.

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 in src/app/events/ and it’s an event listener.
  • Zero-config CLI: Run commandkit dev and everything just works — bundling, TypeScript/JSX compilation, hot-reloading, command registration, all automatic.
  • Export-based API: Export a chatInput function and it handles slash commands. Export a message function 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 (ActionRowBuilderButtonBuildersetCustomId → …) 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 get onClick. 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/i18n for localization
  • @commandkit/analytics for usage tracking
  • @commandkit/cache for caching with Redis support
  • @commandkit/ai for AI-powered command execution

Zero-config TypeScript and JavaScript

Native TypeScript and JSX support with no configuration. No tsconfig.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.
CommandKit isn’t overhead — it’s the setup work you’d do anyway, already done well.

Next steps

Installation

Set up your first CommandKit project

Quickstart

Build and run your first bot in minutes

Build docs developers (and LLMs) love