
switching-org
Switches the active Salesforce org (default target-org) using the Salesforce CLI
by forcedotcomFree
Description
Switching Org is an AI skill that changes the active Salesforce org, the default target-org that the Salesforce CLI uses for its commands. It is for the moment when someone wants the CLI to run against a different org. The skill first identifies the org by username or alias. If none is given, it runs sf org list to show the authenticated orgs and asks which one to use. It then sets the default with sf config set target-org. By default the change is local and applies only inside the current project directory, which suits normal project work. A global setting, which applies across every directory, is used only when the person explicitly asks for it. If the command fails, the skill reports the error and suggests running sf org login web, in case the org is not authorized. To verify, it runs sf config get target-org --json and confirms the value. The skill notes that the JSON output does not say whether the value is local or global, so the agent confirms only the value. It is part of the forcedotcom sf-skills collection on GitHub.…
Highlights
- Switches the default target-org for Salesforce CLI commands
- Lists authenticated orgs when none is named
- Local setting by default, global only on request
- Verifies the new value after switching
Ratings & Reviews
No ratings yet
Be the first to rate switching-org.
People also visit

dx-org-switch
Switches the active Salesforce org (default target-org) using the Salesforce CLI

dx-org-devhub-configure
Enable Dev Hub on a Salesforce org and view its scratch org allocation

automation-sandbox-post-copy-configure
Apply a Salesforce sandbox post-copy automation JSON config against a target org
switching-org FAQ
What does the skill change?
The default target-org, which decides which Salesforce org the CLI commands run against.
Is the change global?
Not by default. It applies to the current project directory unless the person explicitly asks for a global setting.
What if the org is not authorized?
The skill reports the error and suggests running sf org login web.
How do I install it?
Run npx skills add https://github.com/forcedotcom/sf-skills --skill switching-org.
What do the security audits show?
Gen Agent Trust Hub: Pass. Socket: Pass. Snyk: Pass.
What are the best switching-org alternatives?
Popular alternatives to switching-org include dx-org-switch, dx-org-manage and dx-org-devhub-configure. See all switching-org alternatives

