Configuration reference

Configure the AI Code Insights daemon with a local JSON file or managed settings, then use DX admin controls for organization-wide collection behavior. Use this reference for identity, repository matching, exclusions, session scope, and command-line operations.

Configuration model

The daemon reads configuration from two sources:

  • Managed configuration: MDM or endpoint-managed settings on macOS and Windows. Recommended for enterprise deployments.
  • Config file: A JSON file on macOS, Windows, or Linux. Used for individual installs and managed Linux deployments.

If both managed configuration and a config file are present, managed values take priority. The local log_level value is the exception: it always wins so developers can adjust logging during troubleshooting.

Managed configuration

Deliver managed settings before installing the daemon so it can connect to DX on its first start.

  1. macOS
  2. Windows

Deliver a Configuration Profile under the com.getdx.aicodemetrics preference domain.

Use the downloadable Configuration Profile example as a starting point. Replace the credential placeholders, organization name, and both payload UUIDs before deploying it through your MDM.

Deliver api_url, api_key, email, and log_level as REG_SZ values under HKLM\SOFTWARE\GetDX\AICodeMetrics. Use Intune, Group Policy, or another endpoint-management tool.

See Enterprise deployment for the complete deployment workflow.

Config file

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

  1. macOS and Linux
  2. Windows
~/.aicodemetrics/config.json
%LOCALAPPDATA%\aicodemetrics\config.json

Recommended configuration:

{
    "api_url": "API_URL",
    "api_key": "API_TOKEN",
    "email": "developer@example.com"
}

Your API URL and token are found under AdminAI Code Insights. The API token is shared across your organization and is scoped exclusively to AI Code Insights endpoints. See Credential lifecycle for storage and rotation guidance.

For an individual install, use the login command to create or update these credential fields through a browser or manual prompt. The command does not override credentials supplied by managed configuration.

Note: The daemon automatically detects and applies local changes to auto_generated_patterns without a restart. Changes to other local settings require a daemon restart. DX admin settings are applied separately when the daemon fetches them from DX.

Settings reference

api_url

Your organization’s DX API URL. Required.

api_key

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

email

Explicitly sets the developer’s DX user email for session and commit attribution. This setting is recommended whenever you can provide a per-user value through MDM or the config file.

When email matches a user in DX, AI Code Insights can link sessions and commits directly to that user. The configured value takes priority over email values supplied by agent hooks and over git config user.email, which can vary by repository, Git account, or over time. If email is not set, the daemon falls back to agent-provided email when available, then repo-local and global Git config.

log_level

Controls daemon log verbosity. Valid values: trace, debug, info, warn, error. Defaults to debug. The local config value takes precedence over managed configuration so developers can adjust logging during troubleshooting.

{
  "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.

{
    "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.

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:

{
  "url_rewrites": [
    {
      "match": "https://bitbucket.example.com/",
      "replace": "https://github.com/"
    }
  ]
}

With this rule, a repo cloned as https://bitbucket.example.com/example-org/my-service is treated as https://github.com/example-org/my-service during matching.

For more complex transformations, set "type": "regex" to evaluate match as a regular expression. Reference capture groups in replace using $1, $2, and so on.

{
  "url_rewrites": [
    {
      "type": "regex",
      "match": "^https://bitbucket\\.example\\.com/projects/([^/]+)/([^/]+)$",
      "replace": "https://github.com/example-org/$1/projects/$2"
    }
  ]
}

With this rule, https://bitbucket.example.com/projects/backend/my-service is rewritten to https://github.com/example-org/backend/projects/my-service during matching.

Rules are applied in order, and the first rule whose pattern matches wins — later rules are not applied. Rewrites apply to both API-returned URLs and the local remote.origin.url.

additional_session_directories

A list of ancestor directories under which AI sessions are captured, in addition to the repositories DX monitors via the API. This applies to session metrics only. A session launched from an additional session directory is not eligible for code attribution, even when it edits a file inside a monitored repository. Start the agent inside the monitored repository to capture code attribution.

{
  "additional_session_directories": ["~/experiments/", "/some/other/path/"]
}

Use the local setting for paths that apply to one machine or deployment group. For organization-wide paths, use Additional session directories under DX admin controls. The daemon combines centrally configured paths with the local list.

enable_devin_session_tracking

When true, the daemon tracks Devin sessions. Defaults to false. Devin has a dedicated flag because its hooks do not provide a working directory, so the daemon cannot distinguish sessions within a monitored repo. Enabling this setting tracks all Devin sessions; leaving it disabled tracks none.

{
  "enable_devin_session_tracking": true
}

log_path_names

When true, the daemon includes filesystem paths in debug log output. Defaults to false to avoid exposing sensitive directory names in logs.

{
  "log_path_names": true
}

DX admin controls

These settings are managed from AdminAI Code Insights in DX.

  • Enable AI Code Insights: Turns the feature on for the workspace.
  • Automatic daemon updatesEnable auto-updates: Enables account-wide updates for macOS and Windows installations using the 0.7.0 or newer installer, and Linux installations using the 0.7.2 or newer installer. See Automatic updates.
  • Transcripts & Agent Experience: Enables server-side transcript storage and evaluation for Agent Experience and transcript-powered sections of AI effectiveness. See Transcript handling for access, processing, and query controls.
  • Auto-generated file patterns (central): Applies exclusion patterns to every developer. A non-empty central list replaces the local list; the local auto_generated_patterns value is used when the central list is empty.
  • Additional session directories: Captures AI sessions started outside monitored repositories. Enter one literal directory path per line. Account-wide paths are combined with paths configured locally on each machine. This affects session capture only; sessions launched from these directories are not eligible for code attribution.
  • Regenerate API token: Rotates the API token used by all daemons. See Credential lifecycle.

CLI reference

The daemon CLI manages authentication, diagnostics, the background service, and coding-agent integrations.

On Windows, run these commands through the MSI-installed aicodemetrics.cmd wrapper. Invoking aicodemetricsd.exe directly from PowerShell can return control to the shell before an interactive command finishes.

If aicodemetrics.cmd is missing — for example, on an installation that has only received automatic daemon updates — run the current MSI over the existing installation, or see Troubleshooting.

login

Configure API credentials through a browser or manual prompt.

  1. macOS and Linux
  2. Windows
aicodemetricsd login
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" login

status

Show daemon health, monitored repositories, configuration sources, automatic-update authorization and state, and agent-integration status.

  1. macOS and Linux
  2. Windows
aicodemetricsd status
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" status

report

Create a zip containing status output and diagnostic logs in the current directory. Review the bundle before sharing it. See Troubleshooting.

  1. macOS and Linux
  2. Windows
aicodemetricsd report
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" report

restart

Restart the daemon through the operating system’s service manager.

  1. macOS and Linux
  2. Windows
aicodemetricsd restart
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" restart

install-hooks

Install or repair integrations for detected coding agents. See Agent integrations for targeting one agent.

  1. macOS and Linux
  2. Windows
aicodemetricsd install-hooks
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" install-hooks

uninstall-hooks

Remove daemon-managed integrations from all coding agents without uninstalling the daemon. See Agent integrations for targeting one agent.

  1. macOS and Linux
  2. Windows
aicodemetricsd uninstall-hooks
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" uninstall-hooks

version

Print the installed daemon version.

  1. macOS and Linux
  2. Windows
aicodemetricsd --version
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" --version