pub struct CommitConfig {Show 41 fields
pub api_base_url: String,
pub api_mode: ApiMode,
pub api_key: Option<String>,
pub request_timeout_secs: u64,
pub connect_timeout_secs: u64,
pub disable_git_background_features: bool,
pub compose_max_rounds: usize,
pub summary_guideline: usize,
pub summary_soft_limit: usize,
pub summary_hard_limit: usize,
pub max_retries: u32,
pub initial_backoff_ms: u64,
pub auto_fast_threshold_lines: usize,
pub max_diff_length: usize,
pub max_diff_tokens: usize,
pub wide_change_threshold: f32,
pub temperature: f32,
pub analysis_model: String,
pub summary_model: String,
pub legacy_model: Option<String>,
pub excluded_files: Vec<String>,
pub low_priority_extensions: Vec<String>,
pub max_detail_tokens: usize,
pub analysis_prompt_variant: String,
pub summary_prompt_variant: String,
pub wide_change_abstract: bool,
pub exclude_old_message: bool,
pub gpg_sign: bool,
pub signoff: bool,
pub types: IndexMap<String, TypeConfig>,
pub classifier_hint: String,
pub categories: Vec<CategoryConfig>,
pub changelog_enabled: bool,
pub map_reduce_enabled: bool,
pub map_reduce_threshold: usize,
pub map_batch_token_budget: usize,
pub cache_enabled: bool,
pub cache_ttl_days: u32,
pub cache_dir: Option<String>,
pub analysis_prompt: String,
pub summary_prompt: String,
}Fields§
§api_base_url: String§api_mode: ApiModeAPI mode for model endpoints (auto/chat-completions/anthropic-messages)
api_key: Option<String>Optional API key for authentication (overridden by LLM_GIT_API_KEY env
var)
request_timeout_secs: u64HTTP request timeout in seconds
connect_timeout_secs: u64HTTP connection timeout in seconds
disable_git_background_features: boolDisable git background/index features that are slow for short-lived CLI subprocesses.
compose_max_rounds: usizeMaximum rounds for compose mode multi-commit generation
summary_guideline: usize§summary_soft_limit: usize§summary_hard_limit: usize§max_retries: u32§initial_backoff_ms: u64§auto_fast_threshold_lines: usize§max_diff_length: usizeCharacter ceiling used by smart truncation after a diff stays on the holistic path.
max_diff_tokens: usize§wide_change_threshold: f32§temperature: f32§analysis_model: String§summary_model: String§legacy_model: Option<String>Legacy single-model config key. Parsed for backward compatibility and
normalized into analysis_model, and into summary_model when the
summary model was not set explicitly.
excluded_files: Vec<String>§low_priority_extensions: Vec<String>§max_detail_tokens: usizeMaximum token budget for commit message detail points (approx 4 chars/token)
analysis_prompt_variant: StringPrompt variant for analysis phase (e.g., “default”)
summary_prompt_variant: StringPrompt variant for summary phase (e.g., “default”)
wide_change_abstract: boolEnable abstract summaries for wide changes (cross-cutting refactors)
exclude_old_message: boolExclude old commit message from context in commit mode (rewrite mode uses this)
gpg_sign: boolGPG sign commits by default (can be overridden by –sign CLI flag)
signoff: boolAdd Signed-off-by trailer by default (can be overridden by –signoff CLI flag)
types: IndexMap<String, TypeConfig>Commit types with descriptions for AI prompts (order = priority)
classifier_hint: StringGlobal hint for cross-type disambiguation
categories: Vec<CategoryConfig>Changelog categories with matching rules (order = render order)
changelog_enabled: boolEnable automatic changelog updates (default: true)
map_reduce_enabled: boolEnable map-reduce for large diffs (default: true)
map_reduce_threshold: usizeToken threshold for routing to map-reduce before holistic smart
truncation. Diffs below this stay in one analysis call and are bounded by
max_diff_length instead (default: 5000 tokens).
map_batch_token_budget: usizeToken budget for each map-reduce map batch. Files are greedily packed up to this budget before an LLM call; oversized files run alone.
cache_enabled: boolEnable the on-disk LLM response cache (default: true). Cache survives across runs so reruns reuse parsed call results when prompts match.
cache_ttl_days: u32TTL in days for cached LLM responses (default: 14). Set to 0 to keep entries forever.
cache_dir: Option<String>Override directory for the LLM response cache. Defaults to
$XDG_CACHE_HOME/llm-git (or ~/.cache/llm-git).
analysis_prompt: StringLoaded analysis prompt (not in config file)
summary_prompt: StringLoaded summary prompt (not in config file)
Implementations§
Source§impl CommitConfig
impl CommitConfig
pub fn resolved_api_mode(&self, _model_name: &str) -> ResolvedApiMode
Sourcepub fn load() -> Result<Self>
pub fn load() -> Result<Self>
Load config from default location (~/.config/llm-git/config.toml) Falls back to Default if file doesn’t exist or can’t determine home directory Environment variables override config file values:
LLM_GIT_API_URLoverridesapi_base_urlLLM_GIT_API_KEYoverridesapi_keyLLM_GIT_API_MODEoverridesapi_mode
Sourcepub fn default_config_path() -> Result<PathBuf>
pub fn default_config_path() -> Result<PathBuf>
Get default config path (platform-safe) Tries HOME (Unix/Linux/macOS) then USERPROFILE (Windows)
Trait Implementations§
Source§impl Clone for CommitConfig
impl Clone for CommitConfig
Source§fn clone(&self) -> CommitConfig
fn clone(&self) -> CommitConfig
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 CommitConfig
impl Debug for CommitConfig
Source§impl Default for CommitConfig
impl Default for CommitConfig
Source§impl<'de> Deserialize<'de> for CommitConfigwhere
CommitConfig: Default,
impl<'de> Deserialize<'de> for CommitConfigwhere
CommitConfig: 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 CommitConfig
impl RefUnwindSafe for CommitConfig
impl Send for CommitConfig
impl Sync for CommitConfig
impl Unpin for CommitConfig
impl UnsafeUnpin for CommitConfig
impl UnwindSafe for CommitConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<D> OwoColorize for D
impl<D> OwoColorize for D
Source§fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
fn fg<C>(&self) -> FgColorDisplay<'_, C, Self>where
C: Color,
Source§fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
fn bg<C>(&self) -> BgColorDisplay<'_, C, Self>where
C: Color,
Source§fn black(&self) -> FgColorDisplay<'_, Black, Self>
fn black(&self) -> FgColorDisplay<'_, Black, Self>
Source§fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
fn on_black(&self) -> BgColorDisplay<'_, Black, Self>
Source§fn red(&self) -> FgColorDisplay<'_, Red, Self>
fn red(&self) -> FgColorDisplay<'_, Red, Self>
Source§fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
fn on_red(&self) -> BgColorDisplay<'_, Red, Self>
Source§fn green(&self) -> FgColorDisplay<'_, Green, Self>
fn green(&self) -> FgColorDisplay<'_, Green, Self>
Source§fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
fn on_green(&self) -> BgColorDisplay<'_, Green, Self>
Source§fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
fn yellow(&self) -> FgColorDisplay<'_, Yellow, Self>
Source§fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
fn on_yellow(&self) -> BgColorDisplay<'_, Yellow, Self>
Source§fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
fn blue(&self) -> FgColorDisplay<'_, Blue, Self>
Source§fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
fn on_blue(&self) -> BgColorDisplay<'_, Blue, Self>
Source§fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
fn magenta(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_magenta(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
fn purple(&self) -> FgColorDisplay<'_, Magenta, Self>
Source§fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
fn on_purple(&self) -> BgColorDisplay<'_, Magenta, Self>
Source§fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
fn cyan(&self) -> FgColorDisplay<'_, Cyan, Self>
Source§fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
fn on_cyan(&self) -> BgColorDisplay<'_, Cyan, Self>
Source§fn white(&self) -> FgColorDisplay<'_, White, Self>
fn white(&self) -> FgColorDisplay<'_, White, Self>
Source§fn on_white(&self) -> BgColorDisplay<'_, White, Self>
fn on_white(&self) -> BgColorDisplay<'_, White, Self>
Source§fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
fn default_color(&self) -> FgColorDisplay<'_, Default, Self>
Source§fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
fn on_default_color(&self) -> BgColorDisplay<'_, Default, Self>
Source§fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
fn bright_black(&self) -> FgColorDisplay<'_, BrightBlack, Self>
Source§fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
fn on_bright_black(&self) -> BgColorDisplay<'_, BrightBlack, Self>
Source§fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
fn bright_red(&self) -> FgColorDisplay<'_, BrightRed, Self>
Source§fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
fn on_bright_red(&self) -> BgColorDisplay<'_, BrightRed, Self>
Source§fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
fn bright_green(&self) -> FgColorDisplay<'_, BrightGreen, Self>
Source§fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
fn on_bright_green(&self) -> BgColorDisplay<'_, BrightGreen, Self>
Source§fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
fn bright_yellow(&self) -> FgColorDisplay<'_, BrightYellow, Self>
Source§fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
fn on_bright_yellow(&self) -> BgColorDisplay<'_, BrightYellow, Self>
Source§fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
fn bright_blue(&self) -> FgColorDisplay<'_, BrightBlue, Self>
Source§fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
fn on_bright_blue(&self) -> BgColorDisplay<'_, BrightBlue, Self>
Source§fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_magenta(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_magenta(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
fn bright_purple(&self) -> FgColorDisplay<'_, BrightMagenta, Self>
Source§fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
fn on_bright_purple(&self) -> BgColorDisplay<'_, BrightMagenta, Self>
Source§fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
fn bright_cyan(&self) -> FgColorDisplay<'_, BrightCyan, Self>
Source§fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
fn on_bright_cyan(&self) -> BgColorDisplay<'_, BrightCyan, Self>
Source§fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
fn bright_white(&self) -> FgColorDisplay<'_, BrightWhite, Self>
Source§fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
fn on_bright_white(&self) -> BgColorDisplay<'_, BrightWhite, Self>
Source§fn bold(&self) -> BoldDisplay<'_, Self>
fn bold(&self) -> BoldDisplay<'_, Self>
Source§fn dimmed(&self) -> DimDisplay<'_, Self>
fn dimmed(&self) -> DimDisplay<'_, Self>
Source§fn italic(&self) -> ItalicDisplay<'_, Self>
fn italic(&self) -> ItalicDisplay<'_, Self>
Source§fn underline(&self) -> UnderlineDisplay<'_, Self>
fn underline(&self) -> UnderlineDisplay<'_, Self>
Source§fn blink(&self) -> BlinkDisplay<'_, Self>
fn blink(&self) -> BlinkDisplay<'_, Self>
Source§fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
fn blink_fast(&self) -> BlinkFastDisplay<'_, Self>
Source§fn reversed(&self) -> ReversedDisplay<'_, Self>
fn reversed(&self) -> ReversedDisplay<'_, Self>
Source§fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
fn strikethrough(&self) -> StrikeThroughDisplay<'_, Self>
Source§fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn color<Color>(&self, color: Color) -> FgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::fg or
a color-specific method, such as OwoColorize::green, Read moreSource§fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
fn on_color<Color>(&self, color: Color) -> BgDynColorDisplay<'_, Color, Self>where
Color: DynColor,
OwoColorize::bg or
a color-specific method, such as OwoColorize::on_yellow, Read more