> 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/updating-flosum-cli-and-devops-cli-extension.md).

# Updating Flosum CLI and DevOps-CLI Extension

{% 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 explains how to update an existing Flosum CLI installation to the latest release.

The Flosum CLI stays on the version you installed until you run the update command, so a working installation can become outdated without any indication that a newer release exists.

Updating uses the same command as installing. However, you should check your Node.js version before running it.

{% hint style="warning" %}

#### Confirm Your Node.js Version Before You Update

Run `node --version` and confirm it reports **v22.x** before updating anything.

On any other version of Node.js, the update command will replace your working installation with an older release without reporting any errors.
{% endhint %}

## Before You Update

{% hint style="info" %}
Full prerequisite instructions are in the installation article.

* [Installing Flosum CLI Node.js Package](/devops/code/devops-cli/installing-flosum-cli-node.js-package.md)
  {% endhint %}

{% stepper %}
{% step %}

### Note Your Flosum CLI Version

1. Record the version you are updating from:

   ```
   flosum --version
   ```
2. Check the latest published release:

   ```
   npm view @flosum/cli version
   ```

If both report the same version, you are already up to date, and no update is needed.
{% endstep %}

{% step %}

### Confirm Node.js and npm

1. Run the following commands:

   ```
   node --version
   npm --version
   ```
2. Confirm that `node --version` reports **v22.x** and that `npm --version` reports **10.x**.
3. If either is different, correct it before continuing. The installation article explains the Node.js and npm prerequisites.
   {% endstep %}

{% step %}

### Confirm the Build Tools Are Still Present

The Flosum CLI includes a native component. When a release changes that component, the update recompiles it and needs **Python 3** and a **C++ compiler**.

1. Confirm **Python 3** is available:

   ```
   python3 --version
   ```
2. Confirm the C++ compiler is still installed.

{% hint style="info" %}
Keep the build tools installed. Not every update recompiles the native component, but the ones that do will fail without them.
{% endhint %}
{% endstep %}
{% endstepper %}

## Updating the Flosum CLI

{% stepper %}
{% step %}

### Run the Update Command

1. Open a terminal.
2. Run the same command used to install the CLI:

   ```
   npm i -g @flosum/cli
   ```
3. Wait for the command to finish. It reports the number of packages it changed, for example `changed 1656 packages`.

{% hint style="info" %}
An update is usually faster than a first installation. Expect it to take longer when the release changes the native component.
{% endhint %}
{% endstep %}

{% step %}

### Verify the Update

1. Run the following commands:

   ```
   flosum --version
   npm view @flosum/cli version
   ```
2. Confirm that both report the same version.

If `flosum --version` still reports the earlier version, the update did not take effect. See Troubleshooting.
{% endstep %}
{% endstepper %}

## Updating the Extension

The **Flosum DevOps-CLI Extension** is installed and updated separately through **Visual Studio Code**, rather than through this command.

1. In **Visual Studio Code**, open the **Extensions** view.
2. Select **Flosum DevOps-CLI Extension** and confirm that no update is available.

{% hint style="warning" %}
The extension and the Flosum CLI each have their own version number. The two numbers are not the same and are not meant to match, so check each one against its own source. Compare the CLI against `npm view @flosum/cli version`, and check the extension for an available update in **Visual Studio Code**.

* [Installing Flosum DevOps-CLI Extension](/devops/code/devops-cli/installing-flosum-devops-cli-extension.md)
  {% endhint %}

## Troubleshooting

<details>

<summary>The update reports success but flosum --version is unchanged</summary>

The update command installed an older release, which npm does when your Node.js version does not match the one required by the latest release.

1. Run `node --version`.
2. If it does not report **v22.x**, install **Node.js 22** as described in the installation article.
3. Run the update command again.
4. Compare `flosum --version` against `npm view @flosum/cli version` once more.

</details>

<details>

<summary>The update fails with a build or compiler error</summary>

The release changed the native component, so the update tried to recompile it and the build tools are missing or incomplete.

1. Complete the **Build Tools** prerequisite in the installation article.
2. Remove the partial installation using the cleanup steps in that article.
3. Run the update command again.

{% hint style="info" %}
A failed update leaves the same partial installation as a failed first installation, so the same cleanup applies.

* [Installing Flosum CLI Node.js Package](/devops/code/devops-cli/installing-flosum-cli-node.js-package.md)
  {% endhint %}

</details>

<details>

<summary>The flosum command stops working after an update</summary>

The update did not finish, leaving the command shortcuts in place without the files they point to.

1. Remove the installation completely using the cleanup steps in the installation article.
2. Confirm that `flosum --version` reports `command not found`.
3. Install the CLI again.

</details>


---

# 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/updating-flosum-cli-and-devops-cli-extension.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.
