pub enum Commands {
Add {Show 19 fields
alias_name: String,
token: Option<String>,
url: Option<String>,
model: Option<String>,
small_fast_model: Option<String>,
max_thinking_tokens: Option<u32>,
api_timeout_ms: Option<u32>,
claude_code_disable_nonessential_traffic: Option<u32>,
anthropic_default_sonnet_model: Option<String>,
anthropic_default_opus_model: Option<String>,
anthropic_default_haiku_model: Option<String>,
claude_code_subagent_model: Option<String>,
claude_code_disable_nonstreaming_fallback: Option<u32>,
claude_code_effort_level: Option<String>,
force: bool,
interactive: bool,
token_arg: Option<String>,
url_arg: Option<String>,
from_file: Option<Option<String>>,
},
Remove {
alias_names: Vec<String>,
},
List {
plain: bool,
name: bool,
},
Completion {
shell: String,
},
Use {
alias_name: String,
resume: Option<String>,
continue: bool,
prompt: Vec<String>,
},
Codex {
command: Option<CodexCommands>,
},
Statusline {
action: StatuslineAction,
},
}Expand description
Available subcommands for configuration management
Variants§
Add
Add a new Claude API configuration
Stores a new configuration with alias, API token, base URL, and optional model settings
Fields
small_fast_model: Option<String>ANTHROPIC_SMALL_FAST_MODEL value (Haiku-class model for background tasks)
max_thinking_tokens: Option<u32>ANTHROPIC_MAX_THINKING_TOKENS value (Maximum thinking tokens limit)
Remove
Remove one or more configurations by alias name
Deletes stored configurations by their alias names
List
List all stored configurations
Displays all saved configurations with their aliases, tokens, and URLs
Completion
Generate shell completion scripts
Generates completion scripts for supported shells
Use
Switch to a configuration and optionally send a prompt to Claude
Quickly switches to the specified configuration and launches Claude. Any additional arguments after the alias name are joined and sent as a prompt. Use –resume to resume a previous Claude session by ID. Use –continue to continue the most recent Claude session.
Fields
Codex
Manage Codex (OpenAI CLI) configurations
Fields
command: Option<CodexCommands>Statusline
Manage statusLine integration with Claude Code
Installs a wrapper script that displays the current cc-switch alias name in Claude Code’s statusLine, alongside the original statusLine content.
Usage: cc-switch statusline install # Install/update the wrapper cc-switch statusline uninstall # Remove the wrapper
Fields
action: StatuslineActionAction to perform (install or uninstall)
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 subcommand