> For the complete documentation index, see [llms.txt](https://docs.flosum.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.flosum.com/devops/code/devops-cli/using-devops-cli-in-vs-code.md).

# Using DevOps CLI in VS Code

{% hint style="warning" %}

#### Known Issues: Required Update

**An update is required.** The current release of Flosum DevOps requires the latest versions of the Flosum CLI (**@flosum/cli** package) and the **Flosum DevOps-CLI Extension**. Earlier CLI releases do not support topologies and cannot work with a DevOps tenant that uses them, so existing installations must be updated.

**Node.js 22 is required.** On **Node.js 24**, the install and update commands appear to succeed but leave you on an earlier release. Move to Node.js 22 before installing or updating.
{% endhint %}

{% hint style="success" %}

#### Operating System Compatibility

**Flosum CLI** and **Flosum DevOps-CLI Extension** are compatible with the following operating systems:

* **macOS**
* **Linux**

These tools are currently not designed to work with Windows.
{% endhint %}

## ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FG5ZbxX918xOHwbAwAJ4n%2FSummary2-Small-Icon.svg?alt=media\&token=da26a67f-ff7f-47b3-8669-06be960dc2d7) 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]**

{% hint style="info" %}

#### 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.
  {% endhint %}

## Accessing Flosum Command Palette

{% hint style="info" %}

#### 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**.
{% endhint %}

1. Click the **Flosum** command palette launcher on the left side of the Status Bar.&#x20;

   <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FLbznZ4Lo3O3PF1sHiIUc%2FUsingDevopsCli-AccessCommands-01.png?alt=media&amp;token=04e5d54a-e3e1-40c3-9fc8-0a94a2b25c9d" alt="" width="563"><figcaption></figcaption></figure></div>
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.&#x20;

      <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FNb1JhXYvE94m2ZGlIkv2%2FUsingDevopsCli-AccessCommands-02.png?alt=media&amp;token=52f44be6-2698-4f03-80cb-f8093e1d92dc" alt="" width="563"><figcaption></figcaption></figure></div>
   2. Flosum Command Palette with open DevOps project.&#x20;

      <div align="left"><figure><img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FPZnDmQvukayJWF3JD8kr%2FUsingDevopsCli-AccessCommands-03.png?alt=media&amp;token=6f67ce54-9f70-498f-84a4-36b76e25ad9f" alt="" width="563"><figcaption></figcaption></figure></div>

## Commands \[No Open DevOps Project]

<table><thead><tr><th width="220">Command</th><th>Description</th></tr></thead><tbody><tr><td><strong>Login</strong></td><td>This command creates credentials for connecting to your DevOps tenant.</td></tr><tr><td><strong>Logout</strong></td><td>This command deletes the selected credentials from the DevOps CLI extension.</td></tr><tr><td><strong>Init Devops Project</strong></td><td>This command initializes an empty Salesforce project with the Flosum CLI system files. </td></tr><tr><td><strong>Clone Devops Project</strong></td><td>This command initializes a Salesforce project and clones the <strong>main</strong> branch from your DevOps tenant.</td></tr></tbody></table>

### <img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media&amp;token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f" alt="" data-size="original"> 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.

* [Creating an API Token](/global-settings/security/api-tokens/creating-an-api-token.md)

{% hint style="warning" %}
Make sure you copy your API Token to the clipboard before starting the login process, since clicking outside of VS Code will close the Command Palette.
{% endhint %}

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.

{% @arcade/embed flowId="T1syWzv6kmyCpTkzpl5I" url="<https://app.arcade.software/share/T1syWzv6kmyCpTkzpl5I>" %}

***

### <img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media&amp;token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f" alt="" data-size="original"> Flosum: Logout

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

{% @arcade/embed flowId="MSu0Yw4Cs62MdPXK0s6i" url="<https://app.arcade.software/share/MSu0Yw4Cs62MdPXK0s6i>" %}

***

### <img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media&amp;token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f" alt="" data-size="original"> Flosum: Init Devops Project

This command initializes an empty Salesforce project with the Flosum CLI system files.&#x20;

{% hint style="info" %}
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 [#flosum-login-1](#flosum-login-1 "mention") command for more details.
{% endhint %}

{% @arcade/embed flowId="Sacd0bJ17dHMJiwPIUhH" url="<https://app.arcade.software/share/Sacd0bJ17dHMJiwPIUhH>" %}

***

### <img src="https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media&amp;token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f" alt="" data-size="original"> 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.

{% hint style="info" %}
The DevOps tenant you connect to is determined by the credentials you select. See the [#flosum-login-1](#flosum-login-1 "mention") command for more details about the login credentials and how to create an API Token.
{% endhint %}

{% @arcade/embed flowId="tsDs9iOnDVjuTLaHquJR" url="<https://app.arcade.software/share/tsDs9iOnDVjuTLaHquJR>" %}

***

## Commands \[Open DevOps Project]

<table><thead><tr><th width="220">Command</th><th>Description</th></tr></thead><tbody><tr><td><strong>Login [Project Mode]</strong></td><td>This command selects the credentials that the open project will use to connect to the DevOps tenant.</td></tr><tr><td><strong>Logout [Project Mode]</strong></td><td>This command removes the configured credentials for the open project.</td></tr><tr><td><strong>Checkout Branch</strong></td><td>This command retrieves a branch from your DevOps tenant and copies all components to your local project.</td></tr><tr><td><strong>Pull Branch</strong></td><td>This command retrieves the latest changes from your DevOps tenant for the current branch.</td></tr><tr><td><strong>View Pending Changes</strong></td><td>This command displays all local changes that have not been committed to your DevOps tenant.</td></tr><tr><td><strong>Discard Changes</strong></td><td>This command cancels all local changes that have not been committed to your DevOps tenant.</td></tr><tr><td><strong>Commit Changes</strong></td><td>This command commits all local changes to your DevOps tenant.</td></tr></tbody></table>

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) Flosum: Login \[Project Mode]

This command selects the credentials that the open project will use to connect to the DevOps tenant.&#x20;

{% hint style="info" %}
This command can also create new credentials, but the instructions below only show selecting existing credentials. See the [#flosum-login](#flosum-login "mention") command for details on creating new credentials.
{% endhint %}

{% @arcade/embed flowId="VfvanHtRX99BabxNpSBg" url="<https://app.arcade.software/share/VfvanHtRX99BabxNpSBg>" %}

***

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) Flosum: Logout \[Project Mode]

This command removes the configured credentials for the open project. You must use the [#flosum-login-project-mode](#flosum-login-project-mode "mention") command before you can use the other DevOps commands for this project.

{% hint style="info" %}
This command does not delete the credentials, unlike the [#flosum-logout](#flosum-logout "mention") command when no project is open.
{% endhint %}

{% @arcade/embed flowId="cLb1TL9g3a2ibtjTJHtw" url="<https://app.arcade.software/share/cLb1TL9g3a2ibtjTJHtw>" %}

***

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) 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.

{% hint style="info" %}
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.
{% endhint %}

{% @arcade/embed flowId="TPs3HvXZxS4B9rUhLWTk" url="<https://app.arcade.software/share/TPs3HvXZxS4B9rUhLWTk>" %}

***

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) 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.

{% @arcade/embed flowId="1oitCCDErIYn964RhOHF" url="<https://app.arcade.software/share/1oitCCDErIYn964RhOHF>" %}

***

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) Flosum: View Pending Changes

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

{% @arcade/embed flowId="wUkCjzfoQ0ZX6omIItAd" url="<https://app.arcade.software/share/wUkCjzfoQ0ZX6omIItAd>" %}

***

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) Flosum: Discard Changes

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

