Skip to content

fm CLI

fm is the command-line interface for Frostmoln. Everything you can do in the portal you can also do from fm — ideal for scripting and automation.

Install

See Installation for platform-specific steps.

Authenticate

bash
fm auth login

This opens a browser to sign in and stores a token locally. Check who you're signed in as:

bash
fm auth whoami

On a headless or SSH session, add --no-browser to print the verification URL and code to enter on another device.

For unattended use (CI, scripts, the Terraform provider), authenticate with an API key instead of a browser login. Create one in the portal, then:

bash
fm auth api-key set <your-api-key>

fm reads its credentials from ~/.fm/config.yaml, not from the environment — there is no API-key environment variable. (The Terraform provider is the one that reads FROSTMOLN_API_KEY.)

Command structure

Commands follow fm <service> <resource> <action>:

bash
fm compute instance list
fm storage volume create --name data-1 --size 100 --region sweden
fm network vpc list
fm database postgres instance create --version 16 ...

Add --help to any command to see its flags, and --output json to get machine-readable output for scripting.

Command reference

The complete, auto-generated command listing lives in the fm CLI Reference (English).

Configuration

fm stores its configuration (API endpoint, region, API key, and default output format) under your home directory. Update a setting with:

bash
fm config set <key> <value>

Selecting a tenant

If you have access to more than one tenant, fm works on your default tenant unless you choose another. List the tenants you can use:

bash
fm tenant list --all

Switch the active tenant — the choice is saved and applies to every later command:

bash
fm tenant use <tenant-id>

Show which tenant is currently active (add --output json for scripting):

bash
fm tenant current

Override the tenant for a single command with the global --tenant flag, or the FM_TENANT environment variable:

bash
fm --tenant <tenant-id> compute instance list

When more than one is set, the tenant is chosen in this order: the --tenant flag, then FM_TENANT, then the tenant saved with fm tenant use, then your default tenant.

Renaming a tenant

Change the name shown for a tenant. You need an admin or owner role in the tenant's organization:

bash
fm tenant rename <tenant-id> --name "Production"

Only the label changes. The tenant ID and its internal short name stay the same, so scripts, Terraform configurations, and saved tenant selections keep working. Names do not have to be unique.