create-commandkit. The CLI will scaffold a complete project structure and configure everything you need to start building your bot.
Prerequisites
Before you begin, make sure you have Node.js installed on your system.CommandKit requires Node.js 24 or higher. Check your version with
node -v.Create a new project
The fastest way to get started is withcreate-commandkit, which scaffolds a complete CommandKit project with a single command:
Setup wizard
The CLI will guide you through the setup process with interactive prompts:Choose a project directory
Enter the name of your project directory, or leave blank to use the current directory.
Provide your Discord bot token (optional)
You can enter your Discord bot token now, or add it later to the
.env file. The token is securely stored in .env and never committed to version control.create-commandkit will:
- Download the project template
- Create a
.envfile with your bot token - Install all dependencies automatically
- Initialize a Git repository (if selected)
Additional options
The CLI supports several flags for automated setup:Project structure
Once installation is complete, your project will have the following structure:Key directories
src/app/commands/: All your bot commands. Each file exports command handlers.src/app/events/: Event listeners organized by event name. Each subdirectory corresponds to a Discord.js event.src/app.ts: Your Discord.js client instance with intents and configuration.commandkit.config.ts: CommandKit framework configuration (mostly optional).
The
src/app/ directory structure follows convention-based routing. Files placed in commands/ are automatically registered as commands. Files in events/[eventName]/ are registered as listeners for that event.What’s included
Your new project comes with:- Example ping command that responds to
/ping(slash) and!ping(prefix) - Example ready event that logs when the bot starts
- Zero-config TypeScript setup with full type safety
- Development scripts for running and building your bot
- Environment variable management with
.env
Next steps
Quickstart
Learn how to run your bot and create your first command