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. Set prefer_local_config to true in the config file when local values should override managed configuration.
Managed configuration
Deliver managed settings before installing the daemon so it can connect to DX on its first start.
For personal-token deployments, omit api_key. Each developer must complete browser login before the daemon can upload data.
Deliver a Configuration Profile under the com.getdx.aicodemetrics preference domain.
Use the downloadable Configuration Profile example as a starting point. Replace INSERT api_url, INSERT api_key, INSERT your_organization, INSERT unique_uuid, and INSERT unique_uuid_2 before deploying it through your MDM. Set $EMAIL to a per-user value when your MDM supports variable substitution, or remove the email key.
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:
~/.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 Admin → AI 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 a personal token, use the browser flow in login. It saves user_api_key locally and sets api_url when not already set.
Note: The daemon automatically detects and applies local changes to
auto_generated_patternswithout 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 when using an organization-wide token for all daemon instances.
user_api_key
The personal access token saved by browser login. This field is read from the local config file only and takes precedence over api_key, including an organization token supplied by MDM. An expired or revoked personal token does not trigger a fallback to the organization token. Run login again to reconnect, or remove user_api_key from the config file to return to using the organization credential.
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.
trace: Most verbose. Includes deep diagnostic detail intended for short-lived support investigations.debug: Verbose operational detail for normal troubleshooting (default).info: High-level daemon lifecycle and expected operations.warn: Potential problems that do not stop the daemon.error: Failures that prevent an operation from completing.
Default is debug so installation and integration issues are visible without requiring a separate config change first. If you need less log volume in steady state, set info, warn, or error.
The local config value takes precedence over managed configuration so developers can adjust logging during troubleshooting.
{
"log_level": "debug"
}
auto_generated_patterns
Patterns that mark auto-generated files (build artifacts, scaffolded code) so the files are not attributed to AI or to developers. Lines in matching files are counted as generated: they are left out of AI and human line counts and the AI percentage, but still appear in total Git churn.
{
"auto_generated_patterns": [
"generated/**",
"**/generated/*.go",
"**/*.pb.go"
]
}
Patterns are relative to the repository root and use .gitignore syntax. They are added to the daemon’s built-in patterns. To re-include files that a built-in pattern marks, so they are attributed normally, add a negation pattern that starts with an exclamation mark:
{
"auto_generated_patterns": [
"!**/venv/**"
]
}
The daemon reads this setting only from the config file; managed configuration does not supply it. When the central auto-generated file patterns list in DX is not empty, the daemon uses the central list instead, and the local list has no effect, including any negation patterns in it.
Built-in auto-generated patterns
The daemon treats these paths as auto-generated by default. Local or central patterns are added to them, and a negation pattern in the effective list can re-include a path.
- Dependency directories:
**/node_modules/**,**/.pnpm-store/**,**/.pnpm/**,**/.yarn/cache/**,**/.yarn/unplugged/** - Lock files:
**/yarn.lock,**/package-lock.json,**/pnpm-lock.yaml,**/Gemfile.lock,**/poetry.lock,**/Cargo.lock,**/go.sum,**/composer.lock,**/Pipfile.lock,**/mix.lock - Caches:
**/.cache/**,**/__pycache__/**,**/.pytest_cache/**,**/.mypy_cache/**,**/.ruff_cache/**,**/.hypothesis/** - Virtual environments:
**/.venv/**,**/venv/**,**/.virtualenv/**,**/.tox/**,**/.nox/**,**/.direnv/**,**/__pypackages__/** - Tool state:
**/.gradle/**,**/.terraform/**
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.
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 reliable working directory. The daemon cannot consistently scope Devin sessions to monitored repositories, so this is an explicit opt-in:
false(default): no Devin sessions are tracked.true: Devin sessions are tracked, including sessions outside monitored repositories.
Set this only after confirming the broader capture scope with your security or compliance stakeholders.
This setting controls session capture scope. Code attribution still requires edits or commands to target files inside monitored repositories.
{
"enable_devin_session_tracking": true
}
You can enable this setting in the same place you manage other daemon configuration:
Set in the local config file:
- macOS and Linux:
~/.aicodemetrics/config.json - Windows:
%LOCALAPPDATA%\aicodemetrics\config.json
Set enable_devin_session_tracking to true in the com.getdx.aicodemetrics Configuration Profile payload.
Set enable_devin_session_tracking under HKLM\SOFTWARE\GetDX\AICodeMetrics as a non-zero integer value (for example, REG_DWORD = 1).
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
}
prefer_local_config
When true, values in the config file override the same settings from managed configuration. Use this to override MDM-delivered values with the local config file. Defaults to false. The setting is read from the config file only.
{
"prefer_local_config": true
}
Fields that the config file does not set still come from managed configuration.
push_verification
How the daemon confirms that a commit reached a remote. Valid values: auto, local. Defaults to auto.
autochecks the clone’s remote-tracking refs, then runsgit ls-remotewhen those refs do not cover the commit.localnever runsgit ls-remote. A commit is confirmed only from the clone’s remote-tracking refs. Use this when the remote requires an interactive credential on every connection.
{
"push_verification": "local"
}
An unrecognized value is treated as auto.
DX admin controls
These settings are managed from Admin → AI Code Insights in DX.
- Enable AI Code Insights: Turns the feature on for the workspace.
- Automatic daemon updates → Enable 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 scrubbed message upload from the daemon, plus server-side transcript storage and evaluation for Agent sessions and Agent effectiveness, including Agent Experience Score. See Transcript handling for access, processing, and query controls.
- Auto-generated file patterns (central): Applies auto-generated file patterns to every developer. A non-empty central list replaces each developer’s local
auto_generated_patternsand applies together with the daemon’s built-in patterns. The local value is used only when the central list is empty. Add a.gitignore-style negation pattern to re-include files that a built-in pattern marks. - 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 organization token used by daemons configured with that credential. Personal tokens are managed separately in each developer’s settings. 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.
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.
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.
aicodemetricsd report
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" report
restart
Restart the daemon through the operating system’s service manager.
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.
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.
aicodemetricsd uninstall-hooks
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" uninstall-hooks
version
Print the installed daemon version.
aicodemetricsd --version
& "$env:ProgramFiles\AICodeMetrics\aicodemetrics.cmd" --version