foundry_mcp/
lib.rs

1//! # Foundry MCP
2//!
3//! A comprehensive CLI tool and MCP server for deterministic project management
4//! and AI coding assistant integration.
5//!
6//! This library provides the core functionality for managing project specifications
7//! and maintaining context for LLM-based coding assistants.
8
9pub mod cli;
10pub mod core;
11pub mod mcp;
12pub mod types;
13pub mod utils;
14
15pub mod test_utils;
16
17// Selective reexports from core modules (only what's needed for CLI functionality)
18pub use crate::core::filesystem::{create_dir_all, file_exists, read_file, write_file_atomic};
19pub use crate::core::project::{create_project, list_projects, load_project, project_exists};
20pub use crate::core::spec::{
21    create_spec, delete_spec, list_specs, load_spec, update_spec_content, validate_spec_name,
22};
23pub use crate::core::validation::{ContentType, parse_content_type, validate_content};
24pub use crate::types::project::*;
25pub use crate::types::responses::*;
26pub use crate::types::spec::*;
27pub use crate::utils::paths::*;
28pub use crate::utils::timestamp::*;
29
30/// Version information
31pub const VERSION: &str = env!("CARGO_PKG_VERSION");
32
33/// Get the foundry directory path (~/.foundry)
34pub fn foundry_dir() -> anyhow::Result<std::path::PathBuf> {
35    crate::core::filesystem::foundry_dir()
36}