config_example/
config_example.rs

1use project_examer::Config;
2
3fn main() -> anyhow::Result<()> {
4    println!("Project Examer Configuration Example");
5    println!("====================================");
6    
7    // Show default config path
8    match Config::default_config_path() {
9        Ok(path) => println!("šŸ“ Default config location: {}", path.display()),
10        Err(e) => println!("āŒ Error getting config path: {}", e),
11    }
12    
13    // Load config (will use defaults if no file exists)
14    println!("\nšŸ”§ Loading configuration...");
15    let config = Config::load()?;
16    
17    println!("āœ… Configuration loaded successfully!");
18    println!("šŸ“ Target directory: {}", config.target_directory.display());
19    println!("šŸ” File extensions: {:?}", config.file_extensions);
20    println!("🚫 Ignore patterns: {:?}", config.ignore_patterns);
21    println!("šŸ¤– LLM Provider: {:?}", config.llm.provider);
22    println!("🧠 Model: {}", config.llm.model);
23    
24    if config.llm.api_key.is_some() {
25        println!("šŸ”‘ API key: [CONFIGURED]");
26    } else {
27        println!("šŸ”‘ API key: [NOT SET - will check environment variables]");
28    }
29    
30    Ok(())
31}