pub struct Config {
pub source_dir: String,
pub agents: HashMap<String, AgentConfig>,
pub gitignore: GitignoreConfig,
pub mcp: McpGlobalConfig,
pub mcp_servers: HashMap<String, McpServerConfig>,
}Expand description
Represents the root of the agentsync.toml configuration file.
Fields§
§source_dir: StringThe directory where source files for agents are stored, relative to the configuration file. Defaults to “.”.
agents: HashMap<String, AgentConfig>A map of agent configurations, where the key is the agent’s name (e.g., “claude”).
gitignore: GitignoreConfigSettings for managing the project’s .gitignore file.
mcp: McpGlobalConfigGlobal settings for Model Context Protocol (MCP) integration.
mcp_servers: HashMap<String, McpServerConfig>A map of MCP server configurations, where the key is a unique server name.
Implementations§
Source§impl Config
impl Config
Sourcepub fn find_config(start_dir: &Path) -> Result<PathBuf>
pub fn find_config(start_dir: &Path) -> Result<PathBuf>
Find configuration file by searching up from current directory
Sourcepub fn project_root(config_path: &Path) -> PathBuf
pub fn project_root(config_path: &Path) -> PathBuf
Get the project root directory (parent of .agents or location of config)
Sourcepub fn source_dir(&self, config_path: &Path) -> PathBuf
pub fn source_dir(&self, config_path: &Path) -> PathBuf
Get the source directory (where source files are located)
Sourcepub fn all_gitignore_entries(&self) -> Vec<String>
pub fn all_gitignore_entries(&self) -> Vec<String>
Get all gitignore entries (from config + auto-generated from targets) Uses a BTreeSet for efficient deduplication and automatic sorting.