Skip to main content

TrueFoundry CLI Library

TrueFoundry CLI library to help you interact with the platform programmatically.
TrueFoundry CLI is a very lightweight CLI that only exposes the most common functionality and doesn’t provide interaction with all APIs of TrueFoundry. For that, we recommend using the APIs of TrueFoundry directly or using the TrueFoundry Python SDK.

Install TrueFoundry CLI

You need Python ≥ 3.10, ≤ 3.14 to use truefoundry v0.17.0 and later. See Minimum Python version raised to 3.10 — truefoundry v0.17.0.
Releases before v0.17.0 support Python ≥ 3.8, ≤ 3.14.
Optional features can be installed with extras.
NOTE: workflow and spark extras are only supported on Python ≥ 3.10, ≤ 3.12

Authenticate CLI

To be able to use the TrueFoundry CLI, you first need to authenticate. You can login either via browser or using API Key.
To log in to TrueFoundry, run the following command:
The value for --host is the first part of the url when you open the platform. This domain might be subdomain of your organization. The below example shows https://myorg.truefoundry.cloud
This will prompt you to open a URL and show you a Submit button.Once you click on Submit, you will be signed in to the CLI.

FAQ

This error indicates that the CLI could not verify the HTTPS certificate of the server it is connecting to. The most common causes are:
  • A corporate proxy or firewall on your network intercepts HTTPS traffic and re-signs it with its own certificate.
  • The required CA certificates are missing from your system.
ResolutionIf you are behind a corporate proxy, obtain your organization’s CA certificate bundle (a .pem file) from your IT team and point the CLI to it using the REQUESTS_CA_BUNDLE environment variable:
Retry the command afterwards. To apply this setting permanently, add the export statement to your shell profile (for example, ~/.zshrc or ~/.bashrc).
This error indicates that an HTTP/HTTPS proxy is configured on your machine, but the CLI could not establish a connection through it.Resolution
  • Inspect the values of the HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables:
  • Verify that the proxy address and port are correct and that the proxy is reachable from your machine.
  • Confirm with your network team that the proxy permits access to your TrueFoundry host.
  • If the TrueFoundry host should be reached directly, bypassing the proxy, add it to NO_PROXY:
This error indicates that the CLI could not establish a network connection to the TrueFoundry host.Resolution
  • Verify that the --host value (or the TFY_HOST environment variable) is correct. It should match the URL you use to access the TrueFoundry platform in your browser, for example https://myorg.truefoundry.cloud.
  • Confirm the host is reachable from your machine:
  • If your TrueFoundry installation is accessible only over a private network, ensure you are connected to the VPN.
  • Check whether a firewall or proxy on your network is blocking access to the host.
Run the command with the --debug flag to print the full traceback:
Alternatively, enable debug output through an environment variable: