Docs · The cf CLI

Install the CLI and sign in.

cf runs from your own terminal: servers, storage, DNS, and the history, tag, checkout and revert of every server you connect. It is free.

The CLI is free to use under the ComputeForge CLI licence.

Install

curl -fsSL https://api.computeforge.com/panel/api/cli/v1/install.sh | sh

Run it as yourself, not as root. The installer:

  • downloads the release from ComputeForge's own servers (it is on no other package index);
  • finds the newest version in a signed list (latest.manifest), and never takes an older version than its own release or than the one you already have;
  • checks the signature of the release's SHA256SUMS with the ComputeForge release key, and every file against SHA256SUMS, before it installs anything (with OpenSSL 3 when there is one, else with Python);
  • installs cf into its own Python environment in ~/.local/share/cf, from those files only: nothing is fetched from a package index;
  • links cf and computeforge into ~/.local/bin, and the manual (man cf) into ~/.local/share/man/man1.

It needs Python 3.10 or newer (with its venv module; on Debian and Ubuntu that is the python3-venv package) and curl. Tested on Ubuntu 24.04, Debian 12, Alpine 3.22 and the Python 3.10 image. Windows: WSL should work (not tested).

Two names: cf and computeforge

computeforge is the same program as cf, under its full name, and is always installed. Its help and messages use whichever name you type: computeforge --help, then computeforge login, computeforge server ls.

The Cloud Foundry CLI is also called cf. The installer never replaces a cf it did not install: if one is in ~/.local/bin, ours is linked only as computeforge (every command works the same: computeforge login, computeforge server ls). If another cf comes first on your PATH, the installer says which one. To give the short command another name:

curl -fsSL https://api.computeforge.com/panel/api/cli/v1/install.sh | sh -s -- --link-name cfg

Upgrade and remove

Run the install line again to upgrade; it never moves you to an older version unless you ask for one with --release-version. To remove it (sign out first: cf logout revokes the key):

curl -fsSL https://api.computeforge.com/panel/api/cli/v1/install.sh | sh -s -- --uninstall

Check a release yourself

The release files are at https://api.computeforge.com/panel/api/cli/v1/releases/<version>/; latest.manifest names the newest, and is signed too. With the release public key below in release.pem:

curl -fsSLO https://api.computeforge.com/panel/api/cli/v1/releases/latest.manifest -O https://api.computeforge.com/panel/api/cli/v1/releases/latest.manifest.sig
openssl pkeyutl -verify -pubin -inkey release.pem -rawin -in latest.manifest -sigfile latest.manifest.sig
V=$(sed -n 's/^latest //p' latest.manifest)
curl -fsSLO https://api.computeforge.com/panel/api/cli/v1/releases/$V/SHA256SUMS -O https://api.computeforge.com/panel/api/cli/v1/releases/$V/SHA256SUMS.sig
openssl pkeyutl -verify -pubin -inkey release.pem -rawin -in SHA256SUMS -sigfile SHA256SUMS.sig
-----BEGIN PUBLIC KEY-----
MCowBQYDK2VwAyEAkrAsORmiOg5qCYtJggsPODzVIbfq3l4Ca1a7vFE6cQs=
-----END PUBLIC KEY-----

Authenticate the CLI

cf login                   # shows a code and opens the approval page in your browser
cf login --no-browser      # just prints the link (a server without a browser)

Check that the code on the page is the one in your terminal, then choose where the key works (the whole organization or some workspaces), what it may do (read, operate or full) and when it expires. The CLI gets its own API key, named cf CLI on <hostname>, which you see and revoke in the panel with your other API keys.

A key you already have (from the panel) works too. It is read from a hidden prompt or stdin, never the command line:

cf login --key             # paste it at the prompt
cf whoami                  # the key in use: its name, level, scope, expiry and workspaces
cf logout                  # revokes the key and deletes it from this computer

The key is stored in ~/.config/cf/credentials, readable only by you, and is only ever sent to the API it was issued for. cf login --profile work keeps a second account side by side.

Commands

cf --help lists every command, cf <command> --help its options, and man cf all of them. Every command takes --json. Commands that cost money or delete something say so and ask first; -y answers the first kind, and a delete wants the name typed (or --confirm NAME).

  • Servers and storage: cf server (ls, create, show, start, stop, resize, delete …), cf volume, cf snapshot, cf backup, cf image, and cf storage (object storage buckets and keys).
  • Networking: cf network, cf firewall, cf ip, cf ipv6, cf dns (zones and records, and cf dns zone export as a BIND zone file).
  • Connected servers: cf connect ssh://user@host (or computeforge://<server>) installs the agent over your own ssh; cf machine lists and manages them, and cf track adds your own tracked paths.
  • History: cf log, cf show, cf diff (one server over time, or two servers), cf blame.
  • Undo: cf tag, cf checkout (files from a tag or a time), cf revert, cf cherry-pick. Writing to a server needs apply mode on it; each shows its plan first.
  • Copies and checks: cf branch (a running copy of one of our servers), cf merge (bring a branch back), cf scan and cf watch --integrity.
  • Lifeguard: cf probe (health checks) and cf failover (Forge DNS failover).
  • Forge Mesh: cf mesh (add, ls, rm, ACLs, and cf mesh export --wireguard).
  • Account: cf workspace, cf ssh-key, cf audit log, cf status, cf costs, cf billing.

Related