njamba is your OpenAI assistant on the terminal. It is a command line tool that uses the OpenAI API for natural language processing. It can be used to generate text, search for information, and answer questions. It is a work in progress and is currently in alpha stage. It is written in Go and uses Cobra for command line interface.
Remember, AI will not replace you. A person using AI will.
- Golang - https://go.dev/
- OpenAI API keys - https://beta.openai.com/
- Clone the project
$ git clone https://github.com/BrianMwangi21/njamba.git
- Navigate into the project
$ cd njamba
- Copy
.env.example
file to.env
file and set your OpenAI API keys in the .env file using your editor of choice. Neovim is highly recommended$ cp .env.example .env
- Install the program
$ go install
- Run the program
$ njamba
This CLI has the following commands:
This command is used to request a completion response from the OpenAI API.
How to run the prompt
command :
$ njamba prompt
On running this prompt, you will be guided through :
- Prompt input
- GPT Model selection - Text completion models are shown by default.
- Temperature input
- Max tokens input
The request will then be sent and the response shown.
This prompt command also accomodates for the flag --code
. Using this flag i.e $ njamba prompt --code
will then allow the user to select the code completion models instead of the default text completion models.
You : "Why is this necessary when there is the sweet sweet ChatGPT available for everyone and I don't even need the API keys to use?"
Me: "True. That is a valid point. I often ask myself the same. Here's the thing : ChatGPT is amazing but the fact that it is open to everyone, the downtimes are becoming more frequent. With this tool and using your own API keys, you can use it as much as you want - or until you reach your quota. Also, and hear me out, it's just awesome on the terminal."
You: "Ok, but do you use the sweet sweet gpt-3-turbo?"
Me: "Why, yes!"