CLI Setup
Setting up ESP RainMaker Command Line utility
Installing Python3
If you have python3 already installed, just move on to the next section. Else, follow these steps:
- Download python 3 for your OS from the python website. Latest version should be fine, but the CLI is tested with python 3.7.4.
- Run the OS specific installer to install python3.
- Verify the installation by running following command on terminal.
$ python3 --version
Note: On Windows, use
python --version
to verify the installation.
Installing dependencies
We will have to first install pip, which is a package installer for python and then install the dependencies. Here are the steps:
Installing pip
$ curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
$ python3 get-pip.py
Note: On Windows, use
python get-pip.py
for pip installation.
Installing dependencies
$ cd /path/to/esp-rainmaker/cli/
$ pip3 install -r requirements.txt
Note: Using this utility requires ESP IDF to be set up on your host machine. If it is not already done, please refer the ESP IDF Get Started guide and ensure that the IDF_PATH is set correctly
Adding the CLI to your PATH (Optional) [For MacOS and Linux only]
The RainMaker CLI can be used from the esp-rainmaker-cli folder directly as below:
$ ./rainmaker.py <cmd>
However, if you want to allow using it from any path, add it to your PATH variable. The steps are as below
- Open the ~/.bash_profile or ~/.profile file in an editor.
- Add
export PATH=$PATH:/path/to/esp-rainmaker/cli
line at the end - Save the .bash_profile or .profile file.
- Restart your terminal, or just execute
$ source ~/.bash_profile
or$ source ~/.profile
as applicable.