config_example/
config_example.rs1use project_examer::Config;
2
3fn main() -> anyhow::Result<()> {
4 println!("Project Examer Configuration Example");
5 println!("====================================");
6
7 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 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}