Skip to content

CLI ​

fjordrun is the command-line interface for Fjordrun: log in, link a directory to a service, deploy, follow logs and manage variables and domains from your terminal.

Install ​

bash
curl -fsSL https://fjordrun.com/install.sh | sh
bash
go install github.com/fjordrun/fjordrun-cli/cmd/fjordrun@latest

Prebuilt binaries for Linux, macOS and Windows (amd64 and arm64) are attached to each GitHub release.

Check the installation:

bash
fjordrun version

Log in ​

bash
fjordrun login

The CLI opens your browser at a page like https://app.fjordrun.com/cli/authorize?code=ABCD-EFGH and prints the same code in the terminal:

  1. Check that the code in the browser matches the one in your terminal.
  2. Choose Approve (or Deny if you did not start this login).
  3. The terminal confirms the login.

The code expires after 10 minutes. On a machine without a browser, use fjordrun login --no-browser and open the printed URL on another device.

Logging in creates a personal access token for your user, which the CLI stores in ~/.config/fjordrun/config.json. It acts as you, with your roles in all your teams. You can see and revoke your personal access tokens in Account settings; fjordrun logout revokes the token and removes it from the machine.

In CI, set FJORDRUN_TOKEN instead of logging in (see API tokens):

bash
export FJORDRUN_TOKEN=fjr_...

FJORDRUN_TOKEN always overrides the stored login.

Most commands act on a service. Link the current directory once:

bash
fjordrun link

You pick the team, project, environment and service from lists. The choice is saved in ./.fjordrun/link.json (the CLI adds a .gitignore inside .fjordrun/, so the link is not committed). Without prompts, for scripts:

bash
fjordrun link --team acme --project shop --environment production --service web

fjordrun status shows what is linked; fjordrun unlink removes the link.

Global flags ​

FlagMeaning
--jsonMachine-readable JSON output
--team <id, slug or name>Team to use
--project <id or name>Project (default: the linked project)
--service <id or name>Service (default: the linked service)
--environment <id or name>Environment (default: the linked one, else production)

Flags override the link, so you can act on another service without relinking: fjordrun logs --service api.

Commands ​

login, logout, whoami ​

bash
fjordrun login                 # browser login (device code)
fjordrun login --no-browser    # print the URL instead of opening it
fjordrun whoami                # the logged-in user and their teams
fjordrun logout                # revoke the token and remove it

teams, projects ​

bash
fjordrun teams
fjordrun projects                 # projects of the linked team, --team, or all your teams
fjordrun projects --team acme --json

See Link a directory.

deploy ​

Redeploys the linked service (for a GitHub source, a fresh build of its branch).

bash
fjordrun deploy
fjordrun deploy --wait            # stream the logs and wait until it finishes
fjordrun deploy --service api --environment staging

With --wait, the exit code is non-zero if the deployment fails, which is useful in CI.

logs ​

bash
fjordrun logs                     # last 100 lines of runtime logs
fjordrun logs -f                  # follow
fjordrun logs -n 500              # more lines
fjordrun logs --build             # build logs of the latest deployment
fjordrun logs --deployment <id>   # logs of a specific deployment

vars ​

bash
fjordrun vars list
fjordrun vars list --resolved                 # with ${{...}} references resolved
fjordrun vars set NODE_ENV=production API_URL=https://example.com
fjordrun vars unset OLD_KEY

Setting or unsetting variables redeploys the service if it is running. See Variables and references.

domains ​

bash
fjordrun domains list
fjordrun domains add                     # generate a *.fjordrun.app domain
fjordrun domains add app.example.com     # custom domain; prints the DNS records to create

See Domains and HTTPS.

open ​

bash
fjordrun open                  # open the service's URL
fjordrun open --dashboard      # open the service in the dashboard
fjordrun open --print          # only print the URL

templates ​

bash
fjordrun templates list

Lists the one-click templates and their codes.

version ​

bash
fjordrun version

Configuration files ​

PathContents
~/.config/fjordrun/config.jsonYour login token
./.fjordrun/link.jsonThe linked team, project, environment and service of this directory
Environment variableEffect
FJORDRUN_TOKENAccess token; overrides the stored login
FJORDRUN_API_URLAPI base URL (default https://api.fjordrun.com/api/v1)

Fjordrun is hosted in the EU (Hetzner, Nuremberg, Germany). Private beta.