Salesforce. Meet PowerShell.

Powerful Salesforce tools. Familiar PowerShell commands.

A simpler, more intuitive way to work with Salesforce.

psfdx brings the power of the Salesforce CLI into PowerShell, making everyday Salesforce development, administration and automation easier.

From connecting to organisations and querying records to deploying metadata, managing sandboxes and troubleshooting applications, psfdx provides a consistent collection of PowerShell commands designed around how people actually work.

Less time remembering CLI syntax. More time getting things done.

Install in one line

Install-Module psfdx

PowerShell 7 on Windows, macOS and Linux, or Windows PowerShell 5.1. You also need the Salesforce CLI, which psfdx can install for you.

Why psfdx

The Salesforce CLI is excellent. psfdx makes it feel native in PowerShell.

  • Built around PowerShell

    Familiar commands and structured objects, so you can filter, sort, export and pipe results like any other PowerShell data.

  • Powered by the official Salesforce CLI

    psfdx is a convenient wrapper around the Salesforce CLI, not a replacement for it. Every command runs the real sf CLI underneath.

  • Designed for real-world Salesforce work

    Metadata, Apex, data, diagnostics and environment management, grouped the way you reach for them day to day.

  • Cross-platform

    PowerShell 7 on Windows, macOS and Linux. Windows PowerShell 5.1 is supported too.

  • Built for automation

    Repeatable scripts and workflows for pipelines, scheduled jobs and the things you are tired of doing by hand.

  • Open source and evolving

    MIT licensed, with automated tests and checks against the latest stable Salesforce CLI on every change.

What it does

Over a hundred commands across seven modules, installed together by Install-Module psfdx.

  • Organisations & Data

    Connect to orgs, manage aliases, run SOQL, create and update records, check limits and call the REST API.

    Connect-Salesforce Select-SalesforceRecords Get-SalesforceLimits

  • Metadata & Deployments

    Retrieve and deploy metadata, validate and quick-deploy, follow a deployment, and describe objects and fields.

    Retrieve-SalesforceMetadata Deploy-SalesforceMetadata Describe-SalesforceObject

  • Development & Testing

    Projects, scratch orgs, Apex tests and code coverage, plus Lightning Web Component Jest tests and the local dev server.

    New-SalesforceScratchOrg Test-SalesforceApex Watch-SalesforceApex

  • Monitoring & Diagnostics

    Watch, export and convert debug logs, look at flow interviews, login history and failures, and pull Event Monitoring files.

    Watch-SalesforceDebugLogs Get-SalesforceLoginFailures Export-SalesforceEventFiles

  • Sandboxes & Packages

    Create, refresh-check and clone sandboxes. Create, version, promote and install packages.

    New-SalesforceSandbox Get-SalesforceSandboxRefreshStatus Promote-SalesforcePackageVersion

  • Agentforce

    Run and review Agentforce agent tests, and activate or deactivate agents, through the Salesforce CLI agent plugin.

    Start-SalesforceAgentTest Get-SalesforceAgentTestResult Enable-SalesforceAgent

See every command in the README, or run Get-Command -Module psfdx after installing.

Quick start

Four lines from nothing to your first query.

Install-Module psfdx
Import-Module psfdx
Connect-Salesforce -Sandbox -SetDefault
Select-SalesforceRecords -Query "SELECT Id, Name FROM Account LIMIT 10"

A browser window opens for you to log in to Salesforce as you normally would, and -SetDefault makes that org the one the next command uses. No Salesforce CLI yet? Install-SalesforceCli installs it. The README has the full steps.

PowerShell simplicity. Salesforce capability.