For the complete documentation index, see llms.txt. This page is also available as Markdown.

Using DevOps CLI in VS Code

Known Issues: Required Update

Operating System Compatibility

Overview

This article shows you how to use the DevOps CLI extension in Visual Studio Code (VS Code) to access the available commands. The sections below explain each command and provide instructions for using them. The available commands depend on whether a DevOps project is currently open in VS Code: some work only within a DevOps project, while others are used to create one. The commands are separated into the following sections:

  • Commands [No Open DevOps Project]

  • Commands [Open DevOps Project]

Best Practices

  • Use clear DevOps tenant login credential aliases, such as prod-admin, sandbox-dev, or customer-xyz, to make switching easier.

  • When possible, use the Clone Devops Project command when starting a project, since it configures project credentials automatically.

  • Run Pull Branch before committing to avoid pushing stale changes.

  • Use View Pending Changes before committing to confirm exactly what will be pushed.

  • If DevOps commands stop working, confirm that your project still has the correct credentials set to connect to your DevOps tenant. If needed, run the Login command again.

Accessing Flosum Command Palette

Flosum Command Palette

To access the Flosum Command Palette, ensure the Status Bar in VS Code is visible. Control its visibility through View > Appearance > Status Bar.

  1. Click the Flosum command palette launcher on the left side of the Status Bar.

  2. The Flosum Command Palette opens at the top of the VS Code window.

  3. The available commands differ depending on whether a DevOps project is open.

    1. Flosum Command Palette with no open DevOps project.

    2. Flosum Command Palette with open DevOps project.

Commands [No Open DevOps Project]

Command
Description

Login

This command creates credentials for connecting to your DevOps tenant.

Logout

This command deletes the selected credentials from the DevOps CLI extension.

Init Devops Project

This command initializes an empty Salesforce project with the Flosum CLI system files.

Clone Devops Project

This command initializes a Salesforce project and clones the main branch from your DevOps tenant.

Flosum: Login

This command creates credentials with an API Token generated in the Flosum Global Settings app. The credentials are used for connecting to your DevOps tenant. For instructions on creating an API Token, see the following article.

You can have multiple login credentials. When you log in, you’re prompted to enter an alias for the credential to help distinguish it from others. The alias doesn’t affect authentication, so it’s best to choose a name that indicates which tenant the credential belongs to.

spinner

Flosum: Logout

This command deletes the selected credentials from the DevOps CLI extension. The credentials can be added again through the Login command.

spinner

Flosum: Init Devops Project

This command initializes an empty Salesforce project with the Flosum CLI system files.

When this project is initialized, no credentials are associated with it. After the project is created, run the Flosum: Login command from inside the project to connect to the desired DevOps tenant. See the Using DevOps CLI in VS Code command for more details.

spinner

Flosum: Clone Devops Project

This command initializes a Salesforce project and uses the selected login credentials to clone the main branch from your DevOps tenant.

The DevOps tenant you connect to is determined by the credentials you select. See the Using DevOps CLI in VS Code command for more details about the login credentials and how to create an API Token.

spinner

Commands [Open DevOps Project]

Command
Description

Login [Project Mode]

This command selects the credentials that the open project will use to connect to the DevOps tenant.

Logout [Project Mode]

This command removes the configured credentials for the open project.

Checkout Branch

This command retrieves a branch from your DevOps tenant and copies all components to your local project.

Pull Branch

This command retrieves the latest changes from your DevOps tenant for the current branch.

View Pending Changes

This command displays all local changes that have not been committed to your DevOps tenant.

Discard Changes

This command cancels all local changes that have not been committed to your DevOps tenant.

Commit Changes

This command commits all local changes to your DevOps tenant.

Flosum: Login [Project Mode]

This command selects the credentials that the open project will use to connect to the DevOps tenant.

This command can also create new credentials, but the instructions below only show selecting existing credentials. See the Flosum: Login command for details on creating new credentials.

spinner

Flosum: Logout [Project Mode]

This command removes the configured credentials for the open project. You must use the Flosum: Login [Project Mode] command before you can use the other DevOps commands for this project.

This command does not delete the credentials, unlike the Flosum: Logout command when no project is open.

spinner

Flosum: Checkout Branch

This command retrieves a branch from your DevOps tenant, copies all components to your local project, and sets the branch as the project's current branch.

This command can also be used to create a new branch, which will also be created in your DevOps tenant. However, the following instructions only show you how to check out an existing branch.

spinner

Flosum: Pull Branch

This command retrieves the latest changes from your DevOps tenant for the current branch. If you have uncommitted changes, you must commit them or roll them back before pulling from DevOps.

spinner

Flosum: View Pending Changes

This command displays all local changes that have not been committed to your DevOps tenant.

spinner

Flosum: Discard Changes

This command rolls back all local changes that have not been committed to your DevOps tenant.

spinner

Flosum: Commit Changes

This command commits all local changes to your DevOps tenant.

Manual Merging

spinner

Last updated

Was this helpful?