switching-org

Switch Salesforce CLI target orgs by username or alias.

Updated Jun 1, 2026
One-click install
npx skills add https://github.com/Collabalist/SFDC --skill switching-org-collabalist
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: switching-org
Source: https://github.com/Collabalist/SFDC/tree/main/.agents/skills/switching-org
Command: npx skills add https://github.com/Collabalist/SFDC --skill switching-org-collabalist

SYSTEM DOCUMENTATION & REQUIREMENTS

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

What problem does it solve?

The ability to switch Salesforce orgs is crucial when you need to work with different orgs, scratch orgs, sandboxes, or production environments. This Skill addresses the need for quick org switching by using the Salesforce CLI, enhancing productivity and avoiding repetitive login procedures.

Core Features & Use Cases

  • Dynamic Org Selection: Users can switch to any org using username or alias.
  • Configurable Default Org: Sets both local and global target-org configurations.
  • Error Handling: Offers suggestions to correct common errors such as unauthorized org access.

Quick Start

To switch your Salesforce org to the one you have been working on, run the command: 'switch org <your-org-username-or-alias>'. This will change your current Salesforce CLI target to the specified org.

Frequently Asked Questions about switching-org

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

FAQPage Schema
How do I switch Salesforce orgs using the CLI?▼

To switch Salesforce orgs, run the switch org command followed by your target username or alias. This automates the Salesforce CLI target-org configuration change, replacing repetitive manual login procedures.

What is the best way to manage multiple Salesforce scratch orgs and sandboxes?▼

Managing multiple Salesforce scratch orgs and sandboxes is best handled by automating org switching via the CLI. You can dynamically select any configured org by its username or alias to enhance workflow productivity.

Does this Salesforce CLI org switching tool support local and global configurations?▼

Yes, this Salesforce CLI org switching tool supports both local and global configurations. It sets the target-org scope dynamically, allowing you to manage project-specific or system-wide default environments.

Do I need the Salesforce CLI installed to switch orgs?▼

Yes, you need the Salesforce CLI installed to switch orgs. This Skill depends on the salesforce-cli framework to execute commands and automate the target-org switching process.

Why does my Salesforce org switch fail with unauthorized access?▼

Your Salesforce org switch might fail with unauthorized access if credentials are invalid. The Skill includes error handling that offers suggestions to correct common unauthorized org access issues during the switch.