Skip to content

Extension Settings

The Contox VS Code extension provides 7 configurable settings. Access them from Settings (Ctrl+, or Cmd+,) and search for "Contox", or edit your settings.json directly.

All settings

SettingTypeDefaultDescription
contox.apiUrlstring"https://contox.dev"Contox API base URL
contox.autoSyncbooleantrueAutomatically sync contexts on save
contox.capture.enabledbooleantrueEnable automatic git event capture
contox.capture.excludePatternsstring[]See belowFile patterns to exclude from capture
contox.capture.includeDiffsbooleantrueInclude compact code diffs in captured commits
contox.capture.anonymizeDiffsbooleanfalseStrip code content from captured diffs
contox.hmacSecretstring""HMAC secret for V2 API signing

Setting details

contox.apiUrl

json
{
  "contox.apiUrl": "https://contox.dev"
}

The base URL for the Contox API. You should not need to change this unless you are running a self-hosted Contox instance.

contox.autoSync

json
{
  "contox.autoSync": true
}

When enabled, the extension automatically syncs the context tree sidebar when the workspace loads and when changes are detected. Disable this if you prefer to sync manually using the Contox: Sync Contexts command.

contox.capture.enabled

json
{
  "contox.capture.enabled": true
}

Controls whether the git watcher is active. When enabled, the extension automatically captures git commits, file saves, and active editor files in the background. When disabled, no events are captured or sent to the API.

Disabling capture does not affect session polling or the context tree -- only the event capture system is paused.

contox.capture.excludePatterns

json
{
  "contox.capture.excludePatterns": [
    "*.env",
    "*.key",
    "*.pem",
    "*.p12",
    "*.pfx",
    "node_modules/**",
    ".git/**",
    "dist/**"
  ]
}

File patterns to exclude from capture. Files matching these patterns are excluded from:

  • File save tracking
  • Commit file lists
  • Active editor file tracking

Two pattern formats are supported:

  • *.ext -- Matches files ending with the specified extension (for example, *.env matches database.env)
  • dir/** -- Matches all files under the specified directory (for example, node_modules/** matches node_modules/lodash/index.js)
Warning

The default patterns exclude common secret file types (.env, .key, .pem, .p12, .pfx). If you add custom patterns, make sure to keep these defaults to avoid accidentally capturing sensitive files.

contox.capture.includeDiffs

json
{
  "contox.capture.includeDiffs": true
}

When enabled, the git watcher captures compact unified diffs for each commit using git diff-tree. Diffs are truncated to 3000 characters per commit and provide the enrichment pipeline with actual code changes for richer context extraction.

Diffs are automatically filtered to exclude lock files, binaries, minified files, images, and fonts.

Disable this if you want to capture only commit metadata (message, files changed, stats) without code diffs.

contox.capture.anonymizeDiffs

json
{
  "contox.capture.anonymizeDiffs": false
}

When enabled, code content is stripped from captured diffs. Only file paths and change statistics are retained. Use this in environments where source code should not be sent to external services, while still capturing file-level change information for enrichment.

This setting only has effect when contox.capture.includeDiffs is also enabled.

contox.hmacSecret

json
{
  "contox.hmacSecret": ""
}

The HMAC secret used to sign V2 ingest API requests. This is used by the git watcher when sending captured events.

The HMAC secret is resolved in this order of precedence:

  1. VS Code SecretStorage (set during setup wizard or deep link)
  2. This contox.hmacSecret setting
  3. Fetched from the API on demand and cached in SecretStorage

In most cases, the setup wizard or deep link stores the secret in SecretStorage automatically, and you do not need to set this value manually. Use this setting only as a fallback or for scripted configurations.

Example settings.json

A typical configuration with all defaults:

json
{
  "contox.apiUrl": "https://contox.dev",
  "contox.autoSync": true,
  "contox.capture.enabled": true,
  "contox.capture.excludePatterns": [
    "*.env",
    "*.key",
    "*.pem",
    "*.p12",
    "*.pfx",
    "node_modules/**",
    ".git/**",
    "dist/**"
  ],
  "contox.capture.includeDiffs": true,
  "contox.capture.anonymizeDiffs": false,
  "contox.hmacSecret": ""
}

Privacy-focused configuration

If you want to minimize the data sent to Contox:

json
{
  "contox.capture.includeDiffs": false,
  "contox.capture.excludePatterns": [
    "*.env", "*.key", "*.pem", "*.p12", "*.pfx",
    "node_modules/**", ".git/**", "dist/**",
    "*.secret", "*.credentials"
  ]
}

For maximum privacy while still tracking file-level changes:

json
{
  "contox.capture.includeDiffs": true,
  "contox.capture.anonymizeDiffs": true
}

Next steps