pub mod benchmark;
pub mod compress;
pub mod dashboard;
pub mod discover;
pub mod doctor;
pub mod gain;
pub mod index;
pub mod init;
pub mod login;
pub mod mcp;
pub mod modes;
pub mod patterns;
pub mod plan;
pub mod recall;
pub mod run;
pub mod search;
pub mod smells;
pub mod sync;
pub mod uninstall;
pub mod update;

/// Returns the user's home directory. Checks `HOME` first (Unix), then
/// `USERPROFILE` (Windows), then falls back to `"."`.
pub fn home_dir() -> String {
    std::env::var("HOME")
        .or_else(|_| std::env::var("USERPROFILE"))
        .unwrap_or_else(|_| ".".into())
}
