Overview Version History Q & A Rating & Review
SF Org Deploy Guard
Warns before SFDX: Deploy This Source to Org when your default Salesforce target org is on a blocked list, then delegates the real deploy to the Salesforce Extension Pack.
Requirements
Salesforce Extension Pack
Salesforce CLI (sf) authenticated with a default target org
An SFDX project open in VS Code (sfdx-project.json)
Usage
Configure blocked orgs (optional):
Go to VS Code Settings -> Extensions -> SF Org Deploy Guard -> Blocked Orgs -> Add Item -> Add either your Org alias or username
OR
Add following in VS Code settings.json, Add either your Org alias or username
{
"sfOrgDeployGuard.blockedOrgs": [
"org-alias",
"org-username@company.com"
]
}
Matching is case-insensitive against the org alias or username . An empty list means no warning.
Deploy with the guarded command (appears just above the standard SFDX deploy entry):
Right-click a source file/folder → SFDX: Deploy This Source (Guarded) to Org
Or Command Palette → SFDX: Deploy This Source (Guarded) to Org
If the target org is blocked, choose Deploy Anyway to continue or dismiss / cancel to abort.
The original Salesforce Extension Pack deploy commands still exist; use SF Org Deploy Guard when you want the warning.
Local development
cd ~/Path/of/your/local/repo/sf-org-deploy-guard
npm install
npm run compile
Open this folder in VS Code/Cursor and press F5 (Run Extension).
Package a VSIX
npx @vscode/vsce package
Install the generated .vsix via Extensions: Install from VSIX... .