Configuration

Customize PhantomDev to match your workflow and preferences.

Configuration File

PhantomDev reads configuration from .phantomdev/config.toml in your project root. Run phantomdev init to create a default configuration file.

Detection Settings

Control how PhantomDev detects AI-generated content.

[detection] threshold = 0.15 # AI probability threshold (0.0 - 1.0) use_local = true # Prioritize local models use_cloud_fallback = true # Fall back to cloud API if local score is uncertain

threshold

The AI probability threshold (0.0 to 1.0). Files with scores above this value are flagged as AI-generated. Default: 0.15

use_local

Whether to use local ML models for detection. Default: true

use_cloud_fallback

Whether to fall back to cloud APIs when local detection is uncertain. Default: true

Humanization Settings

Configure how PhantomDev transforms your code to appear more human-written.

[humanization] auto_humanize = false # Run humanization automatically on commit entropy_level = 0.5 # Transformation intensity (0.0 - 1.0)

auto_humanize

Automatically run humanization on every commit. Default: false

entropy_level

Transformation intensity from 0.0 (minimal changes) to 1.0 (aggressive). Default: 0.5

Jitter Settings

Configure temporal obfuscation to simulate organic development pace.

[jitter] enabled = false # Enable temporal obfuscation min_delay_secs = 60 max_delay_secs = 300

enabled

Enable temporal obfuscation. Default: false

min_delay_secs

Minimum delay in seconds between operations. Default: 60

max_delay_secs

Maximum delay in seconds between operations. Default: 300

API Settings

Configure cloud API keys for enhanced detection and humanization.

[api] openrouter_key = "" # Optional: OpenRouter API key anthropic_key = "" # Optional: Anthropic API key base_url = "" # Optional: Custom API base URL
Security Note: API keys are stored locally in your project directory. Never commit your config file with real API keys to version control.

Managing Configuration

phantomdev config --show

Display the current configuration.

phantomdev config --reset

Reset configuration to default values.

phantomdev config --edit

Open the configuration file in your default editor.