Install Cloudfleet CLI

cloudfleet is the official command-line tool to access Cloudfleet services and allows you to interact with the Cloudfleet API. You can manage your infrastructure from a user-friendly command line, with all the benefits of a scriptable interface. The CLI is automatically generated based on the OpenAPI schema of the API, and you can find descriptions of endpoint input and output schemas in the API Reference section of this documentation.

Installation

Installation using a package manager is the preferred way. A package manager allows you to install and keep up with new cloudfleet versions using only a few commands.

Cloudfleet CLI is available for macOS as a universal binary.

You can install the CLI using Homebrew:

bash
brew install cloudfleetai/tap/cloudfleet-cli

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

Cloudfleet CLI is available at Cloudfleet’s APT repository for x64 and ARM architectures. You can install it using 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 at Cloudfleet’s YUM repository for x64 and ARM architectures. You can install it using 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

Alternatively, you can download the RPM package directly:

After downloading the RPM package, you can install it using the following command:

bash
sudo rpm -i cloudfleet.rpm

Cloudfleet CLI is available as ZIP package:

After downloading the ZIP package, you can 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. Because the CLI is a closed-source binary, the package is marked unfree, so 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 both AMD64 and ARM architectures and can be installed with the following command:

powershell
winget install Cloudfleet.CLI

Alternatively, you can download the binary directly via following links:

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

Authenticating the CLI

To set up the authentication for the CLI, you can use a human account or an API token.

User authentication

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

Please note that, the User authentication requires a browser to complete the authentication process. The CLI will open a browser window to authenticate the user. If you are using the CLI in a headless environment (including WSL on Windows), please use the token-based authentication as a workaround. We are working to fix this issue.

Token-based authentication

You can use an API token to authenticate the CLI. Refer to the API Tokens section for more information on creating and managing API tokens.

Once you have a token ID and secret, you can add a profile to the CLI configuration using the following command:

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

Please 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) so it never appears in your shell history or ps output. You can still pass the secret as a trailing positional argument, but the CLI warns against it because the value is then visible to other processes.

Alternatively, you can use environment variables to authenticate 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

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

Please note that the API token authentication is designed for programmatic access. If you are using the CLI for interactive use, it is recommended to use user authentication.

Using multiple authentication profiles

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

Usage

The CLI is designed to be user-friendly and easy to use. You can access the help menu by running cloudfleet --help and get detailed information about a specific command by running cloudfleet <command> --help. You can also find detailed information about the available commands in different sections of this documentation.

In addition to per-command help, the CLI ships built-in help topics for cross-cutting concerns. 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, and there are two ways to provide it that compose together:

  1. A document via -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 layer on top of the document as overrides, so you can supply a base file and tweak a field or two on the command line. Nested objects and arrays do not have flags, so set those 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 via -f, and a flags-only update is rejected before any network call so it cannot silently drop fields you did not set. Flags may still be layered on top of -f as overrides.

The idiomatic workflow is read-modify-write: read the current state, project just the editable fields with -q, edit, and pipe it 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 via <, 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 emit that structured format. This wins over terminal detection, so success and error output match whether or not you are at a terminal. Use these in scripts.
  • table: a compact human glance view. 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 rather than an error, so prefer array projections like [].name.

You can pin a default format per profile when adding it with cloudfleet auth add-profile ... --default-output-format <fmt>, or set it for a single invocation with 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 json.

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 enables AI assistants to 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