Skip to main content

Install and configure the CLI

info

Crusoe Cloud is currently in private beta. If you do not currently have access, please request access to continue.

Install the CLI

You can install the Crusoe CLI via a number of common package managers, including brew and apt.

On Mac, use homebrew to install the Crusoe CLI:

brew install crusoecloud/cli/crusoe

To upgrade to a newer version of the CLI, use brew upgrade crusoe.

Configure the CLI using a config file

To authenticate with the Crusoe CLI, you will need an API access key ID and a secret key. You can generate these in the Crusoe Cloud console from the Security page.

danger

Warning: You will only be able to view the Secret key once! Ensure that you save it somewhere secure before you refresh or leave the page.

Create a config file at ~/.crusoe/config, which will contain the project name and API keys that the CLI will use for context. View all of your projects anytime in the Console on the Projects page.

[default]
default_project="<project_name>"
access_key_id="<access_key_id>"
secret_key="<secret_key>"

To switch between multiple profiles in your ~/.crusoe/config file, use the environment variable CRUSOE_PROFILE (e.g., export CRUSOE_PROFILE="my-other-environment")

Configure the CLI using environment variables

To configure the CLI without a config file, set equivalent environment variables:

  • CRUSOE_DEFAULT_PROJECT
  • CRUSOE_ACCESS_KEY_ID
  • CRUSOE_SECRET_KEY

Test the CLI

If you've properly installed and configured the CLI, you should be able to run the crusoe whoami command and see the logged-in user:

> crusoe whoami
<Full name> [email protected]

You're ready to go! Now, try creating a VM.

If you don't see this, make sure you've properly installed the CLI, provided a config file at ~/.crusoe/config, and added your API keys to the config file. If it still isn't working, contact support.