use std::path::PathBuf;

pub type Result<T> = anyhow::Result<T>;

/// Cross-platform home directory resolution.
/// Checks `$HOME` (Unix/macOS), then `%USERPROFILE%` (Windows).
pub fn home_dir() -> Option<PathBuf> {
    std::env::var_os("HOME")
        .or_else(|| std::env::var_os("USERPROFILE"))
        .map(PathBuf::from)
}
