Skip to Content

Gorilla AI

https://gorilla.cs.berkeley.edu/  Gorilla is a AI LLM that can provide appropriate API calls, command-line commands and much more by using natural language instructions directly from your terminal.

Examples:

Command-Line command example

gorilla "I need a list of the 10 largest files in this directory, sorted by largest files sizes first"

gorilla-ai-1.png

gorilla "I need the weather forecast in St. Louis for the next 5 days. I need to use a free service that required no API keys."

gorilla-ai-2.png

Installation (Linux/Ubuntu)

Install dependencies

  1. Install python3
sudo apt install python3
  1. Install pip3
sudo apt install python3-pip
  1. Install python3 virtualenv
sudo apt install python3-venv

Create a Python3 Virtual Environment

  1. Create a python3 virtual environment. The last param is the name of the virtual environemnt. You can name it whatever you want. In this case its “gorilla-env”.
python3 -m venv gorilla-env
  1. Activate and enter the virtual environment. The terminal should put you “in” the enviroment. Look for the “(gorilla-env)” tag next to your command prompt.
source gorilla-env/bin/activate
  1. Install gorilla-cli in the python3 virtual environment
pip install gorilla-cli
  1. You can exit the virtual environment and start using “gorilla” commands.
gorilla "List all the files in this directory"

Example Output:

🦍 Welcome to Gorilla. Use arrows to select » ls -al ls -l `ls -a` : #Do nothing

Installation (MacOS)

Install dependencies

  1. Install python3
brew install python3
  1. Upgrade pip3
python3 -m pip install --upgrade pip
  1. Install gorilla-cli
sudo pip3 install gorilla-cli
  1. Install python3 virtualenv
sudo pip3 install virtualenv

Create a Python3 Virtual Environment

  1. Create a python3 virtual environment. The last param is the name of the virtual environemnt. You can name it whatever you want. In this case its “gorilla-env”.
python3 -m virtualenv --system-site-packages gorilla-env
  1. Activate and enter the virtual environment. The terminal should put you “in” the enviroment. Look for the “(gorilla-env)” tag next to your command prompt.
source ~/gorilla-env/bin/activate
  1. Install gorilla-cli in the python3 virtual environment
pip install gorilla-cli

Setup Python3 Virtual Environment to run on boot

  1. Add activation command to .bashprofile: Open the .bashprofile file in your user directory. Run the following command to open it:
nano ~/.bash_profile
  1. Add the following line to the end of the file:
source ~/gorilla-env/bin/activate
  1. Save and exit the file. Press Ctrl+X to exit nano, then Y to save the file, then Enter to confirm the filename.
  2. Make the virtual environment global: Run the following command in the terminal to make the virtual environment visible to other globally installed packages:
pip3 install virtualenvwrapper
  1. Add the following line to .bash_profile, replacing the path with the actual path to your Python installation:
export VIRTUALENVWRAPPER_PYTHON=/usr/local/bin/python3
  1. Run the following command in the terminal to apply the changes made to the .bashprofile file:
source ~/.bash_profile
Last updated on