repopilot 0.11.0

Local-first CLI for repository audit, architecture risk detection, baseline tracking, and CI-friendly code review.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use repopilot::config::template::default_config_toml;
use std::fs;
use std::path::PathBuf;

pub fn run(force: bool, path: PathBuf) -> Result<(), Box<dyn std::error::Error>> {
    if path.exists() && !force {
        println!(
            "Config already exists at {}. Use `repopilot init --force` to overwrite it.",
            path.display()
        );
        return Ok(());
    }

    fs::write(&path, default_config_toml())?;
    println!("Created RepoPilot config at {}", path.display());

    Ok(())
}