The Foundation CLI is your gateway to effortless interaction with the Foundation API. Designed with simplicity and efficiency in mind, this library abstracts away the complexity of direct API calls, providing a clean and intuitive interface for developers.
curl -s https://raw.githubusercontent.com/teleology-io/foundation-cli/master/download.sh | bash
The Foundation CLI can be authenticated in two ways:
- The
--api-keyargument:
foundation --api-key='your_key_here' <command>- Or exposed in the current process:
export FOUNDATION_API_KEY='your_key_here'
foundation <command>The second approach is the suggested method as it reduces the amount of typing and increases the readability of the commands. The following examples are assuming the environment variable approach.
To display the environment for your project to stdout run:
foundation environmentTo inject the environment into the currently running process run:
source <(foundation environment)To display the configuration for your project to stdout run:
foundation configurationTo make a request for the currently served variable:
foundation variable --name <name_of_variable>To get the value served for a unique identifer run:
foundation variable --name <name_of_variable> --uid '<unique-id>'