Fioctl CLI Installation¶
Fioctl is a simple tool for interacting with the Foundries.io REST API.
Fioctl is based on Foundries.io’s ota-lite API.
Fioctl, is used to manage:
With Fioctl installed, authenticate it with our backend. For this, you will generate OAuth2 application credentials for interacting with the FoundriesFactory API:
fioctl login Please visit: https://app.foundries.io/settings/credentials/ and create a new "Application Credential" to provide inputs below. Client ID:
Fioctl will now ask for your Client ID and Secret. Follow the next steps to generate it.
Go to Application Credentials and click on + New Credentials.
Complete with a Description and the Expiration date and select next.
For fioctl, check the Use for tools like fioctl box and select your Factory. You can revoke this access and set up a new credential later once you are familiar with the API Access.
We recommend creating a new API token for each computer you plan to use our tools with. For example, if you intend to develop on both a laptop and a desktop, create a new token for each, as you would with SSH keys. This way you can revoke tokens for individual systems, should they be compromised.
Use the Client ID and Secret to finish the fioctl login.
fioctl login Please visit: https://app.foundries.io/settings/credentials/ and create a new "Application Credential" to provide inputs below. Client ID: Client secret: You are now logged in to Foundries.io services.
When working with multiple factories, specifying a factory name is mandatory. It can be set using 3 different methods:
Argument:fioctl targets list --factory <factory>
Environment Variable:export FIOCTL_FACTORY=<factory> fioctl targets list
- Configuration File:echo "factory: <factory>" >> $HOME/.config/fioctl.yaml fioctl targets list