Configuration
imugi can be configured via a config file, environment variables, or CLI flags.
Config File
Create imugi.config.json in your project root:
{ "comparison": { "threshold": 0.95, "maxIterations": 10 }, "rendering": { "port": 3000, "viewport": { "width": 1440, "height": 900 } }}Full Schema
{ "auth": { "apiKey": null, "oauth": true }, "comparison": { "threshold": 0.95, "maxIterations": 10, "improvementThreshold": 0.01, "patchSwitchThreshold": 0.7 }, "rendering": { "devServerCommand": null, "url": null, "port": 3000, "viewport": { "width": 1440, "height": 900 } }, "project": { "framework": "auto", "css": "auto", "language": "auto" }, "timeouts": { "overall": 1800, "pageLoad": 15, "devServer": 30 }, "figma": { "token": null, "defaultScale": 2 }}Environment Variables
| Variable | Description | Default |
|---|---|---|
ANTHROPIC_API_KEY | Anthropic API key | — |
IMUGI_API_KEY | Alternative API key | — |
IMUGI_THRESHOLD | Similarity threshold (0.8-0.99) | 0.95 |
IMUGI_MAX_ITERATIONS | Max iterations (1-50) | 10 |
IMUGI_PORT | Dev server port | 3000 |
FIGMA_TOKEN | Figma personal access token | — |
Priority Order
Settings are merged in this order (later overrides earlier):
- Defaults — Built-in default values
- Config file —
imugi.config.json - Environment variables —
IMUGI_* - CLI flags —
--threshold,--max-iterations, etc.