CIRCE / DOCUMENTATION
How it works
The lifecycle from circe start to a dispatched interaction, and what Circe deliberately does not do.
On this page
Circe owns the process. You supply declarations in known places; the CLI finds, validates and wires them.
Lifecycle
- Load
circe.config.tsand validate the environment schema. - Resolve integrations: their
setup()can add scan roots, lifecycle hooks and health checks. - Scan
scanRoot(default./src) by folder convention. - Validate every module’s shape and look for identity collisions. Failures are reported together and exit with code
1. - Start the transport: gateway login, HTTP server, or both.
- Dispatch each interaction through middleware, guards and your handler, inside a correlation scope.
circe build stops after step 4, without connecting to Discord.
Boundaries
- No dependency-injection container: pass dependencies with imports.
- No plugin system: integrations only add scan roots, lifecycle hooks and health checks.
- No wrapper over discord.js:
ctx.interactionis the real object.
Programmatic form
circe.config.ts compiles down to createCirce(options), which you can call yourself. See API.
