pub enum CliFlag {
Show 41 variants
AddDir(Vec<PathBuf>),
Agent(String),
Agents(String),
AllowDangerouslySkipPermissions,
AllowedTools(Vec<String>),
AppendSystemPrompt(String),
Betas(Vec<String>),
Chrome,
Continue,
DangerouslySkipPermissions,
Debug(Option<String>),
DebugFile(PathBuf),
DisableSlashCommands,
DisallowedTools(Vec<String>),
FallbackModel(String),
File(Vec<String>),
ForkSession,
FromPr(Option<String>),
IncludePartialMessages,
InputFormat(InputFormat),
JsonSchema(String),
MaxBudgetUsd(f64),
McpConfig(Vec<String>),
McpDebug,
Model(String),
NoChrome,
NoSessionPersistence,
OutputFormat(OutputFormat),
PermissionMode(PermissionMode),
PermissionPromptTool(String),
PluginDir(Vec<PathBuf>),
Print,
ReplayUserMessages,
Resume(Option<String>),
SessionId(String),
SettingSources(String),
Settings(String),
StrictMcpConfig,
SystemPrompt(String),
Tools(Vec<String>),
Verbose,
}Expand description
Comprehensive enum of all Claude CLI flags.
This enum represents every flag available in the Claude CLI (claude --help).
Each variant carries the appropriate data type for its flag value.
Use as_flag() to get the CLI flag string (e.g., "--model"),
or to_args() to get the complete flag + value as CLI arguments.
§Example
use claude_codes::CliFlag;
let flag = CliFlag::Model("sonnet".to_string());
assert_eq!(flag.as_flag(), "--model");
assert_eq!(flag.to_args(), vec!["--model", "sonnet"]);Variants§
AddDir(Vec<PathBuf>)
Additional directories to allow tool access to
Agent(String)
Agent for the current session
Agents(String)
JSON object defining custom agents
AllowDangerouslySkipPermissions
Enable bypassing all permission checks as an option
AllowedTools(Vec<String>)
Tool names to allow (e.g. “Bash(git:*) Edit”)
AppendSystemPrompt(String)
Append to the default system prompt
Betas(Vec<String>)
Beta headers for API requests (API key users only)
Chrome
Enable Claude in Chrome integration
Continue
Continue the most recent conversation
DangerouslySkipPermissions
Bypass all permission checks
Debug(Option<String>)
Enable debug mode with optional category filter
DebugFile(PathBuf)
Write debug logs to a specific file path
DisableSlashCommands
Disable all skills/slash commands
DisallowedTools(Vec<String>)
Tool names to deny (e.g. “Bash(git:*) Edit”)
FallbackModel(String)
Automatic fallback model when default is overloaded
File(Vec<String>)
File resources to download at startup (format: file_id:relative_path)
ForkSession
Create a new session ID when resuming instead of reusing original
FromPr(Option<String>)
Resume a session linked to a PR
IncludePartialMessages
Include partial message chunks as they arrive
InputFormat(InputFormat)
Input format (text or stream-json)
JsonSchema(String)
JSON Schema for structured output validation
MaxBudgetUsd(f64)
Maximum dollar amount for API calls
McpConfig(Vec<String>)
Load MCP servers from JSON files or strings
McpDebug
Enable MCP debug mode (deprecated, use Debug instead)
Model(String)
Model for the current session
NoChrome
Disable Claude in Chrome integration
NoSessionPersistence
Disable session persistence
OutputFormat(OutputFormat)
Output format (text, json, or stream-json)
PermissionMode(PermissionMode)
Permission mode for the session
PermissionPromptTool(String)
Tool for handling permission prompts (e.g., “stdio”)
PluginDir(Vec<PathBuf>)
Load plugins from directories
Print response and exit
ReplayUserMessages
Re-emit user messages from stdin back on stdout
Resume(Option<String>)
Resume a conversation by session ID
SessionId(String)
Use a specific session ID (UUID or tagged ID)
SettingSources(String)
Comma-separated list of setting sources (user, project, local)
Settings(String)
Path to settings JSON file or JSON string
StrictMcpConfig
Only use MCP servers from –mcp-config
SystemPrompt(String)
System prompt for the session
Tools(Vec<String>)
Specify available tools from the built-in set
Verbose
Override verbose mode setting