CommandKit Configuration
CommandKit CLI can be configured using commandkit.config
file in the root of your project directory (for example, by package.json
). You can use either of the following files:
commandkit.config.js
commandkit.config.mjs
commandkit.config.cjs
commandkit.config.ts
Throughout this guide, we'll be using commandkit.config.ts
as an example.
The following is the sample configuration required to run your bot:
commandkit.config.ts
import { defineConfig } from 'commandkit';
export default defineConfig({});
Options
The following options are available in the configuration file:
plugins
: An array of commandkit plugins to use in your project. CommandKit plugins may add compile time or runtime features to your project.esbuildPlugins
: An array of esbuild plugins to use in your project. This is useful if you want to use esbuild plugins in your project.compilerOptions
: An object containing compiler options for your project.compilerOptions.macro.development
: When set totrue
, it enables macro compilation during development.compilerOptions.cache.development
: When set totrue
, it enablesuse cache
directive during development.distDir
: The output directory for the build. By default, it is set todist
.env
: An object containing static environment variables definitions.typedCommands
: A boolean value that enables type definitions generation for commands during development.typedLocales
: A boolean value that enables locales autocompletion during development.