use std::path::Path;
use crate::config::Config;
use crate::error::{Result, TixError};
pub fn run(cwd: &Path) -> Result<()> {
let path = cwd.join("tix.toml");
if path.exists() {
return Err(TixError::Config(format!(
"{} already exists — refusing to overwrite (delete it first if you want to re-init)",
path.display()
)));
}
Config::default().save(&path)?;
println!("Created {}", path.display());
Ok(())
}