> ## Documentation Index
> Fetch the complete documentation index at: https://docs.flex.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Installing the FlexAI CLI

> Install and set up the FlexAI command-line interface

## System requirements

The FlexAI CLI is available for the following operating systems and versions:

* Ubuntu 20.04, 22.04, 24.04
* macOS 14 and above
* Windows 10 and Windows 11 (through WSL2 in both cases)

## Installation Steps

<Steps>
  1. Run the installation script

     ```bash theme={null}
     curl -fsSL https://cli.flex.ai/install.sh | sh
     ```

     You can review the installation script before running it:

       <Accordion title="View the script">
         You can view the installation script at [https://cli.flex.ai/install.sh](https://cli.flex.ai/install.sh)
       </Accordion>

  2. Add it to your system's `$PATH`

  3) Verify your installation

     As a first step, it's always a good idea to verify your system can connect to FlexAI and make sure CLI is properly installed.

     That's the purpose of the `doctor` command:

     ```bash theme={null}
     flexai doctor
     ```

     You should get a message like this:

     ```text theme={null}
     Running doctor checks...
     [1/4] ✅ The FlexAI binary file is part of the system's $PATH variable
     [2/4] ✅ Successfully connected to the FlexAI API server
     [3/4] ✅ Successfully connected to the FlexAI update server
     [4/4] ✅ Using the latest FlexAI CLI version available
     Your system is healthy
     ```

  4) Logging in

     The next step is to [log in and authenticate your CLI](/cli/authenticate).
</Steps>

***

## Uninstalling the FlexAI CLI

If you ever need to uninstall the FlexAI CLI, you can do so by removing both the `~/.flexai` directory and the reference to the *flexai binary* from your `$PATH` variable.
