pub struct Config {Show 32 fields
pub command: Option<Commands>,
pub prompt: Option<String>,
pub paths: Option<Vec<PathBuf>>,
pub include: Option<Vec<String>>,
pub ignore: Option<Vec<String>>,
pub remote: Option<String>,
pub read_stdin: bool,
pub output_file: Option<PathBuf>,
pub max_tokens: Option<usize>,
pub llm_tool: LlmTool,
pub ollama_model: Option<String>,
pub quiet: bool,
pub verbose: u8,
pub log_format: LogFormat,
pub config: Option<PathBuf>,
pub progress: bool,
pub copy: bool,
pub enhanced_context: bool,
pub git_context: bool,
pub git_context_depth: usize,
pub output_format: OutputFormat,
pub trace_imports: bool,
pub include_callers: bool,
pub include_types: bool,
pub semantic_depth: usize,
pub mcp: bool,
pub mcp_port: u16,
pub rmcp: bool,
pub rmcp_transport: String,
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§
§command: Option<Commands>Subcommand to execute
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
remote: 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
ollama_model: Option<String>Model to use with Ollama (required when using –tool ollama)
quiet: boolSuppress all output except for errors and the final LLM response
verbose: u8Enable verbose logging (use -vv for trace level)
log_format: LogFormatLog output format
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
git_context: boolInclude git commit history in file headers
git_context_depth: usizeNumber of git commits to show per file
output_format: OutputFormatOutput format style
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
mcp: boolStart MCP server mode
mcp_port: u16Port for MCP server
rmcp: boolUse RMCP implementation instead of jsonrpsee
rmcp_transport: StringTransport mode for RMCP server
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 UnsafeUnpin 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,
impl<T> ErasedDestructor for Twhere
T: 'static,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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<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