CLI Reference
All djs-core dev CLI commands in one place.
The @djs-core/dev package ships a single CLI: djs-core. Most commands accept -p, --path <path> to target another project root (default: .).
Development
djs-core dev
Run the bot with hot reload for handlers under src/.
djs-core devdjs-core dev --path ./apps/my-botReloads commands, buttons, modals, select menus, context menus, events, and cron tasks when files change. Restart manually after editing djs.config.ts.
djs-core start
Run the bot from TypeScript sources without hot reload.
djs-core startLoads src/ dynamically — same as dev, but no file watcher. Does not run the dist/ bundle. For production, use Bundle.
Build
djs-core build
Create a production artifact in dist/. See Bundle for details.
djs-core build --bundleddjs-core build --externaldjs-core build --compiledjs-core build --dockerdjs-core build --bundled --outdir release --no-minify| Flag | Description |
|---|---|
--bundled |
Single-file Bun bundle |
--external |
Bundle with external node_modules |
-c, --compile |
Native executable |
--docker |
Bundle + generated Dockerfile |
-o, --outdir <dir> |
Output folder (default: dist) |
--no-minify |
Disable minification |
Scaffolding
djs-core generate <type> <name>
Create a new handler file with a lint-friendly template. Alias: djs-core g.
djs-core generate command pingdjs-core generate button shop/buydjs-core generate modal feedbackdjs-core generate select pick-colordjs-core generate event messageCreatedjs-core generate context user/profiledjs-core generate command admin --force # overwrite existing file| Type | Output path |
|---|---|
command |
src/interactions/commands/<name>.ts |
context |
src/interactions/contexts/<name>.ts |
button |
src/components/buttons/<name>.ts |
modal |
src/components/modals/<name>.ts |
select |
src/components/selects/<name>.ts |
event |
src/events/<name>.ts |
Nested names like shop/buy create subfolders. Paths are sanitized — traversal outside the project root is rejected.
djs-core list
Print every detected route and its source file.
djs-core listUseful to verify routing after adding files or to debug missing handlers.
Quality
djs-core check
Lint src/**/*.ts for djs-core anti-patterns. See Lint.
djs-core checkdjs-core check --fixdjs-core check --rule no-ephemeraldjs-core test
Run bun test in the project root.
djs-core testdjs-core test src/interactions/commandsFor handler testing helpers, see Testing.
Database
djs-core db <action>
Drizzle helpers synced from djs.config.ts. See Database.
djs-core db initdjs-core db generatedjs-core db migratedjs-core db pushdjs-core db studiodjs-core db pullRequires a db: block in djs.config.ts (except init, which scaffolds db/ first).
Types & plugins
djs-core generate-config-types
Regenerate .djscore/ types from config.json, plugins, and database config.
djs-core generate-config-typesRuns automatically during dev, build, and start when needed.
djs-core plugin <action> <name>
djs-core plugin install demo # installs @djs-core/plugin-demodjs-core plugin install @scope/pkg # full package name also worksdjs-core plugin postinstall demoinstall runs bun add, patches djs.config.ts when possible, and runs the plugin postinstall hook. See Plugins.
Add scripts in package.json for the commands you use daily — dev, build, check, and test cover most workflows.