CLI Quickstart
Get started using the Common Fate CLI to request access.
In this guide you’ll install and learn how to use the cf
CLI to request access to entitlements.
Installing
We release precompiled binaries of the Common Fate CLI for MacOS, Linux and Windows. The CLI itself is open-sourced here. Choose instructions corresponding to your operating system below.
Homebrew is an open source package manager for MacOS. We publish a Homebrew formula for the Common Fate CLI. To install the CLI with Homebrew, run the command below in your terminal.
brew install common-fate/tap/cf
Verify the installation
You can verify the integrity and authenticity of the binary you have downloaded by running through the verification process here. We use the same GPG keys to sign the Common Fate binary as we do for the Granted CLI shown in the linked documentation.
First-time CLI setup
To configure the CLI to communicate with your Common Fate deployment, run:
cf
The first time you run the CLI you’ll be prompted for your deployment URL. This is the URL that you access your web dashboard through, such as https://commonfate.example.com
. After you’ve entered your dashboard, the CLI will attempt to log you in.
The CLI will also set up a TOML configuration file in ~/.cf/config
containing the OIDC authentication information associated with your deployment. This file will look something like this:
current_context = "default"
[context]
[context.default]
api_url = "https://commonfate.example.com"
oidc_issuer = "https://cognito-idp.us-east-1.amazonaws.com/us-east-1_012345abcdef"
oidc_client_id = "3128763128763asvbadkjasd"
To discover the available commands in the CLI, you can run:
cf --help
You can now use the CLI to request access to entitlements. You can list the available entitlements with:
cf access list available
And request access with:
cf access ensure --target <target> --role <role>