Introduction to Gorilla CLI
Gorilla CLI is a user-focused tool designed to simplify interactions with the command line. By understanding the user's goals expressed in natural language, Gorilla CLI generates a list of potential commands for execution, eliminating the need to memorize complex command-line syntax. It currently supports around 1500 different APIs including popular services such as Kubernetes, AWS, GCP, Azure, GitHub, Conda, Curl, and Sed.
Created as a research prototype by UC Berkeley, Gorilla CLI emphasizes user control and privacy. Commands are only executed with the user's explicit consent, and while queries and error reports are used to improve the functionality, output data is never collected, ensuring confidentiality.
Getting Started
Installing Gorilla CLI is straightforward and can be done using pip. Simply execute the following command in your terminal:
pip install gorilla-cli
Usage
To use Gorilla CLI, initiate it by typing gorilla
followed by your task described in simple English. For example, if you want to create a file containing 100 random characters, you would enter:
$ gorilla generate 100 random characters into a file called test.txt
Alternatively, you can prevent any issues that might arise from string parsing by enclosing the command in quotes:
$ gorilla "generate 100 random characters into a file called test.txt"
After inputting your task, Gorilla CLI provides several command options. You can navigate through these options using the arrow keys and execute the command of choice by pressing enter.
Examples:
$ gorilla list all my GCP instances
$ gorilla get the image ids of all pods running in all namespaces in kubernetes
How It Works
The power of Gorilla CLI comes from its utilization of various Language Learning Models (LLMs), including its proprietary Gorilla LLM, OpenAI's GPT-4, and others. When you input a query, responses are gathered from these LLMs. The results are then filtered and presented, allowing you to select the most appropriate command for your needs.
Arguments
usage: go_cli.py [-h] [-p] [command_args ...]
Gorilla CLI Help Doc
positional arguments:
command_args Prompt to be inputted to Gorilla
optional arguments:
-h, --help Show a help message and exit
-p, --history Display command history
Gorilla CLI also features a history option that lets users revisit and re-execute past commands, similar to command-line history features in other systems.
Contributions
Gorilla CLI is open to community contributions. Users who have ideas for improvements are encouraged to submit pull requests through the project's GitHub repository.
License
The project is licensed under the Apache 2.0 license, details of which are available in the LICENSE file. Gorilla CLI also acknowledges the contribution of questionary for providing a great user interface.
Gorilla CLI represents a significant advancement in simplifying command-line operations, making it an invaluable tool for users of all levels, offering ease, convenience, and security.