pub struct Config {
pub registry: RegistryConfig,
pub workspace: WorkspaceConfig,
pub sync: Option<SyncConfig>,
pub terminal: Option<TerminalConfig>,
pub editor: Option<EditorConfig>,
pub defaults: DefaultsConfig,
pub groups: BTreeMap<String, Vec<String>>,
pub repos: BTreeMap<String, RepoConfig>,
pub specs: Option<SpecsConfig>,
pub agents: AgentsConfig,
pub update: UpdateConfig,
}Expand description
Top-level LOOM configuration, stored at ~/.config/loom/config.toml
Fields§
§registry: RegistryConfig§workspace: WorkspaceConfig§sync: Option<SyncConfig>§terminal: Option<TerminalConfig>§editor: Option<EditorConfig>§defaults: DefaultsConfig§groups: BTreeMap<String, Vec<String>>Named repo groups for quick workspace creation. Each group maps a name to a list of repo names (bare or org/name).
repos: BTreeMap<String, RepoConfig>Per-repo settings (e.g., workflow). Keyed by repo name.
specs: Option<SpecsConfig>Specs conventions for generated CLAUDE.md.
agents: AgentsConfig§update: UpdateConfigAuto-update settings.
Implementations§
Source§impl Config
impl Config
Sourcepub fn load_from(path: &Path) -> Result<Self>
pub fn load_from(path: &Path) -> Result<Self>
Load config from a specific path (useful for testing)
Sourcepub fn save_to(&self, path: &Path) -> Result<()>
pub fn save_to(&self, path: &Path) -> Result<()>
Save config to a specific path atomically (useful for testing)
Sourcepub fn default_config() -> Self
pub fn default_config() -> Self
Sensible defaults for loom init
Sourcepub fn path() -> Result<PathBuf>
pub fn path() -> Result<PathBuf>
Path to the config file: ~/.config/loom/config.toml
Hardcoded to ~/.config/loom/ for cross-platform consistency.
This matches developer tool conventions (ripgrep, bat, starship)
and avoids the directories crate’s macOS path (~Library/Application Support/).
Sourcepub fn validate_agent_config(&self) -> Result<()>
pub fn validate_agent_config(&self) -> Result<()>
Validate only the agent config section (no path-existence checks).
Use this during loom init where paths may not exist yet.
Validate agent permission and sandbox syntax only.
This checks allowed_tools format, sandbox paths, and preset entries without
requiring that scan_roots or workspace.root exist on disk. Safe to call at
init time before directories are created. Does not check marketplace/plugin
entries — use validate() for the full post-load check.
Sourcepub fn validate(&self) -> Result<()>
pub fn validate(&self) -> Result<()>
Full post-load validation: path existence, branch prefix, marketplace/plugin
entries, and all agent config (delegates to validate_agent_config()).
Trait Implementations§
Source§impl<'de> Deserialize<'de> for Config
impl<'de> Deserialize<'de> for Config
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for Config
impl RefUnwindSafe for Config
impl Send for Config
impl Sync for Config
impl Unpin for Config
impl UnsafeUnpin for Config
impl UnwindSafe for Config
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more