{% @arcade/embed flowId="rWz5xiEskdTk1mNBcZRU" url="<https://app.arcade.software/share/rWz5xiEskdTk1mNBcZRU>" %}

***

### ![](https://1800549522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRpUu5iMlzMFAudyBvMOl%2Fuploads%2FEYsn6XHjDMDT9xIRIzSz%2FProgramming-Browser-1--Streamline-Ultimate.svg?alt=media\&token=0d3c11fe-3e3a-45be-8af4-0858ad862e2f) Flosum: Commit Changes

This command commits all local changes to your DevOps tenant.

{% hint style="warning" %}

#### Manual Merging

The DevOps CLI extension does not currently support merging code bases when your local project has both uncommitted changes and a commit history that is behind the remote DevOps branch. In this state, both **Flosum: Commit Changes** and **Flosum: Pull Branch** will fail.

To resync with the remote branch without losing your work:

1. Copy the affected files (or the specific changes) to a location outside the project so you can reapply them after pulling.
2. Roll back your local changes with **Flosum: Discard Changes**. This resets the project to its last committed state so the extension can pull cleanly.
3. Pull the latest DevOps commits with **Flosum: Pull Branch**. Your local project is now in sync with the remote branch.
4. Reapply your saved edits on top of the refreshed code base, resolving any conflicts that arise from overlapping changes.
5. Commit your changes with **Flosum: Commit Changes** to push them back to the DevOps branch.
   {% endhint %}

{% @arcade/embed flowId="baJ6nvEYXkOwVJWOiYhq" url="<https://app.arcade.software/share/baJ6nvEYXkOwVJWOiYhq>" %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.flosum.com/devops/code/devops-cli/using-devops-cli-in-vs-code.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
