pub enum Commands {
Show 38 variants
Init,
List,
Models,
ModelInfo {
model: String,
},
Chat,
Version,
Update {
check: bool,
force: bool,
},
Status,
Doctor {
format: OutputFormat,
},
Feedback {
stdout: bool,
format: OutputFormat,
},
SelfTest {
format: OutputFormat,
keep_workspace: bool,
},
Tasks {
limit: usize,
},
Task {
id: String,
follow: bool,
},
Processes {
limit: usize,
},
Logs {
id: String,
},
Stop {
id: String,
},
Restart {
id: String,
},
Open {
target: String,
},
Ports,
Approvals,
Approve {
id: String,
},
Deny {
id: String,
},
Cancel {
id: String,
},
ToolRuns {
limit: usize,
},
Checkpoints {
limit: usize,
},
Restore {
id: String,
force: bool,
},
Plugin {
command: PluginCommand,
},
Daemon {
command: DaemonCommand,
},
Pair {
command: PairCommand,
},
Qa {
command: QaCommand,
},
Add {
name: String,
yes: bool,
command: Option<String>,
arg: Vec<String>,
env: Vec<String>,
url: Option<String>,
header: Vec<String>,
env_header: Vec<String>,
},
Remove {
name: String,
},
Mcp,
Pr {
command: PrCommand,
},
CloudSetup,
Login {
provider: Option<String>,
},
Logout {
provider: String,
},
Run {
prompt: Option<String>,
format: OutputFormat,
max_tokens: Option<usize>,
no_execute: bool,
allow_untrusted_tools: bool,
output_schema: Option<PathBuf>,
plan: bool,
plan_autoaccept: bool,
},
}Variants§
Init
Initialize configuration
List
List available models
Models
List model/provider capability records
ModelInfo
Show static and cached capability info for a model id
Chat
Start a chat session (default)
Version
Show version information
Update
Update Mermaid to the latest release
Fields
Status
Check status of dependencies and backends
Doctor
Check first-run readiness and explain what Mermaid can do now
Fields
format: OutputFormatOutput format (text, json, markdown)
Feedback
Write a local diagnostic bundle: doctor report, config summary (names and booleans only), recent trace events, and the log tail. Nothing is uploaded — the file stays on this machine.
Fields
format: OutputFormatOutput format (markdown or json)
SelfTest
Run fast deterministic Mermaid self-tests
Fields
format: OutputFormatOutput format (text, json, markdown)
Tasks
List durable runtime tasks
Task
Show one durable runtime task and its timeline
Fields
Processes
List Mermaid-managed background processes
Logs
Print a managed process log
Stop
Stop a managed process
Restart
Restart a managed process
Open
Open a URL, file, or managed process URL
Ports
Show listening TCP ports
Approvals
List pending approvals
Approve
Approve a pending approval record
Deny
Deny a pending approval record
Cancel
Cancel a queued or running daemon task
ToolRuns
List recent persisted tool runs
Checkpoints
List checkpoints
Restore
Restore a checkpoint by id
Fields
Plugin
Manage Mermaid plugin bundles
Fields
command: PluginCommandDaemon
Manage Mermaid’s Linux background service
Fields
command: DaemonCommandPair
Manage remote pairing tokens
Fields
command: PairCommandQa
Internal self-QA commands. Hidden from normal help output.
Add
Add an MCP server (e.g., mermaid add context7)
Fields
yes: boolSkip the confirmation prompt before fetching and running a package that is not in the built-in registry (for scripted/CI use). Without this, adding an unknown package fails closed when there is no TTY.
command: Option<String>Register a raw command server instead of resolving from the registry:
the executable to run (e.g. uvx, node, /path/to/mcp-server).
arg: Vec<String>Argument for –command, repeatable and order-preserving
(e.g. --arg mcp-server-git --arg --repository --arg .).
url: Option<String>Register a remote Streamable HTTP server instead: the MCP endpoint
URL (https://..., or http:// to localhost only).
Remove
Remove a configured MCP server
Mcp
List configured MCP servers
Pr
Create a pull/merge request from the current branch via the host CLI
(gh for GitHub, glab for GitLab)
CloudSetup
Configure Ollama Cloud API key (interactive prompt). Run this from your shell before starting mermaid — it reads stdin and doesn’t work from inside the TUI.
Login
Store a provider API key in the OS keyring, or list key status
Fields
Logout
Remove a provider API key from the OS keyring
Run
Run a single prompt non-interactively
Fields
prompt: Option<String>Prompt to execute. Omit or pass - to read it from piped stdin;
piped stdin alongside a prompt is appended as a fenced block.
format: OutputFormatOutput format (text, json, markdown, ndjson)
allow_untrusted_tools: boolAllow non-replayable tools (web/mcp/subagent/computer-use) to run on
an Ask decision in this headless run. Off by default — ask mode
otherwise refuses them when there’s no approval UI.
output_schema: Option<PathBuf>JSON Schema file the final answer must conform to. The agentic loop runs normally; one extra formatting turn (no tools, native constrained output where the provider supports it) reshapes the final answer, validated client-side. Failures are reported in the run’s errors; the text answer is still returned.
Trait Implementations§
Source§impl FromArgMatches for Commands
impl FromArgMatches for Commands
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<'b>(
&mut self,
__clap_arg_matches: &mut ArgMatches,
) -> Result<(), Error>
fn update_from_arg_matches_mut<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>
ArgMatches to self.Source§impl Subcommand for Commands
impl Subcommand for Commands
Source§fn augment_subcommands<'b>(__clap_app: Command) -> Command
fn augment_subcommands<'b>(__clap_app: Command) -> Command
Source§fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command
Command so it can instantiate self via
FromArgMatches::update_from_arg_matches_mut Read moreSource§fn has_subcommand(__clap_name: &str) -> bool
fn has_subcommand(__clap_name: &str) -> bool
Self can parse a specific subcommandAuto Trait Implementations§
impl Freeze for Commands
impl RefUnwindSafe for Commands
impl Send for Commands
impl Sync for Commands
impl Unpin for Commands
impl UnsafeUnpin for Commands
impl UnwindSafe for Commands
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