sonamu-config

Installation
SKILL.md

Sonamu Configuration

Configuration lives in two places, both under the API package root. Sonamu calls that directory the api root; its parent is the app root, which is what api.dir and sync.targets are relative to.

File Holds
.env, .env.<environment>, .env.local connection values and secrets
src/sonamu.config.ts everything else, exported through defineConfig

Which config file actually runs

src/sonamu.config.ts is loaded only when HOT=yes (set by sonamu dev) or VITEST=true. Otherwise the runtime imports dist/sonamu.config.js. sonamu start therefore runs the built copy — editing the source config changes nothing there until sonamu build runs again.

defineConfig accepts an object, a promise, or a function returning either, so a config that has to await something is valid.

Installs
20
First Seen
Sep 18, 2026