Skip to content

profile

The profile subcommand manages named profiles. Profiles let you switch between separate sets of commands, variables, and settings, useful for separating work and personal commands, keeping the same aliases across different projects, or maintaining different variable values across environments.

The available subcommands for profile are:


add

Creates a new profile.

> cb profile add work

? Enter description: Work-related commands and variables.
> cb profile add work "Work-related commands and variables."

If you want to be prompted for every field, use the --interactive (or -i) flag.


get

Retrieves and displays a saved profile.

> cb profile get work

update

Aliases

update can also be called as edit.

Updates an existing profile.

> cb profile update work --description "New description."

To rename a profile, use the --name flag.

> cb profile update work --name office

Warning

The default profile cannot be renamed. It is the one profile guaranteed to always exist, and its name determines which settings file is used. Attempting to rename it raises an error.

Multiple fields can be updated at once using --set with key=value pairs, or use --edit (or -e) to be prompted interactively for each field, pre-filled with its current value. These work the same way as they do for cmd update and var update.


list

Aliases

list can also be called as ls.

Displays all stored profiles.

> cb profile list

delete

Aliases

delete can also be called as rm, del, or remove.

Deletes a profile.

> cb profile delete work

If the profile still has commands or variables assigned to it, the delete is blocked and the error tells you how many. Use --force to delete the profile along with everything in it.

> cb profile delete work --force

Warning

The default profile can never be deleted, regardless of --force. A profile that is currently active (for commands, variables, or settings) also cannot be deleted, switch away from it first.


status

Aliases

status can also be called as where.

Shows the currently active profile for commands, variables, and settings. This is the "where am I" check, especially useful once you start switching profiles independently, since it's easy to lose track of which profile applies to what.

> cb profile status

The output flags whether all three are currently linked (pointing at the same profile) or have diverged.


switch

Aliases

switch can also be called as set.

Switches the active profile. This is what runs when you use the shorthand cb profile <name>, you rarely need to type switch explicitly.

> cb profile work

With no flags, this switches command, variable, and settings profiles all at once, the default "linked" behavior. To switch only some of them, use --cmd, --var, and/or --settings:

> cb profile work --cmd --var

This switches the command and variable profiles to work, leaving whatever settings profile was active untouched.

Note

Because the bare-name shorthand only works when the name doesn't collide with a real profile subcommand, a profile literally named add, list, status, etc. can't be reached via cb profile <name>. Use cb profile switch <name> explicitly in that case.


cmd

Switches only the active command profile.

> cb profile cmd work

var

Switches only the active variable profile.

> cb profile var personal

settings

Switches only the active settings profile.

> cb profile settings work