pub struct InitOptions {
pub framework: String,
pub frameworks: Vec<String>,
pub local: bool,
pub settings_local: bool,
pub otel: bool,
pub otel_port: u16,
pub remove_otel: bool,
}Expand description
Options for core initialization.
This struct contains all the options needed to initialize fyi programmatically.
For CLI usage, the CLI layer adds additional options like print and db_only.
This struct is the single source of truth for initialization settings, shared
between CLI commands (init, activate) and programmatic API usage.
Fields§
§framework: Stringuse frameworks field instead
Frameworks to install hooks for (e.g., “claude”, “gemini”, “codex”). If empty, auto-detection will be used (CLI behavior).
frameworks: Vec<String>Frameworks to install hooks for (e.g., ["claude", "gemini", "codex"]).
If empty, auto-detection will be used (CLI behavior).
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).
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. Returns frameworks if non-empty, otherwise returns a single-element vec with framework.
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).