logout Commands

Commands to log out of an environment.

logout

Log out interactively from environments, such as Salesforce orgs and compute environments.

Description for logout

By default, the command prompts you to select which environments you want to log out of. Use --no-prompt to not be prompted and log out of all environments.

Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.

Examples for logout

Interactively select the environments to log out of:

1sf logout

Log out of all environments, without being prompted:

1sf logout --no-prompt

Usage

sf logout
[--json]
[--no-prompt]

Flags

--json
Optional

Format output as json.

Type: boolean
--no-prompt
Optional

Don't prompt for confirmation; logs you out of all environments.

Type: boolean

logout functions

Log out of your Salesforce Functions account.

Examples for logout functions

Log out:

1sf logout functions

Usage

sf logout functions

logout org

Log out of a specified Salesforce org.

Description for logout org

By default, the command prompts you to confirm that you want to log out of the specified org. Use --no-prompt to not be prompted.

Be careful! If you log out of a scratch org without having access to its password, you can't access the scratch org again, either through the CLI or the Salesforce UI.

Examples for logout org

Log out of an org with alias "ci-org":

1sf logout org --target-org ci-org

If your org doesn’t have an alias, specify the username that you used when you logged into it:

1sf logout org --target-org jdoe@example.org

Usage

sf logout org
[--json]
-o TARGET-ORG
[--no-prompt]

Flags

--json
Optional

Format output as json.

Type: boolean
-o | --target-org TARGET-ORG
Required

Org alias or username to log out of.

Type: option
--no-prompt
Optional

Don't prompt for confirmation.

Type: boolean