dx-org-switch

Switch Salesforce CLI target orgs by username or alias.

Updated Jul 2, 2026
One-click install
npx skills add https://github.com/padjei/SF_Agents --skill dx-org-switch-padjei
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dx-org-switch
Source: https://github.com/padjei/SF_Agents/tree/main/.claude/skills/dx-org-switch
Command: npx skills add https://github.com/padjei/SF_Agents --skill dx-org-switch-padjei

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires salesforce-cli, and includes scripts (resource) components.

What problem does it solve?

This Skill streamlines the process of switching the active Salesforce org in the Salesforce CLI, enhancing productivity for developers and administrators.

Core Features & Use Cases

  • Org Switching: Facilitates quick switching between multiple Salesforce orgs, including scratch orgs, sandboxes, and production environments.
  • User Input Handling: Identifies org by username or alias and provides a list if none is specified.
  • Scope Flexibility: Allows local or global configuration of the default org.
  • Error Handling: Provides feedback and suggestions if the org cannot be set.

Quick Start

To switch your Salesforce org, simply say 'switch org to <orgIdentifier>'.

Frequently Asked Questions about dx-org-switch

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I switch the default Salesforce org using the CLI?

To switch the default Salesforce org, provide the username or alias of the target environment. The tool updates your Salesforce CLI configuration to target the specified scratch org, sandbox, or production environment.

Can I configure Salesforce org switching for a local project only?

Yes, Salesforce org switching supports both local and global configuration scopes. You can set the default org for your current local project or apply the configuration globally across your entire Salesforce CLI environment.

What happens if the Salesforce CLI cannot find the org I want to switch to?

If the Salesforce CLI cannot find the specified org, the tool provides feedback and error resolution advice. It verifies the current target org and offers suggestions to ensure a successful org switch.

Do I need the Salesforce CLI installed to switch orgs?

Yes, the Salesforce CLI is a required dependency for switching orgs. The tool uses the CLI to handle user input, identify the org by username or alias, and apply the local or global configuration settings.

How do I list available Salesforce orgs if I don't know the alias?

If you do not specify an org identifier, the tool provides a list of available orgs. You can then select the correct scratch org, sandbox, or production environment from the list to switch your active target.

Does this tool support switching between scratch orgs and production environments?

Yes, the tool facilitates quick switching between multiple Salesforce orgs, including scratch orgs, sandboxes, and production environments. It handles the user input for identifying and setting the target org.