feat: Add YAML-based configuration system
- Add default_config.yaml with customizable settings - Model selection (minicpm-v, llama3.2-vision, llava) - Customizable vision prompt for better responses - Timing parameters (idle threshold, response delay) - Approval keywords configuration - User config at ~/.config/claude-vision-auto/config.yaml - New command: claude-vision-config to generate user config - Environment variables still override config files - Added PyYAML dependency Configuration priority: 1. Environment variables (highest) 2. User config (~/.config/claude-vision-auto/config.yaml) 3. Default config (package default) Generated with Claude Code Co-Authored-By: Claude <noreply@anthropic.com> Co-Authored-By: Jean-Philippe Brule <jp@svrnty.io>
This commit is contained in:
@@ -0,0 +1,38 @@
|
||||
#!/usr/bin/env python3
|
||||
"""
|
||||
Generate user configuration file for Claude Vision Auto
|
||||
"""
|
||||
|
||||
import sys
|
||||
from pathlib import Path
|
||||
from claude_vision_auto.config import create_user_config, get_config_dir
|
||||
|
||||
|
||||
def main():
|
||||
"""Create user configuration file"""
|
||||
config_path = create_user_config()
|
||||
|
||||
if config_path:
|
||||
print(f"✅ Created user configuration file:")
|
||||
print(f" {config_path}")
|
||||
print()
|
||||
print("Edit this file to customize:")
|
||||
print(f" - Vision model (minicpm-v, llama3.2-vision, llava)")
|
||||
print(f" - Vision prompt for better responses")
|
||||
print(f" - Timing settings (idle threshold, response delay)")
|
||||
print(f" - Approval keywords")
|
||||
print()
|
||||
print(f"Edit with: nano {config_path}")
|
||||
else:
|
||||
config_dir = get_config_dir()
|
||||
config_path = config_dir / "config.yaml"
|
||||
print(f"ℹ️ Configuration file already exists:")
|
||||
print(f" {config_path}")
|
||||
print()
|
||||
print(f"Edit with: nano {config_path}")
|
||||
|
||||
sys.exit(0)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Reference in New Issue
Block a user