---
title: "Configuration"
canonical_url: "https://docs.getdx.com/ai-code-insights/configuration/"
md_url: "https://docs.getdx.com/ai-code-insights/configuration.md"
last_updated: "2026-05-08"
---

# Configuration
AI Code Insights measures how developers interact with AI coding agents, classifying each code change to give engineering leaders visibility into AI-assisted development. The daemon is configured through a combination of a local config file (or managed preferences on macOS) and admin controls in DX. This page covers all settings, admin controls, upgrade procedures, uninstallation, and the CLI.

## Configuration model

The daemon reads configuration from two sources:

- **Managed preferences (macOS and Windows):** On macOS, delivered via MDM Configuration Profile. On Windows, delivered via registry at `HKLM\SOFTWARE\GetDX\AICodeMetrics`. Recommended for enterprise deployments because the MDM protects credentials, keeping them inaccessible to the end user.
- **Config file:** A JSON file on each machine. Used for individual installs and non-macOS MDM deployments.

If both managed preferences and a config file are present, managed preferences take priority.

### Managed preferences

On macOS, MDM platforms deliver credentials via a Configuration Profile using the preference domain for AI Code Insights. See the [MDM installation](https://docs.getdx.com/ai-code-insights/mdm-installation/#configuration-delivery) guide for setup details.

On Windows, credentials can be delivered via the registry at `HKLM\SOFTWARE\GetDX\AICodeMetrics` using the same key names as the config file (`api_url`, `api_key`, `log_level`). Deploy via Intune, Group Policy, or your MDM platform.

### Config file

The config file is a JSON file at the following path:

| Platform | Config path                                |
| -------- | ------------------------------------------ |
| macOS    | `~/.aicodemetrics/config.json`             |
| Windows  | `%LOCALAPPDATA%\aicodemetrics\config.json` |
| Linux    | `~/.aicodemetrics/config.json`             |

Minimal configuration:

```json
{
    "api_url": "API_URL",
    "api_key": "API_TOKEN"
}
```

Your API URL and token are found under **Admin** -> [**AI Code Insights**](https://app.getdx.com/admin/ai-code-insights). The API token is shared across your organization and is scoped exclusively to AI Code Insights endpoints. If a token is compromised, rotate it from **Admin** -> [**AI Code Insights**](https://app.getdx.com/admin/ai-code-insights) without affecting other DX integrations.

> **Note**: The daemon automatically detects and applies changes to `auto_generated_patterns` without a restart. Changes to other settings (`api_url`, `api_key`, `log_level`) require a daemon restart.

## Settings reference

### `api_url`

Your organization's DX API URL. Required.

### `api_key`

Your organization's AI Code Insights API token. Required.

### `log_level`

Controls daemon log verbosity. Valid values: `debug`, `info`, `warn`, `error`. Defaults to `info`. Can also be set via the `AI_CODE_METRICS_LOG_LEVEL` environment variable, which takes precedence over the config file.

```json
{
  "log_level": "debug"
}
```

### `auto_generated_patterns`

Glob patterns to exclude auto-generated files (build artifacts, scaffolded code) from AI classification. Changes to files matching these patterns are not classified.

```json
{
    "auto_generated_patterns": [
        "generated/**",
        "**/generated/*.go",
        "**/*.pb.go"
    ]
}
```

Patterns are relative to the repository root and use standard glob syntax. Auto-generated patterns can also be configured centrally — see [DX admin controls](#dx-admin-controls).

### `url_rewrites`

Maps internal or mirror repository URLs to their canonical equivalents before URL matching. Useful when developers clone from an internal host but DX tracks repositories under a different URL.

Rules are an ordered list of prefix replacements:

```json
{
  "url_rewrites": [
    {
      "match": "git@code.example.internal:",
      "replace": "https://github.com/example-org/"
    }
  ]
}
```

With this rule, a repo cloned as `git@code.example.internal:my-service` is treated as `https://github.com/example-org/my-service` during matching.

### `disable_clipboard_monitoring`

Set to `true` to prevent the daemon from reading clipboard contents. When disabled, the clipboard detector is not started and clipboard contents are never read. Behavioral analysis continues using typing cadence and editing patterns alone.

```json
{
  "disable_clipboard_monitoring": true
}
```

### Watch manager

The daemon enforces a limit on the number of simultaneously monitored repositories to manage resource usage. When the number of active repositories exceeds the limit, the watch manager pauses monitoring of the least recently active repositories. Monitoring resumes automatically when a paused repository becomes active again.

Organizations with a large number of repos per developer may need to adjust this limit. Contact your DX account team for guidance.

## DX admin controls

These settings are managed from **Admin** -> [**AI Code Insights**](https://app.getdx.com/admin/ai-code-insights) in DX.

- **Enable AI Code Insights:** Turns the feature on for the workspace.
- **Transcript visibility:** Controls whether session transcripts are captured and who can view them. Options: off (no transcripts captured), admins only, or all users. Transcript capture is off by default. [Agent Experience](https://docs.getdx.com/reports/agent-experience-score/) requires transcript capture to be enabled.
- **Auto-generated file patterns (central):** Glob patterns applied to all developers in the organization. The daemon fetches these on startup and hourly thereafter. Central patterns combine with any local patterns set in the config file.
- **Regenerate API token:** Rotates the API token used by all daemons. After rotation, deploy the new token to all machines.

## Agent integrations

The daemon automatically detects and installs native integrations for [supported AI coding agents](https://docs.getdx.com/ai-code-insights/overview/#supported-agents). The daemon periodically polls for new agents, so if a developer installs a new agent, integrations are set up automatically.

To manually remove hooks and plugins from all agent configurations:

```bash
aicodemetricsd uninstall-hooks
```

## Monitoring client versions

Use the **Client versions** panel on **Admin** -> [**AI Code Insights**](https://app.getdx.com/admin/ai-code-insights) to track which daemon version each developer is running.

The **Client versions** section displays a status indicator:

- **Up to date:** Every developer with recent commit activity is running the current daemon version.
- **N out of date:** N developers are running an older version or an unknown version.

Click **View client versions** to open a detailed table of every developer who has pushed a commit in the last 6 months. Each row shows the developer's email, name, daemon version, and last commit date.

Click **Download CSV** to export the current view — including any active filters and search — as a CSV file. The export runs in the background; DX notifies you when the file is ready.

## Upgrades

DX cannot push daemon updates directly to developer machines. Use [Client versions](#monitoring-client-versions) to identify developers running an older daemon before starting a rollout.

1. DX publishes a new installer (announced via release notes or your account manager).
1. Download the updated installer from **Admin** -> [**AI Code Insights**](https://app.getdx.com/admin/ai-code-insights).
1. Deploy via your MDM platform or have developers run the installer manually. The installer updates the daemon in place.

No configuration changes are required for version updates — the existing config file is preserved.

## Uninstallation

See [Uninstallation](https://docs.getdx.com/ai-code-insights/uninstallation/) for platform-specific removal steps.

## CLI reference

| Command                          | Description                                                     |
| -------------------------------- | --------------------------------------------------------------- |
| `aicodemetricsd status`          | Show daemon status, monitored repositories, and Watchman status |
| `aicodemetricsd restart`         | Restart the daemon via the system service manager               |
| `aicodemetricsd uninstall-hooks` | Remove hooks and plugins from all agent configurations          |
| `aicodemetricsd --version`       | Print version information                                       |
---

## Sitemap

[Overview of all docs pages](/llms.txt)
