Skip to content

Commit fc5b095

Browse files
authored
pypi release 0.0.9 [Fix: Windows install, github not set-up, and imorove examples] (#14)
Fixes: - 🪟 Windows installs were running into decoding issues. Now decoding scheme is explicitly stated. Fixes #8 #11 - ✅ Removed the assert that checked for user_id. If a user_id is not found, it assign a per session unique_id. Fixes #3 Improvements: - 💼 Brief welcome message. - 🚀 Better examples that demonstrate the power of gorilla - 🦍 Logo in README
1 parent 290cd62 commit fc5b095

File tree

3 files changed

+23
-18
lines changed

3 files changed

+23
-18
lines changed

README.md

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# Gorilla CLI
22

3-
Gorilla CLI revolutionizes your command-line interactions with a user-centric tool that understands natural language commands. Simply state your objective, and Gorilla CLI will generate potential commands for execution. No more need to recall intricate command-line arguments!
3+
<img src="https://github.com/ShishirPatil/gorilla/blob/gh-pages/assets/img/logo.png" width=50% height=50%>
4+
5+
Gorilla CLI powers your command-line interactions with a user-centric tool. Simply state your objective, and Gorilla CLI will generate potential commands for execution. Gorilla today supports ~1500 APIs, including Kubernetes, AWS, GCP, Azure, GitHub, Conda, Curl, Sed, and many more. No more recalling intricate CLI arguments! 🦍
46

57
Developed by UC Berkeley as a research prototype, Gorilla-CLI prioritizes user control and confidentiality:
68
- Commands are executed solely with your explicit approval.
@@ -16,27 +18,27 @@ pip install gorilla-cli
1618

1719
## Usage
1820

19-
Activate Gorilla CLI with a straightforward `gorilla` followed by your command in plain English.
21+
Activate Gorilla CLI with `gorilla` followed by your task in plain English.
2022

21-
For instance, to list all files in the current directory, type:
23+
For instance, to generate a file with 100 random characters, type:
2224

2325
```bash
24-
$ gorilla I want to list all files in the current directory
26+
$ gorilla generate 100 random characters into a file called test.txt
2527
```
2628

2729
or if you prefer, you can use quotes to avoid issues with string parsing:
2830

2931
```bash
30-
$ gorilla "I want to list all files in the current directory"
32+
$ gorilla "generate 100 random characters into a file called test.txt"
3133
```
3234

33-
Gorilla CLI will then generate potential commands. Simply use the arrow keys to navigate through the options, then press enter to execute the chosen command.
35+
Gorilla CLI will then generate candidate commands. Use the arrow keys to navigate through the options, then press enter to execute the chosen command.
3436

35-
```
37+
```bash
3638
🦍 Welcome to Gorilla. Use arrows to select
37-
» ls
38-
ls -l
39-
ls -al
39+
» cat /dev/urandom | env LC_ALL=C tr -dc 'a-zA-Z0-9' | head -c 100 > test.txt
40+
echo $(head /dev/urandom | LC_CTYPE=C tr -dc 'a-zA-Z0-9' | dd bs=100 count=1) > test.txt
41+
dd if=/dev/urandom bs=1 count=100 of=test.txt
4042
```
4143

4244
Some more examples
@@ -48,7 +50,7 @@ $ gorilla list all my GCP instances
4850
gcloud compute instances list --format="table(name, zone, machineType, status)"
4951
```
5052
```bash
51-
$ get the image ids of all pods running in all namespaces in kubernetes
53+
$ gorilla get the image ids of all pods running in all namespaces in kubernetes
5254
» kubectl get pods --all-namespaces -o jsonpath="{..imageID}"
5355
kubectl get pods --all --namespaces
5456
kubectl get pod -A -o jsonpath='{range .items[*]}{"\n"}{.metadata.name}{"\t"}{.spec.containers[].image}{"\n"}{end}'

go_cli.py

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,22 +23,23 @@
2323
from halo import Halo
2424
import go_questionary
2525

26-
__version__ = "0.0.8" # current version
26+
__version__ = "0.0.9" # current version
2727
SERVER_URL = "http://34.135.112.197:8000"
2828
UPDATE_CHECK_FILE = os.path.expanduser("~/.gorilla-cli-last-update-check")
2929
USERID_FILE = os.path.expanduser("~/.gorilla-cli-userid")
3030
ISSUE_URL = f"https://github.com/gorilla-llm/gorilla-cli/issues/new"
3131
WELCOME_TEXT = """🦍 Welcome to Gorilla-CLI! Enhance your Command Line with the power of LLMs!
3232
3333
Simply use `gorilla <your desired operation>` and Gorilla will do the rest. For instance:
34-
gorilla what is the path of my current directory
34+
gorilla generate 100 random characters into a file called test.txt
35+
gorilla get the image ids of all pods running in all namespaces in kubernetes
3536
gorilla list all my GCP instances
3637
37-
Created as a research prototype by UC Berkeley, Gorilla-CLI ensures user control and privacy:
38+
A research prototype from UC Berkeley, Gorilla-CLI ensures user control and privacy:
3839
- Commands are executed only with explicit user approval.
3940
- While queries and error (stderr) logs are used to refine our model, we NEVER gather output (stdout) data.
4041
41-
Visit us at github.com/gorilla-llm/gorilla-cli and start talking to your CLI!"""
42+
Visit github.com/gorilla-llm/gorilla-cli for examples and to learn more!"""
4243

4344

4445
def check_for_updates():
@@ -73,7 +74,9 @@ def get_user_id():
7374
try:
7475
with open(USERID_FILE, "r") as f:
7576
user_id = str(f.read())
76-
assert user_id != ""
77+
# If file found and user_id is blank. User hasn't setup github
78+
if user_id == "":
79+
user_id = str(uuid.uuid4())
7780
return user_id
7881
except FileNotFoundError:
7982
try:

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
setup(
1818
name="gorilla-cli",
19-
version="0.0.8",
19+
version="0.0.9",
2020
url="https://github.com/gorilla-llm/gorilla-cli",
2121
author="Shishir Patil, Tianjun Zhang",
2222
2323
description="LLMs for CLI",
24-
long_description=open("README.md").read(),
24+
long_description=open("README.md", "r", encoding="utf-8").read(),
2525
long_description_content_type="text/markdown",
2626
py_modules=["go_cli"],
2727
packages=find_packages(include=["*", "go_questionary.*"]),

0 commit comments

Comments
 (0)