Skip to main content

Formance CLI

The Formance Stack comes with a command line interface (CLI) that allows you to manage your Formance Stack instances. The CLI is called fctl and is available for Linux, macOS, and Windows.

info

As of today, fctl is only available for Formance Cloud. If you are using a self-hosted instance of Formance, you will need to use the API directly. We are working hard to make fctl available for self-hosted instances as well, with a release scheduled for the first half of 2023.

Installing fctl

Homebrew

If you have Homebrew installed on your computer, you can install the CLI by running:

brew install formancehq/tap/fctl

To upgrade an existing installation of the Formance CLI, run:

brew upgrade fctl

Binary

Binaries for fctl are available for Linux, macOS, and Windows. You can download the latest release from the GitHub releases page.

# You can use either amd64 for x86_64 or arm64 for ARM
ARCH="amd64"; curl -L -o fctl.tar.gz "https://github.com/formancehq/fctl/releases/download/v0.7.1/fctl_linux-$ARCH.tar.gz" \
&& tar -xvf fctl.tar.gz \
&& sudo mv fctl /usr/local/bin \
&& chmod +x /usr/local/bin/fctl \
&& rm fctl.tar.gz

Debian/Ubuntu

First, you'll need to add the Formance's package repository to your /etc/apt/sources.list:

/etc/apt/sources.list
deb [trusted=yes] https://apt.fury.io/formance/ /

Then, you can run this command to install Formance CLI:

apt update && apt install fctl

Post-installation

You can check that Formance CLI was installed correctly by trying the following command:

fctl version

You should see something like

Version | 0.5.1
Date | 2022-11-14T11:09:43Z
Commit | 9fe16ac

If you don't, then recheck the steps above, or reach out to us to ask for help.

Now, you'll need to either log into or create your Formance Cloud account. You can do that from the CLI:

fctl login

This will take you to a page for creating an account or logging in to your existing account.

Troubleshooting

Formance CLI stores its configuration in a file located at ~/.formance/fctl.config in your home directory. If you are having trouble with the fctl, you can delete this file, and it will be recreated the next time you run fctl login.