pub enum AccountAction {
Add {
label: String,
no_login: bool,
desktop: bool,
email: Option<String>,
yes: bool,
codex: bool,
adopt_current: bool,
},
Status {
json: bool,
},
Switch {
label: String,
codex: bool,
desktop: bool,
cli: bool,
dry_run: bool,
yes: bool,
force: bool,
keep_bridge: bool,
backup_sessions: bool,
keep_backups: usize,
delete_conflict: Vec<String>,
},
MergeHistory {
data_dir: PathBuf,
from: Vec<PathBuf>,
dry_run: bool,
},
}Variants§
Add
Register an isolated account and open Claude Code to sign it in.
Fields
desktop: boolCapture a Claude Desktop app account under this label instead
of a claude CLI one (macOS). The app has a single login slot, so
this signs it out, waits for you to sign in as the new account, and
saves what it writes. Your current login is restored if you cancel.
email: Option<String>E-mail to label a --desktop account with. Asked for at the prompt
if omitted; purely cosmetic, and skipped when not interactive.
Status
Show which Claude account the Desktop app and the claude CLI use, and
which Codex account ~/.codex holds.
Switch
Make
Fields
label: StringAccount to switch to. Desktop profiles come from claude-acc’s store;
CLI accounts from [[anthropic.accounts]] / accounts_dir; Codex
accounts from [[openai.accounts]].
codex: boolSwitch the Codex login (~/.codex/auth.json, shared by the Codex
CLI, desktop app and IDE extension) instead of Claude.
force: boolOverwrite a claude CLI login (with --codex, a ~/.codex login)
that belongs to no managed account. That login cannot be saved
first, so this discards it.
keep_bridge: boolKeep bridge-state.json rather than clearing it. Diagnostic only:
a stale remote-control session id breaks /remote-control.
backup_sessions: boolAlso archive the whole session tree, as claude-acc does. Off by default because the history merge is additive.
delete_conflict: Vec<String>Confirm that this type-scoped conflict key, deleted in one account
but still held by another, should be removed everywhere. Repeatable.
Supplying any suppresses the interactive prompt — keys not listed
are kept — which is how the macOS menu bar passes an answered dialog
through.
account status --json lists the candidates as deletion_conflicts.
MergeHistory
Merge every account’s history into the account a Claude Desktop profile is already signed into (macOS). Additive: nothing is ever deleted, and no credential or app state is touched.
BY DESIGN THIS CROSSES ACCOUNTS. Afterwards the signed-in account’s window lists conversations and routines that were started under your other accounts, because the point is that every profile opens on the union of everything. That is a feature, not a leak — but it does mean one account’s window shows another account’s chat titles, so do not run it across accounts that must stay visually separate.
For side-by-side Desktop copies launched with --user-data-dir, run
this just before the app starts. Use account switch for the normal
single-profile case.
Fields
data_dir: PathBufThe profile to merge into — the same directory the app is launched
with via --user-data-dir. Required, and refused for the default
profile, which account switch owns.
Trait Implementations§
Source§impl Clone for AccountAction
impl Clone for AccountAction
Source§impl Debug for AccountAction
impl Debug for AccountAction
Source§impl FromArgMatches for AccountAction
impl FromArgMatches for AccountAction
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 AccountAction
impl Subcommand for AccountAction
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 AccountAction
impl RefUnwindSafe for AccountAction
impl Send for AccountAction
impl Sync for AccountAction
impl Unpin for AccountAction
impl UnsafeUnpin for AccountAction
impl UnwindSafe for AccountAction
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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