Configuration
CodeLoop uses .codeloop/config.json in your project root for project-specific settings. This file is auto-generated by npx codeloop initbut can be customized.
Config File Location
your-project/
├── .codeloop/
│ ├── config.json # Main configuration
│ ├── baselines/ # Visual regression baselines
│ └── artifacts/ # Verification artifacts
├── .cursor/
│ └── mcp.json # Cursor MCP config (auto-generated)
└── .claude/
└── settings.local.json # Claude Code config (auto-generated)
Full Config Reference
{
"project_type": "auto",
"runners": {
"build": {
"command": "npm run build",
"timeout_ms": 60000
},
"lint": {
"command": "npm run lint",
"timeout_ms": 30000
},
"test": {
"command": "npm test",
"timeout_ms": 120000
}
},
"screenshots": {
"enabled": true,
"tool": "playwright",
"base_url": "http://localhost:3000",
"viewports": [
{ "name": "mobile", "width": 375, "height": 812 },
{ "name": "tablet", "width": 768, "height": 1024 },
{ "name": "desktop", "width": 1440, "height": 900 }
]
},
"gate_check": {
"min_confidence": 0.85,
"require_all_tests": true,
"allow_lint_warnings": true
},
"sections": {
"enabled": false,
"spec_file": ".codeloop/sections.json"
},
"visual_review": {
"threshold": 0.02,
"baseline_dir": ".codeloop/baselines"
}
}
Field Reference
| Field | Default | Description |
|---|
project_type | "auto" | Auto-detects from project files. Override: “flutter”, “react”, “nextjs”, “vue”, “angular” |
runners.build.command | Auto-detected | Build command to run |
runners.build.timeout_ms | 60000 | Build timeout in milliseconds |
runners.test.command | Auto-detected | Test command to run |
screenshots.enabled | true | Enable screenshot capture for UI projects |
screenshots.tool | "playwright" | Screenshot tool: “playwright” or “puppeteer” |
gate_check.min_confidence | 0.85 | Minimum confidence score to pass gate |
sections.enabled | false | Enable multi-section orchestration |
visual_review.threshold | 0.02 | Pixel diff threshold (0.02 = 2% change allowed) |
Platform-Specific Configuration
Flutter
{
"project_type": "flutter",
"runners": {
"build": { "command": "flutter build apk --debug" },
"test": { "command": "flutter test" }
},
"screenshots": {
"tool": "maestro",
"device": "Pixel_6_API_33"
}
}
React / Next.js
{
"project_type": "nextjs",
"runners": {
"build": { "command": "npm run build" },
"test": { "command": "npx jest" }
},
"screenshots": {
"tool": "playwright",
"base_url": "http://localhost:3000"
}
}
Vue / Nuxt
{
"project_type": "vue",
"runners": {
"build": { "command": "npm run build" },
"test": { "command": "npx vitest run" }
}
}
Environment Variables
| Variable | Required | Description |
|---|
CODELOOP_API_KEY | Yes | Your CodeLoop API key |
CODELOOP_OFFLINE | No | Set to true for offline/local-only mode |
CODELOOP_LOG_LEVEL | No | “debug”, “info”, “warn”, “error” (default: “info”) |
Next Steps