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
| Setting | Type | Default | Description |
|---|---|---|---|
contox.apiUrl | string | "https://contox.dev" | Contox API base URL |
contox.autoSync | boolean | true | Automatically sync contexts on save |
contox.capture.enabled | boolean | true | Enable automatic git event capture |
contox.capture.excludePatterns | string[] | See below | File patterns to exclude from capture |
contox.capture.includeDiffs | boolean | true | Include compact code diffs in captured commits |
contox.capture.anonymizeDiffs | boolean | false | Strip code content from captured diffs |
contox.hmacSecret | string | "" | HMAC secret for V2 API signing |
Setting details
contox.apiUrl
{
"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
{
"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
{
"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
{
"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,*.envmatchesdatabase.env)dir/**-- Matches all files under the specified directory (for example,node_modules/**matchesnode_modules/lodash/index.js)
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
{
"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
{
"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
{
"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:
- VS Code SecretStorage (set during setup wizard or deep link)
- This
contox.hmacSecretsetting - 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:
{
"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:
{
"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:
{
"contox.capture.includeDiffs": true,
"contox.capture.anonymizeDiffs": true
}
Next steps
- Auto Capture -- How the capture system uses these settings
- Commands -- All 11 extension commands