Skip to main content

Commands

Enum Commands 

Source
pub enum Commands {
    Add {
Show 22 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>, disable_prompt_caching: Option<u32>, claude_code_disable_experimental_betas: Option<u32>, disable_autoupdater: Option<u32>, 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>, }, Daemon { command: DaemonCommands, }, 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

§alias_name: String

Configuration alias name (used to identify this config)

§token: Option<String>

ANTHROPIC_AUTH_TOKEN value (your Claude API token)

§url: Option<String>

ANTHROPIC_BASE_URL value (API endpoint URL)

§model: Option<String>

ANTHROPIC_MODEL value (custom model name)

§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)

§api_timeout_ms: Option<u32>

API timeout in milliseconds

§claude_code_disable_nonessential_traffic: Option<u32>

Disable non-essential traffic flag

§anthropic_default_sonnet_model: Option<String>

Default Sonnet model name

§anthropic_default_opus_model: Option<String>

Default Opus model name

§anthropic_default_haiku_model: Option<String>

Default Haiku model name

§claude_code_subagent_model: Option<String>

CLAUDE_CODE_SUBAGENT_MODEL value (model for subagents)

§claude_code_disable_nonstreaming_fallback: Option<u32>

CLAUDE_CODE_DISABLE_NONSTREAMING_FALLBACK flag

§claude_code_effort_level: Option<String>

CLAUDE_CODE_EFFORT_LEVEL value

§disable_prompt_caching: Option<u32>

DISABLE_PROMPT_CACHING flag

§claude_code_disable_experimental_betas: Option<u32>

CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS flag

§disable_autoupdater: Option<u32>

DISABLE_AUTOUPDATER flag

§force: bool

Force overwrite existing configuration

§interactive: bool

Interactive mode for entering configuration values

§token_arg: Option<String>

Positional token argument (for backward compatibility)

§url_arg: Option<String>

Positional URL argument (for backward compatibility)

§from_file: Option<Option<String>>

Import configuration from a JSON file

With no value, imports from ~/.claude/settings.json. With a value, imports from the given path.

§

Remove

Remove one or more configurations by alias name

Deletes stored configurations by their alias names

Fields

§alias_names: Vec<String>

Configuration alias name(s) to remove (one or more)

§

List

List all stored configurations

Displays all saved configurations with their aliases, tokens, and URLs

Fields

§plain: bool

Output in plain text format (default is JSON)

§name: bool

Show only name and URL

§

Completion

Generate shell completion scripts

Generates completion scripts for supported shells

Fields

§shell: String

Shell type (fish, zsh, bash, elvish, powershell)

§

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

§alias_name: String

Configuration alias name to switch to

§resume: Option<String>

Resume a previous Claude session by ID

§continue: bool

Continue the most recent Claude session

§prompt: Vec<String>

Prompt to send to Claude (all remaining arguments)

§

Codex

Manage Codex (OpenAI CLI) configurations

Fields

§

Daemon

Manage the ccs-proxy daemon (start/stop/status/restart)

The daemon supervises one local ccs-proxy per unique upstream URL, transparently capturing all Claude API traffic for the dashboard.

Fields

§

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: StatuslineAction

Action to perform (install or uninstall)

Trait Implementations§

Source§

impl FromArgMatches for Commands

Source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Source§

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<'b>( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
Source§

impl Subcommand for Commands

Source§

fn augment_subcommands<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
Source§

fn augment_subcommands_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
Source§

fn has_subcommand(__clap_name: &str) -> bool

Test whether Self can parse a specific subcommand

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,