{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://cdn.jsdelivr.net/npm/@tscircuit/cli/types/tscircuit.config.schema.json",
  "title": "TSCircuit Config",
  "type": "object",
  "additionalProperties": false,
  "properties": {
    "$schema": {
      "type": "string",
      "format": "uri",
      "description": "JSON schema reference for the config file."
    },
    "mainEntrypoint": {
      "type": "string",
      "description": "Entry file for the circuit project."
    },
    "libraryEntrypoint": {
      "type": "string",
      "description": "Alias for mainEntrypoint used as the TypeScript library entry file."
    },
    "previewComponentPath": {
      "type": "string",
      "description": "Optional component path used for previews."
    },
    "siteDefaultComponentPath": {
      "type": "string",
      "description": "Default component path to show in generated static sites."
    },
    "ignoredFiles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "File globs to ignore."
    },
    "includeBoardFiles": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "File globs to include as board files."
    },
    "snapshotsDir": {
      "type": "string",
      "description": "Directory path for storing snapshots."
    },
    "pcbSnapshotSettings": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "showCourtyards": {
          "type": "boolean",
          "description": "Whether to show courtyard outlines in PCB snapshots."
        },
        "showPcbNotes": {
          "type": "boolean",
          "description": "Whether to show PCB notes in PCB snapshots."
        },
        "showFabricationNotes": {
          "type": "boolean",
          "description": "Whether to show fabrication notes in PCB snapshots."
        }
      },
      "description": "Settings for PCB snapshot rendering."
    },
    "prebuildCommand": {
      "type": "string",
      "description": "Command to run before builds."
    },
    "buildCommand": {
      "type": "string",
      "description": "Override command used for cloud builds."
    },
    "kicadProjectEntrypointPath": {
      "type": "string",
      "description": "Entry file for KiCad project generation (.kicad_pro, .kicad_sch, .kicad_pcb)."
    },
    "kicadLibraryEntrypointPath": {
      "type": "string",
      "description": "Entry file for KiCad footprint library generation."
    },
    "kicadLibraryName": {
      "type": "string",
      "description": "Name for the generated KiCad library. Falls back to package.json name, then directory name."
    },
    "alwaysUseLatestTscircuitOnCloud": {
      "type": "boolean",
      "description": "Always use the latest TSCircuit version when building on the cloud."
    },
    "build": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "circuitJson": {
          "type": "boolean",
          "description": "Enable circuit JSON output in build."
        },
        "kicadProject": {
          "type": "boolean",
          "description": "Enable KiCad project output (.kicad_pro, .kicad_sch, .kicad_pcb) in build."
        },
        "kicadLibrary": {
          "type": "boolean",
          "description": "Enable KiCad library output in build."
        },
        "kicadPcm": {
          "type": "boolean",
          "description": "Enable KiCad PCM (Plugin and Content Manager) assets output in build."
        },
        "previewImages": {
          "type": "boolean",
          "description": "Enable preview image outputs in build."
        },
        "glbs": {
          "type": "boolean",
          "description": "Enable GLB 3D model outputs for each circuit in build."
        },
        "step": {
          "type": "boolean",
          "description": "Enable STEP 3D model outputs for each circuit in build."
        },
        "workerTimeoutMs": {
          "type": "number",
          "minimum": 1,
          "multipleOf": 1,
          "description": "Timeout in milliseconds for each build worker job."
        },
        "routingDisabled": {
          "type": "boolean",
          "description": "Disable routing during circuit generation in build."
        },
        "typescriptLibrary": {
          "type": "boolean",
          "description": "Enable TypeScript library output in build."
        }
      },
      "description": "Build output toggles."
    }
  }
}
