Skip to main content

Salesforce CLI

Explore practical guides and implementation patterns for this topic.

Posts

Salesforce Basics

Mastering Salesforce DX (SFDX), Scratch Orgs & Source-Driven Development in 2026: A Practical Guide

💬 In plain words: Salesforce DX (SFDX) flips the traditional development model upside down. Instead of treating your Salesforce org as the main source of truth, your Git repository becomes the master record. Scratch orgs are temporary, disposable Salesforce environments spun up from your configuration files in minutes. You build your feature, push your code to Git, and throw the scratch org away. This shift is what makes real code reviews and automated Continuous Integration (CI) possible on Salesforce. ⚡ 1-Minute Summary & Key Points If you are preparing for an architect interview or modernizing your team's release pipeline, keep these core pillars in mind: Git is the absolute source of truth: Salesforce orgs are no longer the master record; they are simply copies built from your Git repository. Automated pipelines drive deployments: Every code merge triggers an automated pipeline that validates, runs tests, and deploys your metadata only i...
Read article
Topic Architecture & DevOps
Salesforce Architecture & DevOps

Set Up VS Code, Salesforce CLI and Java for Development

In plain words: Visual Studio Code (VS Code) is the code editor most Salesforce developers use. Add Java, the Salesforce CLI, and the Salesforce Extension Pack, and your computer becomes a full Salesforce development setup. You can write Apex, build Lightning Web Components (LWC), and deploy metadata from your own machine instead of the in-browser Developer Console. The whole setup takes about 15 minutes. Modern Salesforce development is "source-driven." You write and test code on your local computer, keep it in Git, and then deploy it to a scratch org, sandbox, or Developer Edition org. VS Code gives you a large library of extensions, good syntax highlighting, and built-in Git support. This guide walks through each step, in order, to get your machine ready for Salesforce DX ( SFDX ) development.
Read article
Topic LWC
Lightning Web Components

Deploy Lightning Web Component Files - Full Code with Output

Lightning Web Components (LWC) provide a modern, lightweight standard for building performant custom interfaces in Salesforce. In this guide, we will step through creating, configuring, and deploying a foundational LWC component from your local environment directly into a Salesforce org using modern Salesforce CLI commands.
Read article
Topic LWC
Lightning Web Components

How to Get Started with Lightning Web Components (LWC) in Salesforce: Complete Beginner Roadmap

In plain words: Lightning Web Components (LWC) is Salesforce's modern UI development framework built on standard web technologies like HTML5, CSS, and modern JavaScript (ES6+). Instead of using legacy proprietary frameworks (such as Aura or Visualforce), LWC runs directly on the browser's native engine, delivering faster performance, easier debugging, and reusable custom interfaces. Building high-performing, custom user interfaces on the Salesforce platform begins with Lightning Web Components. By combining W3C Web Component standards with Salesforce platform services (such as Lightning Data Service and Apex integrations), LWC allows developers to deliver responsive enterprise applications. This 10-step roadmap covers everything you need to start developing with LWC effectively.
Read article
Topic Best Practices DevOps Manifest Generation Metadata API Package.xml Salesforce CLI Salesforce Deployment VS code
Best Practices DevOps Manifest Generation Metadata API Package.xml Salesforce CLI Salesforce Deployment VS code

How to Generate and Retrieve Package.xml in Salesforce Without Workbench

In plain words: A package.xml file is the blueprint manifest that tells Salesforce exactly which metadata components (like Apex classes, custom fields, flows, or layout definitions) you want to pull down from an org or deploy to another environment. While legacy tools like Workbench were once popular, modern Salesforce development uses the Salesforce CLI ( sf ) , VS Code Extensions , and automated manifest generators to build and retrieve metadata faster and more securely. In Salesforce development, managing metadata across development sandboxes, staging environments, and production orgs requires precise versioning. The package.xml file acts as the project manifest, specifying metadata types, member names, and API version numbers. With legacy web utilities like Workbench facing deprecation and security constraints, adopting command-line and IDE-driven manifest workflows is essential for modern Salesforce DevOps.
Read article
Salesforce Architecture & DevOps

Salesforce CLI Guide: Development, Deployments and Orgs

In plain words: The Salesforce Command Line Interface (Salesforce CLI / SFDX ) is a powerful developer tool that lets you manage orgs, deploy code, run automated tests, and handle source control directly from your terminal. Instead of clicking through manual setup menus in the browser, Salesforce CLI allows you to execute deployment scripts, spin up temporary scratch orgs , and integrate seamlessly into CI/CD pipelines. Modern enterprise Salesforce development has shifted away from traditional browser-based development toward source-driven workflows. The Salesforce CLI serves as the underlying engine powering this transition. Whether you are building Lightning Web Components locally, deploying metadata via Git, or running automated unit tests on scratch orgs, mastering CLI commands is essential for modern Salesforce engineers.
Read article
Salesforce Architecture & DevOps

What Is Salesforce DX (SFDX)? Modern Development Explained

In plain words: Salesforce DX (Developer Experience) is a modern set of tools and practices that shifts Salesforce development away from the cloud and onto your local computer. It allows teams to use version control (like GitHub), automate deployments, and build in temporary, disposable Salesforce environments called " Scratch Orgs ." For years, developing on Salesforce meant logging into a Sandbox, making changes directly in the cloud, and relying on messy Change Sets to move code into Production. This "org-driven" approach made it incredibly difficult for large teams to collaborate without stepping on each other's toes. Salesforce DX (often abbreviated as SFDX ) completely changed the game. It introduced an industry-standard, agile approach to building enterprise applications on the platform. Let's explore the core pillars of Salesforce DX and why every modern Salesforce developer needs to master it.
Read article
Salesforce Architecture & DevOps

Retrieve All Salesforce Metadata Using package.xml and CLI

In plain words: In Salesforce, package.xml is a manifest file that lists the configuration components (like Apex classes, custom fields, flows, and Lightning web components) you want to extract from an org or deploy to another environment using Metadata API tools and the Salesforce CLI. Whether you are establishing a local Git repository, backing up an org configuration, or running automated CI/CD deployment pipelines, understanding how to construct and execute a package.xml manifest is a fundamental skill for every Salesforce developer and DevOps engineer.
Read article
Salesforce Architecture & DevOps

How to Build package.xml in Salesforce: Tools and CLI

Managing customizations, version control, and sandbox migrations in Salesforce requires pulling your configuration files and code down into local workspaces. The fundamental manifest driving these operations is the package.xml file. Instead of writing hundreds of XML tags manually, modern tooling allows you to generate and retrieve complete org metadata in seconds. In plain words: A package.xml file is a project manifest or shopping list that tells Salesforce's Metadata API exactly which Custom Objects, Apex Classes, Flows, and Page Layouts to package, download, or deploy.
Read article