spool-memory 0.2.3

Local-first developer memory system — persistent, structured knowledge for AI coding tools
Documentation
1
2
3
4
5
6
7
8
9
10
11
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)
}