glyria dev
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 file | Behavior |
|---|---|
src/commands/** | Hot reloads commands only — no restart |
src/events/** | Hot reloads events only — no restart |
glyria.config.ts | Hot reloads config + regenerates types — no restart |
autoImportDirs files | Regenerates types instantly — no restart |
src/index.ts | Regenerates types instantly — no restart |
restartPaths files | Full bot restart |
Any other src/** file | Ignored |
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.

