mirror of
https://github.com/forcedotcom/afv-library.git
synced 2026-08-05 23:41:31 +08:00
1.3 KiB
1.3 KiB
| description | allowed-tools | argument-hint | |
|---|---|---|---|
| Sign out of one or all Salesforce orgs (sf org logout). Confirms before destructive action. |
|
[--target-org <alias>] [--all] |
Log out of one or more Salesforce orgs.
Workflow:
-
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
-
If no arguments: call
sf org list --json, present the orgs in a numbered list, and ask the user which to log out of. -
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.
-
Run the logout:
sf org logout --target-org <alias> --no-prompt # or sf org logout --all --no-prompt -
Report: confirm which orgs are now logged out. If the project's current
target-orgwas 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