Environment Variables Reference
| Variable | Required? | Default | Consumed in | Purpose |
|---|---|---|---|---|
OPEN_DEVTOOLS | Optional | unset (devtools closed) | src/core/src/lib.rs (setup hook) | Set to "true" to auto-open the webview devtools window on launch |
DATABASE_URL | Optional (only for sqlx CLI usage) | none | Not read by the app itself; only used by the sqlx CLI for migrations/CLI tooling | Points sqlx migrate/sqlx database commands at the real imh.db file — see Troubleshooting |
Notes
- Frontend variables must be prefixed with
VITE_to be exposed to the Vite/React bundle; anything without that prefix is invisible toimport.meta.env. - The Writing module's AI grading feature needs no environment variables — credentials are configured at runtime from Admin → AI Configurations and stored encrypted in the local SQLite database. See Installation & Local Setup.
OPEN_DEVTOOLSandDATABASE_URLare shell environment variables (notVITE_-prefixed), since they're consumed by the Rust process / CLI tooling, not the frontend bundle.- No secrets should ever be committed — use
.env.local(gitignored), never.envor source-controlled config, for real API keys.