pub struct Config {Show 13 fields
pub output: Option<String>,
pub filter: Option<Vec<String>>,
pub ignore: Option<Vec<String>>,
pub line_numbers: Option<bool>,
pub preview: Option<bool>,
pub token_count: Option<bool>,
pub output_folder: Option<String>,
pub timestamped_output: Option<bool>,
pub yes: Option<bool>,
pub auto_diff: Option<bool>,
pub diff_context_lines: Option<usize>,
pub diff_only: Option<bool>,
pub encoding_strategy: Option<String>,
}Expand description
Global configuration loaded from context-builder.toml.
Any field left as None means “use the CLI default / do not override”.
Command-line arguments always take precedence over values provided here.
Example context-builder.toml:
output = "context.md"
output_folder = "docs"
timestamped_output = true
auto_diff = true
diff_only = true # Emit only change summary + modified file diffs (no full file bodies)
filter = ["rs", "toml"]
ignore = ["target", ".git"]
line_numbers = false
diff_context_lines = 5Fields§
§output: Option<String>Output file name (or base name when timestamped_output = true)
filter: Option<Vec<String>>File extensions to include (no leading dot, e.g. rs, toml)
ignore: Option<Vec<String>>File / directory names to ignore (exact name matches)
line_numbers: Option<bool>Add line numbers to code blocks
preview: Option<bool>Preview only the file tree (no file output)
token_count: Option<bool>Token counting mode
output_folder: Option<String>Optional folder to place the generated output file(s) in
timestamped_output: Option<bool>If true, append a UTC timestamp to the output file name (before extension)
yes: Option<bool>Assume “yes” for overwrite / processing confirmations
auto_diff: Option<bool>Enable automatic diff generation (requires timestamped_output = true)
diff_context_lines: Option<usize>Override number of unified diff context lines (falls back to env or default = 3)
diff_only: Option<bool>When true, emit ONLY:
- Header + file tree
- Change Summary
- Per-file diffs for modified files
Excludes full file contents section entirely. Added files appear only in the change summary (and are marked Added) but their full content is omitted.
encoding_strategy: Option<String>Encoding handling strategy for non-UTF-8 files.
- “detect”: Attempt to detect and transcode to UTF-8 (default)
- “strict”: Only include valid UTF-8 files, skip others
- “skip”: Skip all non-UTF-8 files without transcoding attempts
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 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> 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