On this page
Create, inspect, rename, repair and recoverably delete Claude Code profiles, declare which plan an account is on, and manage their stored tokens; deletion archives the profile through saferm and prints the handle that restores it.
#c profile
create, inspect, rename, delete, and manage Claude Code profiles and their stored tokens
#profile create
run the create-profile wizard in one continuous alt-screen session: prompt for the profile name, config directory and launch options, write the profile directory together with its symlinks into the shared store, then drive an interactive Claude Code OAuth login so the profile is authenticated before you leave. Requires a real terminal, and prints the summary and auth outcome afterwards
Effect: mutating
#Grants
| Kind | Name | Reason |
|---|---|---|
| proc_mutate | auth-login | the wizard drives an interactive Claude Code OAuth login for the new profile |
#profile delete
remove a registered profile: hand its directory to saferm, which archives it (the stored token among it) and then removes it, unlink its shared-store symlinks, drop its options.json registration, and clear any last_config reference in state.json. Prints the archive handle that restores it. Refuses a profile holding a live interactive Claude Code session unless --force-delete (background jobs and daemons do not block it), and takes conversation history only with --force-delete-data. saferm must be installed: without it the deletion would be irreversible, so it is refused rather than performed
Effect: mutating ยท consequential (prompts before running; --approve-consequential skips)
#Flags
| Name | Short | Type | Presence | Env | Description |
|---|---|---|---|---|---|
--force-delete, --no-force-delete | bool | required | delete anyway when the profile holds a live interactive Claude Code session (background jobs and daemons never block deletion) | ||
--force-delete-data, --no-force-delete-data | bool | required | delete even when shared-dir names hold REAL data instead of symlinks; this DESTROYS that data (e.g. conversation history) |
#Arguments
| Name | Type | Presence | Description |
|---|---|---|---|
name | str | required | name of the profile to delete (e.g. work, personal, research) |
#Grants
| Kind | Name | Reason |
|---|---|---|
| proc_mutate | archive-delegation | hands the whole profile directory, its stored OAuth token included, to saferm, which archives it and then removes it |
#profile show
print a detailed report for one profile: whether its directory exists on disk, whether it is registered or pinned in options.json, the state of its stored token, its resolved configuration and the session data it holds. Inspects default (~/.claude) like any other profile, and exits non-zero when the name matches no directory, registration or token
Effect: read_only
#Arguments
| Name | Type | Presence | Description |
|---|---|---|---|
name | str | required | name of the profile to inspect (e.g. work, personal, default) |
#profile rename
move a profile to a new name, taking its directory (with the token stored inside it), its options.json registration and its session data with it. Validates that the old name exists, that the new one is free in both the directory tree and the options file, and that it fits the lowercase-letters-digits-hyphens charset. Refuses a profile holding a live interactive Claude Code session, and the reserved name default
Effect: mutating
#Arguments
| Name | Type | Presence | Description |
|---|---|---|---|
old | str | required | current name of the profile to rename (must be an existing, non-running profile) |
new | str | required | new name for the profile (lowercase letters, digits, and hyphens; must be unused) |
#profile fix-auth
repair one profile's authentication: strip the session credentials that shadow its stored long-lived token so the token is used again. Says so plainly when there is nothing to repair, and refuses a name with no profile directory behind it
Effect: mutating
#Arguments
| Name | Type | Presence | Description |
|---|---|---|---|
name | str | required | name of the profile to repair: its shadowing session credentials are removed |
#profile set-plan
declare which plan a profile's Claude account is on, without a prompt. Claude Code resolves its subscription tier from the launch environment and only from there when auth is a stored setup token, so an undeclared profile launches with the tier null and tier-dependent features failing closed. Writes both plan fields into the profile's token entry, leaving the token itself alone; the interactive picker in the create flow and the pre-launch prompt write exactly the same thing
Effect: mutating
#Arguments
| Name | Type | Presence | Description |
|---|---|---|---|
name | str | required | name of the profile to declare a plan for (e.g. work, personal) |
plan | str | required | the plan this profile's Claude account is on; each one stores a subscription type and, where Claude Code has one, a rate-limit tier Values: max-20x (Max 20x (subscriptionType=max, rateLimitTier=default_claude_max_20x)), max-5x (Max 5x (subscriptionType=max, rateLimitTier=default_claude_max_5x)), pro (Pro (subscriptionType=pro, no rate-limit tier)), team (Team (subscriptionType=team, rateLimitTier=default_claude_max_5x)), enterprise (Enterprise (subscriptionType=enterprise, no rate-limit tier)). |
#profile check-tokens
read every discovered profile's own stored OAuth token and validate each one against the Anthropic API, then print a table of profile name, status and a truncated token preview. The status distinguishes a valid token from an invalid one, an unreachable API and an indeterminate answer, and profiles holding no token are listed too
Effect: read_only