pub struct InitOptions {
pub frameworks: Vec<String>,
pub local: bool,
pub settings_local: bool,
pub otel: bool,
pub otel_port: u16,
pub remove_otel: bool,
pub db_only: bool,
pub hooks_only: bool,
}Expand description
Options for hook initialization and activation.
This struct contains all the options needed to initialize mi6 programmatically.
Fields§
§frameworks: Vec<String>Frameworks to install hooks for (e.g., ["claude", "gemini", "codex"]).
If empty, auto-detection will be used.
local: boolInstall hooks to project config instead of global.
settings_local: boolInstall hooks to project local config (not committed to git).
otel: boolConfigure OpenTelemetry env vars for token tracking.
otel_port: u16Port for OTel server.
remove_otel: boolRemove OTel configuration (disables token tracking).
db_only: boolOnly initialize database, skip hook installation (high-level API only).
hooks_only: boolOnly install hooks, skip database initialization (high-level API only).
Implementations§
Source§impl InitOptions
impl InitOptions
Sourcepub fn for_framework(framework: impl Into<String>) -> Self
pub fn for_framework(framework: impl Into<String>) -> Self
Create InitOptions for a single framework.
Sourcepub fn for_frameworks(frameworks: Vec<String>) -> Self
pub fn for_frameworks(frameworks: Vec<String>) -> Self
Create InitOptions for multiple frameworks.
Sourcepub fn get_frameworks(&self) -> Vec<String>
pub fn get_frameworks(&self) -> Vec<String>
Get the list of frameworks to initialize.
Sourcepub fn local(self, local: bool) -> Self
pub fn local(self, local: bool) -> Self
Set install location to project config instead of global.
Sourcepub fn settings_local(self, settings_local: bool) -> Self
pub fn settings_local(self, settings_local: bool) -> Self
Set install location to project local config (not committed to git).
Sourcepub fn remove_otel(self, remove: bool) -> Self
pub fn remove_otel(self, remove: bool) -> Self
Remove OTel configuration (disables token tracking).
Sourcepub fn hooks_only(self, hooks_only: bool) -> Self
pub fn hooks_only(self, hooks_only: bool) -> Self
Only install hooks, skip database initialization.
Trait Implementations§
Source§impl Clone for InitOptions
impl Clone for InitOptions
Source§fn clone(&self) -> InitOptions
fn clone(&self) -> InitOptions
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more