A command line tool to interact with the Predix platform
- Login to the various Predix PoP environments (US West, US East, Frankfurt, etc)
- Define your own PoPs for internal or custom clouds. See below
- Bash autocompletion for the Cloud Foundry CLI commands, parameters and arguments
Use our one-click local-setup installers
On Mac OS X
Run the command below in a terminal window to install Cloud Foundry CLI and the Predix CLI
bash <( curl https://raw.githubusercontent.com/PredixDev/local-setup/master/setup-mac.sh ) --cf --predixcli
On Windows
Open a Command Window as Administrator (Right click 'Run as Administrator') and run the command below
@powershell -Command "(new-object net.webclient).DownloadFile('https://raw.githubusercontent.com/PredixDev/local-setup/master/setup-windows.bat','%TEMP%\setup-windows.bat')" && %TEMP%/setup-windows.bat /cf /predixcli
The latest release is downloadable at https://github.com/PredixDev/predix-cli/releases
- Extract the file 'predix-cli.tar.gz'
- Navigate to the extracted folder and run './install'
- Extract the file 'predix-cli.tar.gz'
- Copy predix.exe in bin/win64 in the extracted folder to somewhere on the PATH
- Make a symbolic short link spelled with px.exe pointing at predix.exe. e.g. mklink path-to-cli\px.exe path-to-cli\predix.exe-
- Autocompletion is supported in Git-Bash terminal window, which is installed when Git is installed.
- ensure a directory in c:\Program Files\Git\etc\bash_completion.d\predix is created
- copy the predix-cli\autocompletion\bash_autocomplete to c:\Program Files\Git\etc\bash_completion.d\predix\bash_autocomplete.sh
- notice the .sh extension is added on there
- in home directory ~.bashrc add this text which sources the bash_autocomplete.sh file
- . /etc/bash_completion.d/predix/bash_autocomplete.sh
In the hidden directory ~/.predix create a pops.json file.
[
{"name": "CF3", "url": "https://api.system.your-endpoint-here.ice.predix.io", "flag": "cf3", "usage": "Login to the Predix CF3 PoP"}
]