Install and configure the CLI
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
.
- Mac OS
- Linux
On Mac, you can use homebrew
to install the Crusoe CLI:
brew install crusoecloud/cli/crusoe
On Linux, you can use apt
to install the Crusoe CLI:
echo "deb [trusted=yes] https://apt.fury.io/crusoe/ * *" > /etc/apt/sources.list.d/fury.list
sudo apt update
sudo apt install crusoe
Otherwise, visit the latest GitHub release and download the .rpm
asset suited for your machine. Then, run sudo yum install <path_to_crusoe_rpm_.rpm>
.
If you want to upgrade to a newer version of the CLI, use the same package manager (for example, 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.
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 contains the API keys and a project name that the CLI can use for context. You can view your project names in the Console on the Projects page.
[default]
default_project="<project_name>"
access_key_id="<access_key_id>"
secret_key="<secret_key>"
Configure the CLI using environment variables
If you wish to configure the CLI without a config file, you can provide equivalent environment variables:
CRUSOE_ACCESS_KEY_ID
CRUSOE_SECRET_KEY
CRUSOE_DEFAULT_PROJECT
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
Welcome [email protected]! You are an admin of the domain.com organization.
You're now ready to go!
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.