pub struct HeadlessArgs {
pub prompt: Vec<String>,
pub agent: Option<String>,
pub model: Option<String>,
pub cwd: PathBuf,
pub mcp_configs: Vec<PathBuf>,
pub system_prompt: Option<String>,
pub output: CliOutputFormat,
pub verbose: bool,
pub events: Vec<CliEventKind>,
}Fields§
§prompt: Vec<String>Prompt to send (reads stdin if omitted and stdin is not a TTY)
agent: Option<String>Named agent from settings.json (defaults to first user-invocable agent)
model: Option<String>Model for ad-hoc runs (e.g. “anthropic:claude-sonnet-4-5”). Mutually exclusive with –agent.
cwd: PathBufWorking directory
mcp_configs: Vec<PathBuf>Path(s) to mcp.json. Pass multiple times to layer configs (last wins on collisions).
If omitted, paths from settings.json mcpServers are used (or cwd/mcp.json is auto-detected).
system_prompt: Option<String>Additional system prompt
output: CliOutputFormatOutput format
verbose: boolVerbose diagnostic logging to stderr.
events: Vec<CliEventKind>Comma-separated list of events to emit (e.g. tool_call,tool_result).
Omit to emit everything. When set, error is only shown if explicitly listed.
Trait Implementations§
Source§impl Args for HeadlessArgs
impl Args for HeadlessArgs
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
Append to
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§impl FromArgMatches for HeadlessArgs
impl FromArgMatches for HeadlessArgs
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>
Assign values from
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>
Assign values from
ArgMatches to self.Auto Trait Implementations§
impl Freeze for HeadlessArgs
impl RefUnwindSafe for HeadlessArgs
impl Send for HeadlessArgs
impl Sync for HeadlessArgs
impl Unpin for HeadlessArgs
impl UnsafeUnpin for HeadlessArgs
impl UnwindSafe for HeadlessArgs
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
Mutably borrows from an owned value. Read more
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>
Converts
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>
Converts
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 moreSource§impl<T> IntoMaybeUndefined<T> for T
impl<T> IntoMaybeUndefined<T> for T
fn into_maybe_undefined(self) -> MaybeUndefined<T>
Source§impl<T> IntoOption<T> for T
impl<T> IntoOption<T> for T
fn into_option(self) -> Option<T>
Creates a shared type from an unshared type.