Welcome to the new Golem Cloud Docs! 👋
Profiles

Golem CLI Profiles

Using different profiles you can use golem with multiple installations of an open source Golem and the hosted Golem Cloud at the same time.

Interactive profile creation

To start interactive profile creation run the following command:

golem init

If you want to specify a custom profile name for the interactive profile creation process, you can use the following command:

golem profile init custom-name

In the first step you'll see three options:

  • Golem Default. Use this option for the default local Docker Compose installation.
  • Golem. Use this option in case of a customized Golem installation, i.e. a custom GOLEM_ROUTER_PORT in the .env file.
  • Golem Cloud. Use this option for a hosted version of Golem.

With the Golem Default and the hosted Golem Cloud options, there are no other specific configuration options. To specify a custom location for your local open source Golem installation, please use the Golem option.

Non-interactive profile creation

Hosted Golem Cloud profile

To create a profile for a hosted Golem Cloud use the following command:

golem profile add --set-active golem-cloud --default-format json my-profile-name

This command creates a new Golem Cloud profile named my-profile-name with default output format json and sets it as a new active profile. If you want to keep default output format text - you can omit --default-format json part. If you don't want to make the new profile as the new active profile - you can omit --set-active.

If you are using golem-cloud-cli binary you should omit profile type (golem-cloud) since golem-cloud-cli does not support other profile types:

Terminal
golem-cloud-cli profile add my-profile-name

Local open source Golem

To create a profile for your local open source Golem installation use the following command:

golem profile add --set-active golem --component-url http://localhost:9881 my-oss-profile-name

This command creates a new open source Golem profile named my-oss-profile-name with both component and worker service location as http://localhost:9881 and sets it as the new active profile.

Additionally, you can specify the --default-format option (json or yaml) instead of the human-readable text, and --worker-url in case you want to have worker and component services at different locations.

If you are using an open source specific golem - you should omit profile type (golem). If you are using a Golem Cloud specific golem-cloud-cli - you can't create an open source Golem profile.

Profile authentication

💡
This section is specific to Golem Cloud.

To authenticate your Golem Cloud profile, you can run any command that requires authentication, for example, any command that accesses Golem Cloud servers. The easiest way to authenticate your profile would be to run the following command:

golem account get

At the moment, the only way to authenticate your account is to use GitHub OAuth2 authorization. Please follow the instructions in your terminal and authorize the ZivergeTech organization to use OAuth2:

>>
>>  Application requests to perform OAuth2
>>  authorization.
>>
>>  Visit following URL in a browser:
>>
>>   ┏---------------------------------┓
>>   ┃ https://github.com/login/device ┃
>>   ┗---------------------------------┛
>>
>>  And enter following code:
>>
>>   ┏-----------┓
>>   ┃ ADFC-A318 ┃
>>   ┗-----------┛
>>
>>  Code will expire in 14 minutes at 15:15:27.
>>
Waiting...
Account with id account-id for name Your Name with email your@email.com.

Switch profiles

To get the list of your profiles use the following command:

golem profile list

You'll get all available profiles with the active profile marked by *:

 * my-oss-profile-name
   my-profile-name

To switch the active profile, use the profile switch command:

golem profile switch my-profile-name

Golem profile configuration

At the moment, the only configurable option is the default output format.

To change the default output format for the current active profile, you can use the profile config format command as follows:

golem profile config format text

Output formats

There are 3 output formats:

  • text - human-readable format
  • json
  • yaml

Almost all commands can change the output format based on the --format option or the default output format configured for the current active profile.

Profile configuration files

All golem configuration files are stored in the .golem directory in your home directory. This includes the cached authentication token for your Golem Cloud profile. It is safe to remove the $HOME/.golem directory in case of any issues with profiles—you will keep access to your Golem Cloud account as long as you have access to your GitHub account linked to your Golem Cloud account.