CLI

glyria dev

Start your bot in development mode with hot reload.

Usage

npm run dev
# or
npx glyria dev

What it does

glyria dev starts your bot with hot reload — no manual restarts needed while you develop.

Hot reload behavior

glyria.js watches your files and reacts differently depending on what changed:

Changed fileBehavior
src/commands/**Hot reloads commands only — no restart
src/events/**Hot reloads events only — no restart
glyria.config.tsHot reloads config + regenerates types — no restart
autoImportDirs filesRegenerates types instantly — no restart
src/index.tsRegenerates types instantly — no restart
restartPaths filesFull bot restart
Any other src/** fileIgnored

This means editing a command or event is near-instant — the bot doesn't disconnect from Discord.

Type generation

Whenever a file in your auto-import folders changes, glyria.js automatically regenerates .glyria/imports.d.ts so your IDE stays in sync without running glyria generate manually.

This also runs when glyria.config.ts changes — in case you updated autoImportDirs.

Environment

glyria dev sets the following environment variables automatically:

NODE_ENV=development
GLYRIA_DEV=true

GLYRIA_DEV=true switches the command loader to use src/ and .ts files directly instead of dist/ — no build step needed in dev.

Anti double-trigger

glyria.js uses chokidar with a 200ms stability threshold per file — the watcher waits for the file to stop changing before reacting. This prevents double triggers caused by editors, ESLint, or Prettier writing the file multiple times on save.

TypeScript

Your TypeScript files are executed directly via tsx — no compilation needed during development. Just save and glyria.js handles the rest.

Copyright © 2026