pub struct Cli {Show 18 fields
pub model: Option<String>,
pub reasoning: Option<ReasoningLevel>,
pub path: Option<PathBuf>,
pub verbose: bool,
pub resume: Option<Option<String>>,
pub continue_session: bool,
pub record: Option<PathBuf>,
pub replay: Option<PathBuf>,
pub system_prompt: Option<String>,
pub system_prompt_file: Option<PathBuf>,
pub append_system_prompt: Option<String>,
pub append_system_prompt_file: Option<PathBuf>,
pub config_overrides: Vec<String>,
pub no_network: bool,
pub confine_fs: bool,
pub sandbox: bool,
pub profile: Option<String>,
pub command: Option<Commands>,
}Fields§
§model: Option<String>Model to use (e.g., qwen3-coder:30b, ollama/llama3)
reasoning: Option<ReasoningLevel>Reasoning depth (none, minimal, low, medium, high, max).
Overrides the persisted default for this session; the slash
command /reasoning <level> and Alt+T can change it at runtime.
path: Option<PathBuf>Project directory (defaults to current directory)
verbose: boolVerbose output
resume: Option<Option<String>>Resume a past conversation. Bare --resume opens a searchable picker
(interactive only); --resume <SESSION_ID> loads that session directly
and also works headless with mermaid run. Like claude --resume.
None = flag absent; Some(None) = bare (picker);
Some(Some(id)) = direct load.
continue_session: boolResume the most recent conversation in this directory. Like
claude --continue.
record: Option<PathBuf>Append every reducer Msg to a JSONL file at this path for
debugging / post-mortem replay. Interactive mode only.
replay: Option<PathBuf>Replay a --record log through the pure reducer: print the
reconstructed session and a determinism verdict. Headless — no model
calls, no tool execution, no config reads (the log is self-contained).
system_prompt: Option<String>Replace Mermaid’s default system prompt for this invocation
system_prompt_file: Option<PathBuf>Replace Mermaid’s default system prompt with the contents of a file
append_system_prompt: Option<String>Append extra instructions after Mermaid’s system prompt for this invocation
append_system_prompt_file: Option<PathBuf>Append extra instructions from a file after Mermaid’s system prompt
config_overrides: Vec<String>Override a config value: repeatable -c key.path=value applied on top
of the config file (value parsed as TOML, so true/3/"x" keep their
types; a bare word is a string). Example:
-c default_model.max_tokens=8192 -c safety.mode=full_access.
no_network: boolDeny network access for model-run shell commands this session. On Linux a
seccomp kill-switch blocks internet sockets (AF_INET/AF_INET6); a
no-op on other platforms. Equivalent to -c safety.network=deny.
confine_fs: boolConfine model-run shell commands’ writes to the project directory (plus
the system temp directory and /dev) this session. Linux Landlock,
best-effort; a no-op on other platforms and pre-5.13 kernels. Equivalent
to -c safety.filesystem=project.
sandbox: boolFull OS sandbox for model-run shell commands: shorthand for
--no-network --confine-fs.
profile: Option<String>Apply a named config overlay from [profiles.<name>] in your user
config file for this invocation. Profile values beat the user file but
lose to a repo’s project config and to -c overrides.
command: Option<Commands>Implementations§
Source§impl Cli
impl Cli
Sourcepub fn session_flags(&self) -> SessionFlags
pub fn session_flags(&self) -> SessionFlags
Collect this invocation’s config-shaped flags into the Session
config layer’s inputs: the repeatable -c overrides plus the dedicated
flags (--no-network/--confine-fs/--sandbox, and run’s
--max-tokens/--allow-untrusted-tools). Prompt flags and
--reasoning stay outside the layer merge — see apply_prompt_flags.
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
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>
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 Cli
impl Parser for Cli
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 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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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