Skip to main content

mini_claw/
lib.rs

1//! pinchy — lightweight Rust agent platform.
2//!
3//! This library crate re-exports modules so integration tests
4//! (under `tests/`) can access them.
5
6pub mod agent;
7pub mod auth;
8pub mod cli;
9pub mod comm;
10pub mod config;
11pub mod context;
12pub mod discord;
13pub mod gateway;
14pub mod logs;
15pub mod memory;
16pub mod models;
17pub mod scheduler;
18pub mod secrets;
19pub mod session;
20pub mod skills;
21pub mod slash;
22pub mod tools;
23pub mod utils;
24pub mod watcher;
25
26/// Return the Pinchy home directory.
27///
28/// Resolution order:
29/// 1. `PINCHY_HOME` environment variable
30/// 2. `$HOME/.pinchy`
31pub fn pinchy_home() -> std::path::PathBuf {
32    if let Ok(p) = std::env::var("PINCHY_HOME") {
33        std::path::PathBuf::from(p)
34    } else {
35        dirs::home_dir()
36            .unwrap_or_else(|| std::path::PathBuf::from("."))
37            .join(".pinchy")
38    }
39}