
dx-org-switch
Switches the active Salesforce org (default target-org) using the Salesforce CLI
by forcedotcomFree
Description
dx-org-switch is a small Salesforce agent skill that changes which org the Salesforce CLI targets by default. Given a username or alias, the agent runs sf config set target-org for the current project. It only sets the value globally with --global when the user asks for that. If no org is named, it runs sf org list and asks which authenticated org to use. After setting it, the agent checks the result with sf config get target-org --json and reports the value. Because that output does not show whether the setting is local or global, it confirms the value only. If something fails, it reports the error and suggests sf org login web for orgs that may not be authorized. It is part of forcedotcom/sf-skills.…
Highlights
- Sets the default target-org with the sf CLI
- Project-local by default, global on request
- Lists authenticated orgs when none is given
- Verifies the change and reports errors
Ratings & Reviews
No ratings yet
Be the first to rate dx-org-switch.
People also visit

switching-org
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

integration-connectivity-connected-app-configure
Salesforce Connected Apps and External Client Apps OAuth configuration

platform-dataspace-access-configure
Configure or inspect Salesforce Data Cloud DataSpace access for permission sets
dx-org-switch FAQ
What does dx-org-switch do?
It switches the active Salesforce org that CLI commands run against by setting the default target-org.
What is the install command?
Install it with the skills CLI: `npx skills add https://github.com/forcedotcom/sf-skills --skill dx-org-switch`.
Does it change the org globally?
Only if you ask. By default it runs sf config set target-org in the current project; it adds --global when you request system-wide scope.
What happens if the switch fails?
The agent reports the error and suggests running sf org login web in case the org is not authorized.
What are the security audit results?
The skills.sh page lists these results: Gen Agent Trust Hub: Pass, Socket: Pass, Snyk: Pass.
What are the best dx-org-switch alternatives?
Popular alternatives to dx-org-switch include switching-org, dx-org-manage and dx-org-devhub-configure. See all dx-org-switch alternatives
