Newer Version Available

This content describes an older version of this product. View Latest

alias:set

Set username aliases for the Salesforce CLI.

Help for alias:set

You can associate an alias with only one username at a time. If you’ve set an alias multiple times, the alias points to the most recent username.

Examples for alias:set

1sfdx alias:set YourAlias=username@example.com
1sfdx alias:set YourAlias=username@example.com YourOtherAlias=devhub@example.com

Command Syntax

sfdx alias:set
[--json]
[--loglevel LOGLEVEL]

Parameters

--json
Optional

Format output as JSON.

Type: boolean
--loglevel LOGLEVEL
Optional

The logging level for this command invocation. Logs are stored in $HOME/.sf/sf.log.

Type: enum
Permissible values are: trace, debug, info, warn, error, fatal, TRACE, DEBUG, INFO, WARN, ERROR, FATAL
Default value: warn

Aliases for alias:set

1force:alias:set