Install Cloudfleet CLI

cloudfleet is the official command-line tool for Cloudfleet services and the Cloudfleet API. You can manage your infrastructure from the command line, with all the benefits of a scriptable interface. The CLI is generated automatically from the OpenAPI schema of the API. For descriptions of endpoint input and output schemas, see the API Reference section of this documentation.

Installation

A package manager is the preferred installation method. With a package manager, you can install cloudfleet and update to new versions with a few commands.

Cloudfleet CLI is available for macOS as a universal binary.

Install the CLI with Homebrew:

bash
brew install cloudfleetai/tap/cloudfleet-cli

If you do not use brew, download the archive from this link and extract on your system.

Cloudfleet CLI is available in Cloudfleet’s APT repository for x64 and ARM architectures. Install it with the following commands:

bash
curl -fsSL https://downloads.cloudfleet.ai/apt/pubkey.gpg \
  | sudo tee /usr/share/keyrings/cloudfleet-archive-keyring.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/cloudfleet-archive-keyring.gpg] \
https://downloads.cloudfleet.ai/apt stable main" \
  | sudo tee /etc/apt/sources.list.d/cloudfleet.list
sudo apt-get update
sudo apt-get install cloudfleet

Cloudfleet CLI is available in Cloudfleet’s YUM repository for x64 and ARM architectures. Install it with the following commands:

bash
sudo tee /etc/yum.repos.d/cloudfleet.repo << 'EOF'
[cloudfleet]
name=Cloudfleet
baseurl=https://downloads.cloudfleet.ai/yum
enabled=1
gpgcheck=1
gpgkey=https://downloads.cloudfleet.ai/yum/pubkey.gpg
EOF
sudo dnf install cloudfleet

You can also download the RPM package directly:

After you download the RPM package, install it with the following command:

bash
sudo rpm -i cloudfleet.rpm

Cloudfleet CLI is available as a ZIP package:

After you download the ZIP package, extract it and run the cloudfleet binary.

On NixOS, the CLI is available through the Cloudfleet Nix repository, which provides a flake overlay and package output. The CLI is a closed-source binary, so the package is marked unfree. You must allow unfree packages to install it. See the repository README for flake, home-manager, and imperative install instructions.

Cloudfleet CLI is available on Winget for AMD64 and ARM architectures. Install it with the following command:

powershell
winget install Cloudfleet.CLI

You can also download the binary directly from the following links:

Download the ZIP file for your platform and extract it to a directory.

Authenticating the CLI

To authenticate the CLI, use a user account or an API token.

User authentication

bash
cloudfleet auth add-profile user default 12345678-6651-4e5d-9c04-079f6532989b

User authentication requires a browser. The CLI opens a browser window to authenticate the user. If you use the CLI in a headless environment (including WSL on Windows), use token-based authentication as a workaround. We are working to fix this issue.

Token-based authentication

You can authenticate the CLI with an API token. See the API Tokens section for more information on creating and managing API tokens.

When you have a token ID and secret, add a profile to the CLI configuration with the following command:

bash
cloudfleet auth add-profile token default ORGANIZATION_ID TOKEN_ID --token-secret-stdin

Replace ORGANIZATION_ID and TOKEN_ID with the actual values. The --token-secret-stdin flag reads the secret from standard input (or an interactive prompt). The secret then never appears in your shell history or ps output. You can still pass the secret as a trailing positional argument. The CLI warns against this, because other processes can then see the value.

You can also authenticate with environment variables, without storing credentials in a profile. The CLI automatically recognizes the following environment variables:

bash
export CLOUDFLEET_ORGANIZATION_ID=your-organization-id
export CLOUDFLEET_ACCESS_TOKEN_ID=your-token-id
export CLOUDFLEET_ACCESS_TOKEN_SECRET=your-token-secret

When these environment variables are set, you can use the CLI without adding a profile. This approach is useful for CI/CD pipelines and automated workflows.

API token authentication is designed for programmatic access. For interactive use of the CLI, use user authentication.

Using multiple authentication profiles

You can use multiple profiles for different organizations or users. To switch between profiles, use the --profile flag.

Usage

To open the help menu, run cloudfleet --help. For detailed information about a specific command, run cloudfleet <command> --help. Other sections of this documentation also describe the available commands.

The CLI also includes built-in help topics for subjects that apply to many commands. Read them with cloudfleet help <topic>:

  • cloudfleet help config covers configuration options, environment variables, and config files.
  • cloudfleet help input covers request bodies, named flags, and full-replace updates.
  • cloudfleet help automation covers output formats, errors, exit codes, and authentication from scripts and CI.
  • cloudfleet help registry covers authenticating Docker to the Cloudfleet Container Registry.
  • cloudfleet help mcp covers the built-in MCP server.

Providing input to write commands

Write operations such as create and update take their request body from a YAML or JSON document. You can provide input in two ways, and you can combine them:

  1. A document with -f, --filename, which accepts a file path or - to read from standard input.
  2. Named flags for individual top-level scalar fields, generated automatically from the API schema.

Named flags override values in the document. You can supply a base file and change one or two fields on the command line. Nested objects and arrays do not have flags, so set them in the document.

bash
# Create from named flags
cloudfleet clusters create --name prod --region europe-central-1a

# Create from a document
cloudfleet clusters create -f cluster.yaml
cat cluster.yaml | cloudfleet clusters create -f -

# Document plus a flag override
cloudfleet clusters create -f cluster.yaml --region northamerica-central-1a

Full-replace updates

Update operations replace the entire resource: any field absent from the request is reset to its default. Updates therefore require a complete document with -f. The CLI rejects a flags-only update before any network call, so the update cannot silently drop fields you did not set. You can still use flags as overrides on top of -f.

The recommended workflow is read-modify-write: read the current state, select only the editable fields with -q, edit, and pipe the result back. Read responses include read-only fields such as id, status, and timestamps that updates do not accept.

bash
cloudfleet clusters fleets describe my-cluster my-fleet \
  -q "{scalingProfile: scalingProfile, limits: limits, aws: aws, gcp: gcp, hetzner: hetzner, constraints: constraints}" \
  -o yaml | cloudfleet clusters fleets update my-cluster my-fleet -f -

On Windows PowerShell and other shells that do not support input redirection with <, pipe input instead, for example cat input.json | cloudfleet ... -f -.

Output formats

Choose an output format with -o:

  • auto (default): prints human-readable JSON at a terminal and plain machine-readable JSON when piped.
  • json or yaml: always prints that structured format. This setting overrides terminal detection, so success and error output are the same at a terminal and in a pipe. Use these formats in scripts.
  • table: a compact view for humans to read. Do not parse it, because its columns can change.

Project fields from the result with -q and a JMESPath expression, for example cloudfleet clusters list -q "[].id". An unmatched query returns null instead of an error, so prefer array projections like [].name.

To set a default format per profile, add the profile with cloudfleet auth add-profile ... --default-output-format <fmt>. To set it for a single invocation, use the CLOUDFLEET_OUTPUT_FORMAT environment variable. The precedence is an explicit -o flag, then the environment variable, then the profile default, then the built-in auto.

For more details on each topic, run the corresponding cloudfleet help command shown above.

MCP server integration

The Cloudfleet CLI includes a built-in Model Context Protocol (MCP) server that lets AI assistants interact with your Cloudfleet infrastructure. This feature requires CLI version 0.6.30 or later. For setup instructions, see the MCP server documentation.

On this page