> ## Documentation Index
> Fetch the complete documentation index at: https://personal-ce79cb71.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Tools Configuration API — Manage BugViper Linter Settings

> GET and PUT endpoints to read and update your BugViper linter tool configuration. Manage Ruff, ESLint, and golangci-lint settings per repository.

These endpoints let you programmatically read and update the linter tool configuration for your account. BugViper supports three static analysis tools — Ruff (Python), ESLint (JavaScript/TypeScript), and golangci-lint (Go) — each of which can be independently enabled or disabled and pointed at a specific config file in your repository.

***

## GET /api/v1/tools/config

Returns the current linter tools configuration for the authenticated user. Use this endpoint to read the saved state before presenting an edit form.

**Authentication required:** Yes

```bash theme={null}
curl https://your-domain.com/api/v1/tools/config \
  -H "Authorization: Bearer <token>"
```

### Response

Returns a tools configuration object with one key per supported tool.

<ResponseField name="ruff" type="object">
  Configuration for the Ruff Python linter.

  <Expandable title="Ruff fields">
    <ResponseField name="enabled" type="boolean">
      Whether Ruff is active. When `false`, Ruff is skipped during both lint and full review runs.
    </ResponseField>

    <ResponseField name="configFile" type="string | null">
      Path to the Ruff config file in your repository (e.g., `pyproject.toml`, `ruff.toml`, `.ruff.toml`), or `null` to use Ruff's built-in defaults.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="eslint" type="object">
  Configuration for the ESLint JavaScript/TypeScript linter.

  <Expandable title="ESLint fields">
    <ResponseField name="enabled" type="boolean">
      Whether ESLint is active.
    </ResponseField>

    <ResponseField name="configFile" type="string | null">
      Path to the ESLint config file (e.g., `eslint.config.js`, `.eslintrc`, `.eslintrc.json`), or `null` to use ESLint's automatic config resolution.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="golangci_lint" type="object">
  Configuration for the golangci-lint Go linter.

  <Expandable title="golangci-lint fields">
    <ResponseField name="enabled" type="boolean">
      Whether golangci-lint is active.
    </ResponseField>

    <ResponseField name="configFile" type="string | null">
      Path to the golangci-lint config file (e.g., `.golangci.yml`, `.golangci.yaml`, `.golangci.toml`), or `null` to use golangci-lint's defaults.
    </ResponseField>
  </Expandable>
</ResponseField>

***

## PUT /api/v1/tools/config

Saves an updated linter tools configuration. The full configuration object must be provided in the request body — partial updates are not supported. Changes take effect on the next review run immediately.

**Authentication required:** Yes

### Request Body

<ParamField body="ruff.enabled" type="boolean" required>
  Set to `true` to enable Ruff, or `false` to disable it.
</ParamField>

<ParamField body="ruff.configFile" type="string | null" required>
  Path to the Ruff config file in your repository, or `null` to use Ruff's built-in defaults.
</ParamField>

<ParamField body="eslint.enabled" type="boolean" required>
  Set to `true` to enable ESLint, or `false` to disable it.
</ParamField>

<ParamField body="eslint.configFile" type="string | null" required>
  Path to the ESLint config file in your repository, or `null` to use ESLint's automatic config resolution.
</ParamField>

<ParamField body="golangci_lint.enabled" type="boolean" required>
  Set to `true` to enable golangci-lint, or `false` to disable it.
</ParamField>

<ParamField body="golangci_lint.configFile" type="string | null" required>
  Path to the golangci-lint config file in your repository, or `null` to use golangci-lint's defaults.
</ParamField>

```bash theme={null}
curl -X PUT https://your-domain.com/api/v1/tools/config \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "ruff": { "enabled": true, "configFile": null },
    "eslint": { "enabled": true, "configFile": ".eslintrc.json" },
    "golangci_lint": { "enabled": false, "configFile": null }
  }'
```

### Response

Returns the updated tools configuration object in the same shape as the [GET /api/v1/tools/config](#get-apiv1toolsconfig) response.

<Tip>
  Disabling a tool does not delete its `configFile` setting. If you re-enable the tool later, the previously saved config file path will be restored automatically.
</Tip>
