CodeLoop

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

FieldDefaultDescription
project_type"auto"Auto-detects from project files. Override: “flutter”, “react”, “nextjs”, “vue”, “angular”
runners.build.commandAuto-detectedBuild command to run
runners.build.timeout_ms60000Build timeout in milliseconds
runners.test.commandAuto-detectedTest command to run
screenshots.enabledtrueEnable screenshot capture for UI projects
screenshots.tool"playwright"Screenshot tool: “playwright” or “puppeteer”
gate_check.min_confidence0.85Minimum confidence score to pass gate
sections.enabledfalseEnable multi-section orchestration
visual_review.threshold0.02Pixel 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

VariableRequiredDescription
CODELOOP_API_KEYYesYour CodeLoop API key
CODELOOP_OFFLINENoSet to true for offline/local-only mode
CODELOOP_LOG_LEVELNo“debug”, “info”, “warn”, “error” (default: “info”)

Next Steps