Skip to content
Development
Command

/logout

Sign out of one or all Salesforce orgs (sf org logout). Confirms before destructive action.

From plugin
sf-skills
1.1k15 skills6 agents15 commands4 MCP
$ npx -y skills add forcedotcom/sf-skills --agent claude-code

Command definition

logout.md
description: Sign out of one or all Salesforce orgs (sf org logout). Confirms before destructive action.
allowed-tools:
  - Bash
argument-hint: "[--target-org <alias>] [--all]"

Log out of one or more Salesforce orgs.

Workflow:

1. **Parse arguments** ($ARGUMENTS):

  • `--target-org <alias>` → log out of a specific org
  • `--all` → log out of every authenticated org
  • No arguments → list current orgs and ask which to log out of

2. **If no arguments:** call `sf org list --skip-connection-status --json` (skip the per-org token refresh), present the orgs in a numbered list, and ask the user which to log out of.

3. **Confirm before action:** show the alias(es) about to be logged out and require explicit "yes" confirmation. This is destructive and the user will need to re-authenticate to use the org again.

4. **Run the logout:**

   sf org logout --target-org <alias> --no-prompt
   # or
   sf org logout --all --no-prompt

5. **Report:** confirm which orgs are now logged out. If the project's current `target-org` was logged out, suggest the user pick a new default via `/salesforce-development:set-default <alias>` or authenticate fresh via `/salesforce-development:login`.

Rules:

  • ALWAYS confirm before logging out
  • NEVER log out without explicit user input (no auto-cleanup)
  • If the user logs out of the target-org, their next deploy/data command will fail until they reconfigure
Read more
@forcedotcom
Ships withsf-skills

This repository provides Salesforce agent skills, plugins, and sample apps for building applications.

1.1k200 skills6 agents4 MCP
Get the whole plugin

Stars on GitHub

Momentum

stars in total
1.1k
Star history of forcedotcom/sf-skills on GitHub, a chart by star-history.com

Other commands on sf-skills.

discover

discover

Command

Show ranked what's-next nudges across the six-stage journey, run on-demand org feature detection, or find an uninstalled plugin…

@forcedotcom@forcedotcomInstall Command
feedback

feedback

Command

Record a quick 1-5 satisfaction rating as local usage telemetry. Manual-only — never dispatched by the model.

@forcedotcom@forcedotcomInstall Command
login

login

Command

Authenticate to a new Salesforce org via the browser (sf org login web). Optionally set the org as the project's default target.

@forcedotcom@forcedotcomInstall Command
org

org

Command

Show just the connected Salesforce org details — alias, edition, API version, instance URL, username.

@forcedotcom@forcedotcomInstall Command

More commands from other plugins.

build
Auto-invoked

build

Command

Implement tasks incrementally — build, test, verify, commit. Add "auto" to run the whole plan in one approved pass.

@addyosmani@addyosmaniInstall Command