Fioctl CLI Installation¶
Fioctl is a simple tool that interacts with the Foundries.io REST API for managing a Factory. It is based on the ota-lite API, also built by Foundries.io.
Fioctl, is used to manage:
Installation¶
Manual Installation¶
We use Github Releases to distribute static golang binaries. If you don’t have a package manager, are not on a supported distribution, or would prefer to install manually, you can refer to this section for manual installation instructions.
Download a Linux binary from the Github Releases page to a directory on your
PATH
For example, to download version v0.13 on Linux, do:
sudo curl -o /usr/local/bin/fioctl -LO https://github.com/foundriesio/fioctl/releases/download/v0.13/fioctl-linux-amd64
Make the Fioctl binary executable:
sudo chmod +x /usr/local/bin/fioctl
You can execute this again in future to overwrite your binary, therefore updating or changing your version.
Download a Darwin binary from the Github Releases page to a directory on your
PATH
For example, to download version v0.13 on macOS, do:
curl -o /usr/local/bin/fioctl -LO https://github.com/foundriesio/fioctl/releases/download/v0.13/fioctl-darwin-amd64
Make the Fioctl binary executable:
chmod +x /usr/local/bin/fioctl
You can execute this again in future to overwrite your binary, therefore updating or changing your version.
Download a Windows binary from the Github Releases page.
Put it in a folder of your choosing and rename it to
fioctl.exe
Press
Win + R
and typeSystemPropertiesAdvanced
Press
enter
or clickOK
.Click “Environment Variables…” in the resultant menu..
Click the
Path
system variable, then clickEdit...
Click
New
in the “Edit environment variable” menu.Enter the path to the folder in which you have placed Fioctl.
An example path string if installing to a folder on the desktop would look like this.
C:\Users\Gavin\Desktop\fio\bin
You should now be able to open cmd.exe
or powershell.exe
and type
fioctl
.
Via Package Manager¶
We maintain a brew Formula
brew tap foundriesio/homebrew-fioctl brew install fioctl
Via Scoop
Install Scoop
From Powershell, run:
scoop bucket add fio https://github.com/foundriesio/scoop-fioctl scoop install fioctl
Via Windows Subsystem for Linux (WSL)
- Enable the WSL
- Install a supported Linux Distribution such as Ubuntu, Debian.
- Launch a shell via WSL, usually bash.exe is available from the start menu.
- You can now follow our docs as if you were running Linux, refer to the Ubuntu/Debian installation steps.
We maintain an AUR Package
Via yay
yay -S fioctl
Or via makepkg
git clone https://aur.archlinux.org/fioctl-bin.git cd fioctl-bin makepkg -si
Post-Install¶
Now that Fioctl is installed, you must authenticate with our backend before you’re able to use it. This requires you to generate OAuth2 application credentials for interacting with Factory APIs:
fioctl login
Fioctl will now ask for your API token and walk you through the authentication process.
Note
Tokens can be generated at https://app.foundries.io/settings/tokens
Tip
We recommend creating a new API token for each device you plan to use our tools with. For example, if you intend to develop on multiple systems such as a laptop and a desktop, you should create a new token for each, just as you would with SSH keys. This way you can revoke tokens for individual systems, should they be compromised.