pub struct Cli {Show 18 fields
pub model: Option<String>,
pub config: Option<PathBuf>,
pub system: Option<PathBuf>,
pub non_interactive: bool,
pub allow_mutating: bool,
pub json: bool,
pub rpc: bool,
pub list_sessions: bool,
pub resume: Option<String>,
pub delete_session: Option<String>,
pub generate_completion: Option<ShellName>,
pub verbose: bool,
pub tools: Option<Vec<String>>,
pub no_tools: bool,
pub no_builtin_tools: bool,
pub image: Vec<PathBuf>,
pub list_models: bool,
pub prompt: Vec<String>,
}Expand description
opi — AI coding agent.
Fields§
§model: Option<String>Model spec, e.g. anthropic:claude-sonnet-4.
config: Option<PathBuf>Config file path.
system: Option<PathBuf>System prompt file.
non_interactive: boolSingle prompt mode (non-interactive).
allow_mutating: boolAllow mutating tools (write, edit, bash) in non-interactive mode.
json: boolOutput NDJSON events to stdout (non-interactive mode).
rpc: boolRPC JSONL mode: bidirectional command/event protocol over stdin/stdout.
list_sessions: boolList all sessions.
resume: Option<String>Resume a session by ID.
delete_session: Option<String>Delete a session by ID.
generate_completion: Option<ShellName>Generate shell completions to stdout.
verbose: boolEnable debug tracing.
tools: Option<Vec<String>>Tool allowlist (comma-separated, e.g. “read,glob”).
no_tools: boolDisable all tools.
no_builtin_tools: boolDisable built-in tools (reserved for Phase 4 extension tools).
image: Vec<PathBuf>Attach image file(s) to the prompt.
list_models: boolList available models and exit.
prompt: Vec<String>Initial prompt (positional).
Trait Implementations§
Source§impl Args for Cli
impl Args for Cli
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 CommandFactory for Cli
impl CommandFactory for Cli
Source§impl FromArgMatches for Cli
impl FromArgMatches for Cli
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.Source§impl Parser for Cli
impl Parser for Cli
Source§fn parse_from<I, T>(itr: I) -> Self
fn parse_from<I, T>(itr: I) -> Self
Parse from iterator, exit on error.
Source§fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
Parse from iterator, return Err on 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 Cli
impl RefUnwindSafe for Cli
impl Send for Cli
impl Sync for Cli
impl Unpin for Cli
impl UnsafeUnpin for Cli
impl UnwindSafe for Cli
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 more