pub struct SetupConfig {
pub auto_inject_rules: Option<bool>,
pub auto_inject_skills: Option<bool>,
pub auto_update_mcp: bool,
}Expand description
Controls what lean-ctx injects during setup and update --rewire.
Fresh installs default to non-invasive (rules/skills off, MCP on).
Users who ran setup interactively get explicit true/false.
None = undecided (legacy: check if rules already exist and preserve behavior).
Fields§
§auto_inject_rules: Option<bool>Inject agent rule files (CLAUDE.md, .cursor/rules/, etc.). None = undecided (legacy compat: inject if rules already present). Some(true) = always inject. Some(false) = never inject.
auto_inject_skills: Option<bool>Install SKILL.md files for supported agents. None = undecided. Some(true) = install. Some(false) = skip.
auto_update_mcp: boolRegister lean-ctx as an MCP server in editor configs.
Implementations§
Source§impl SetupConfig
impl SetupConfig
Sourcepub fn should_inject_rules(&self) -> bool
pub fn should_inject_rules(&self) -> bool
Returns whether rules should be injected, considering legacy installs. If undecided (None), checks if lean-ctx rules markers already exist in any agent config — if so, keeps injecting for backward compat.
Sourcepub fn should_inject_skills(&self) -> bool
pub fn should_inject_skills(&self) -> bool
Returns whether skills should be installed.
Trait Implementations§
Source§impl Clone for SetupConfig
impl Clone for SetupConfig
Source§fn clone(&self) -> SetupConfig
fn clone(&self) -> SetupConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SetupConfig
impl Debug for SetupConfig
Source§impl Default for SetupConfig
impl Default for SetupConfig
Source§impl<'de> Deserialize<'de> for SetupConfigwhere
SetupConfig: Default,
impl<'de> Deserialize<'de> for SetupConfigwhere
SetupConfig: Default,
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 SetupConfig
impl RefUnwindSafe for SetupConfig
impl Send for SetupConfig
impl Sync for SetupConfig
impl Unpin for SetupConfig
impl UnsafeUnpin for SetupConfig
impl UnwindSafe for SetupConfig
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