pub struct Config {Show 22 fields
    pub prompt: Option<String>,
    pub paths: Option<Vec<PathBuf>>,
    pub include: Option<Vec<String>>,
    pub ignore: Option<Vec<String>>,
    pub repo: Option<String>,
    pub read_stdin: bool,
    pub output_file: Option<PathBuf>,
    pub max_tokens: Option<usize>,
    pub llm_tool: LlmTool,
    pub quiet: bool,
    pub verbose: bool,
    pub config: Option<PathBuf>,
    pub progress: bool,
    pub copy: bool,
    pub enhanced_context: bool,
    pub trace_imports: bool,
    pub include_callers: bool,
    pub include_types: bool,
    pub semantic_depth: usize,
    pub custom_priorities: Vec<Priority>,
    pub config_token_limits: Option<TokenLimits>,
    pub config_defaults_max_tokens: Option<usize>,
}Expand description
High-performance CLI tool to convert codebases to Markdown for LLM context
Fields§
§prompt: Option<String>The prompt to send to the LLM for processing
paths: Option<Vec<PathBuf>>One or more directory paths to process
IMPORTANT: Use get_directories() to access the correct input paths.
include: Option<Vec<String>>Include files and directories matching glob patterns
IMPORTANT: Use get_directories() to access the correct input paths.
ignore: Option<Vec<String>>Ignore files and directories matching glob patterns
repo: Option<String>GitHub repository URL to analyze (e.g., https://github.com/owner/repo)
read_stdin: boolRead prompt from stdin
output_file: Option<PathBuf>The path to the output Markdown file. If used, won’t call the LLM CLI
max_tokens: Option<usize>Maximum number of tokens for the generated codebase context
llm_tool: LlmToolLLM CLI tool to use for processing
quiet: boolSuppress all output except for errors and the final LLM response
verbose: boolEnable verbose logging
config: Option<PathBuf>Path to configuration file
progress: boolShow progress indicators during processing
copy: boolCopy output to system clipboard instead of stdout
enhanced_context: boolEnable enhanced context with file metadata
trace_imports: boolEnable import tracing for included files
include_callers: boolInclude files that call functions from specified modules
include_types: boolInclude type definitions used by specified files
semantic_depth: usizeMaximum depth for semantic dependency traversal
custom_priorities: Vec<Priority>Custom priority rules loaded from config file (not a CLI argument)
config_token_limits: Option<TokenLimits>Token limits loaded from config file (not a CLI argument)
config_defaults_max_tokens: Option<usize>Maximum tokens from config defaults (not a CLI argument)
Implementations§
Source§impl Config
 
impl Config
Sourcepub fn validate(&self) -> Result<(), ContextCreatorError>
 
pub fn validate(&self) -> Result<(), ContextCreatorError>
Validate the configuration
Sourcepub fn load_from_file(&mut self) -> Result<(), ContextCreatorError>
 
pub fn load_from_file(&mut self) -> Result<(), ContextCreatorError>
Load configuration from file if specified
Sourcepub fn get_prompt(&self) -> Option<String>
 
pub fn get_prompt(&self) -> Option<String>
Get the prompt from the explicit prompt flag
Sourcepub fn get_directories(&self) -> Vec<PathBuf>
 
pub fn get_directories(&self) -> Vec<PathBuf>
Get all directories from paths argument When using –include patterns, this returns the default directory (current dir) unless explicit paths are also provided (flexible combinations)
Sourcepub fn get_include_patterns(&self) -> Vec<String>
 
pub fn get_include_patterns(&self) -> Vec<String>
Get include patterns if specified
Sourcepub fn get_ignore_patterns(&self) -> Vec<String>
 
pub fn get_ignore_patterns(&self) -> Vec<String>
Get ignore patterns if specified
Sourcepub fn get_effective_max_tokens(&self) -> Option<usize>
 
pub fn get_effective_max_tokens(&self) -> Option<usize>
Get effective max tokens with precedence: explicit CLI > token limits (if prompt) > config defaults > hard-coded defaults (if prompt) > None
Sourcepub fn get_effective_context_tokens(&self) -> Option<usize>
 
pub fn get_effective_context_tokens(&self) -> Option<usize>
Get effective context tokens with prompt reservation This accounts for prompt tokens when calculating available space for codebase context
Sourcepub fn should_read_stdin(&self) -> bool
 
pub fn should_read_stdin(&self) -> bool
Check if we should read from stdin
Trait Implementations§
Source§impl Args for Config
 
impl Args for Config
Source§fn augment_args<'b>(__clap_app: Command) -> Command
 
fn augment_args<'b>(__clap_app: Command) -> Command
Source§fn augment_args_for_update<'b>(__clap_app: Command) -> Command
 
fn augment_args_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl CommandFactory for Config
 
impl CommandFactory for Config
Source§impl FromArgMatches for Config
 
impl FromArgMatches for Config
Source§fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
 
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Source§fn from_arg_matches_mut(
    __clap_arg_matches: &mut ArgMatches,
) -> Result<Self, Error>
 
fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>
Source§fn update_from_arg_matches(
    &mut self,
    __clap_arg_matches: &ArgMatches,
) -> Result<(), Error>
 
fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§fn update_from_arg_matches_mut(
    &mut self,
    __clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
 
fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Parser for Config
 
impl Parser for Config
Source§fn parse_from<I, T>(itr: I) -> Self
 
fn parse_from<I, T>(itr: I) -> Self
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
 
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Source§fn update_from<I, T>(&mut self, itr: I)
 
fn update_from<I, T>(&mut self, itr: I)
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