Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Salesforce CLI RunnerNew to Visual Studio Code? Get it now.
Salesforce CLI Runner

Salesforce CLI Runner

Geetha Charan

|
5 installs
| (0) | Free
Run Salesforce CLI (sf/sfdx) commands from VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Salesforce CLI Runner VS Code Extension

Run Salesforce CLI (sf or sfdx) commands from the VS Code command palette and stream output into an Output Channel.

Features

  • Run common Salesforce CLI commands from a quick pick (eg. list orgs, open org, run anonymous Apex).
  • Enter a custom CLI command when needed.
  • Streams stdout/stderr live into the "Salesforce CLI" output channel.

CLI detection and configuration

  • Configuration key: sfcli.cliPath — if set, the extension uses that path exactly.
  • If sfcli.cliPath is not configured the extension will attempt to detect a CLI on your PATH:
    1. Try sf --version.
    2. If that fails, try sfdx --version.
  1. If neither is detected the extension falls back to using sf and shows a warning; you can set sfcli.cliPath to a custom executable if needed.

Note: detection is a best-effort check that runs a small --version probe. If you rely on a non-standard install location, set sfcli.cliPath explicitly in your settings.

Safety and privacy

This extension runs arbitrary CLI commands on your machine (including ones you type in the custom command box). Be careful with commands that can modify orgs or delete data. The extension does not transmit any output or credentials off your machine.

Commands

  • Salesforce CLI: Run Command — open a quick pick to select a preset CLI command or enter a custom one.

Development / build

  1. Open this folder in VS Code.
  2. From the project root run:
Set-Location -LiteralPath 'c:\Users\Charan\VS Workspace\VS Extension\sf-vscode-extension'
npm install
npm run compile
  1. Press F5 in VS Code to launch an Extension Development Host and test the command.

Notes for maintainers

  • The extension currently uses Node's child_process.spawn to stream CLI output. That approach works for most cases. If you need more robust cross-platform argument/quoting handling consider using a helper like execa or cross-spawn.
  • The extension will surface non-zero exit codes and termination signals to the user via VS Code notifications.
  • The package.json includes a compile script (tsc -p ./) that emits files into out/.

If you'd like, I can also add a short section with example commands or update package.json with publisher/repository metadata when you're ready to publish.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft