tix-tracker 0.2.0

A terminal issue tracker: markdown + YAML frontmatter issues with a kanban TUI and CLI
Documentation
use std::path::Path;

use crate::config::Config;
use crate::error::{Result, TixError};

/// `tix init`: write the default `tix.toml` at `cwd`. Refuses to overwrite
/// an existing file (per `contracts/tix-toml.md` §init) and prints the
/// written path.
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(())
}