Forrest logo
tool overview
On this page you find all important commands for the CLI tool sfdx. If the command you are looking for is missing please ask our AI.

sfdx

Sfdx, or Salesforce CLI (Command Line Interface), is a powerful command line tool provided by Salesforce for developing and managing Salesforce applications.

  1. Sfdx allows developers to perform various tasks, such as creating and managing Salesforce projects, orgs, and metadata, directly from the command line.
  2. It provides a standardized development framework and supports source-driven development, which allows developers to version control and deploy changes easily.
  3. With sfdx, you can create scratch orgs, which are temporary Salesforce orgs for development and testing purposes, without the need for traditional sandboxes.
  4. It enables developers to easily create, retrieve, deploy, and test metadata, allowing for faster development cycles.
  5. Sfdx provides a mechanism to share and manage code across different orgs using source control tools like Git.
  6. It supports features like Salesforce DX, allowing developers to develop and package code as unlocked packages, which can be easily installed and updated in any Salesforce org.
  7. Sfdx provides commands for data manipulation, such as importing/exporting data, creating data records, and performing data migrations.
  8. It supports automated scripting and integration with external tools, making it convenient for integrating Salesforce development into CI/CD pipelines.
  9. Developers can use sfdx to run Apex code, execute SOQL queries, and perform various administrative tasks from the command line.
  10. It provides a rich set of developer tools and features, such as code completion, interactive debugging, and integrated testing frameworks, enhancing developer productivity.

List of commands for sfdx:

  • sfdx:tldr:1afdb sfdx: Open a specific organization in the default web browser.
    $ sfdx force:org:open --targetusername ${organization}
    try on your machine
    explain this command
  • sfdx:tldr:1efc8 sfdx: Generate a password for the organization's logged-in user.
    $ sfdx force:user:password:generate --targetusername ${organization}
    try on your machine
    explain this command
  • sfdx:tldr:5b145 sfdx: Display information about a specific organization.
    $ sfdx force:org:display --targetusername ${organization}
    try on your machine
    explain this command
  • sfdx:tldr:75f4f sfdx: Pull source metadata from an Organization.
    $ sfdx force:source:pull --targetusername ${organization}
    try on your machine
    explain this command
  • sfdx:tldr:aa547 sfdx: Assign a permission set for the organization's logged-in user.
    $ sfdx force:user:permset:assign --permsetname ${permission_set_name} --targetusername ${organization}
    try on your machine
    explain this command
  • sfdx:tldr:aaaf8 sfdx: Push source metadata to an Organization.
    $ sfdx force:source:push --targetusername ${organization}
    try on your machine
    explain this command
  • sfdx:tldr:b5ab1 sfdx: Authorize a Salesforce Organization.
    $ sfdx force:auth:web:login --setalias ${organization} --instanceurl ${organization_url}
    try on your machine
    explain this command
  • sfdx:tldr:cd438 sfdx: List all authorized organizations.
    $ sfdx force:org:list
    try on your machine
    explain this command
tool overview