Environment variables

Caution

Since .caliberenv may contain sensitive data, e.g. a Personal Access Token, it should be kept private and not committed to any public or private repositories.

Having full control over your settings directly from the CLI is great, but since the settings are usually constant across different runs in one project, you might end up in the situation of typing the same stuff over and over.

You can collect all your settings in a special file called .caliberenv that should be put in the folder where you run caliber. See the example .caliberenv below.

.caliberenv
caliber_speckle_host=https://app.speckle.systems
caliber_speckle_project=12345abcde

The following settings related to the Speckle server can be given:

  • caliber_speckle_host, the URL of your Speckle server, e.g. https://app.speckle.systems

  • caliber_speckle_project, the id of your Speckle project, e.g. 12345abcde

  • caliber_speckle_model_name, the name of the model in your Speckle project, e.g. main

  • caliber_speckle_token, a Personal Access Token to your Speckle server.

Note that if you do not provide caliber_speckle_token, Caliber looks for this among your registered accounts in Speckle Manager.

If the settings are specified multiple ways, the selected value is determined with the following priority:

  1. Settings specified directly in the CLI.

  2. Settings specified in .caliberenv.

  3. Settings specified as environment variables.

Under the hood of the environment variables

Caliber uses Pydantic to handle environment variables and the .caliberenv file. Note, however, that the priority listed above deviates from the default priority in Pydantic.