0.2.3 • Published 9 months ago

jeannie v0.2.3

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
9 months ago

jeannie 🧞‍♀️

There's an old story among programmers about Donald Knuth and Doug McIlroy. It centers on the following text-processing problem:

Read a file of text, determine the n most frequently used words, and print out a sorted list of those words along with their frequencies.

In the end, both men come up with a solution. But while Knuth's program is long and formal, McIlroy's is a six-command shell pipeline.

Now, with jeannie, I present the one-command shell pipeline that solves the same problem. Now, the problem statement is the solution.

$ cat if.txt | genie "determine the 5 most frequently used words, and print out a sorted list of those words along with their frequencies"
  16 and
  14 you
  13 if
  12 can
  10 your

But jeannie is good at all kinds of things, including many that you couldn't normally do from the command-line. Here's another example:

$ cat README.md | genie "summarize how to run the backend"
To run the backend, ensure that the Postgres docker container is running, then
run the following commands from the backend directory: `pip install -r
requirements.txt` and `uvicorn app.main:app --reload`.

How It Works

Under the hood, jeannie is two tools in one. First, GPT-3 is used to sort the given command into one of two buckets: tasks involving soft skills are completed by GPT-3 with the result being streamed right to your terminal, whereas tasks that demand greater precision are delegated to bash--with GPT-3 being used to generate the bash code. The triage prompt is in a file called assign.sh.

Installation

Try it for yourself—it's surprising what it can do.

$ npm install -g jeannie

Since this is all powered by GPT-3 behind the scenes, you'll need to put your API key in your env to get it running.

$ export OPENAI_API_KEY=XYZ
$ ls -la | genie "list the largest file"
0.2.1

9 months ago

0.2.3

9 months ago

0.2.2

9 months ago

0.2.0

1 year ago

0.1.12

1 year ago

0.1.11

1 year ago

0.1.10

1 year ago

0.1.9

1 year ago

0.1.8

1 year ago

0.1.7

1 year ago

0.1.6

1 year ago

0.1.5

1 year ago

0.1.4

1 year ago

0.1.3

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago

0.0.4

1 year ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago