https://github.com/subbu963/bott
bott: Your Terminal Copilot
https://github.com/subbu963/bott
chatbot chatgpt llama llm ollama openai terminal-based
Last synced: 12 days ago
JSON representation
bott: Your Terminal Copilot
- Host: GitHub
- URL: https://github.com/subbu963/bott
- Owner: subbu963
- Created: 2023-12-06T13:18:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-01-28T04:46:38.000Z (about 1 year ago)
- Last Synced: 2024-10-29T07:34:29.007Z (6 months ago)
- Topics: chatbot, chatgpt, llama, llm, ollama, openai, terminal-based
- Language: Rust
- Homepage:
- Size: 962 KB
- Stars: 84
- Watchers: 1
- Forks: 3
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
![]()
# Welcome to `bott`: Your Terminal Copilot
`bott` (short for bot-in-terminal) is not just a command line tool; it's your copilot in the vast world of the terminal. Designed to make you feel like a terminal pro, bott assists you with day-to-day activities, provides helpful tips, and even adds a touch of humor to your command line experience.
![]()
![]()
## Installation
### Rust
Install rust if you don't have it already and ensure a version greater than 1.74.0
```bash
$ curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
$ source $HOME/.cargo/env
$ rustc --version
```
### Bott
Install bott with a single command:
```bash
$ curl -o- https://raw.githubusercontent.com/subbu963/bott/v0.1.0/install.sh | bash
```## Usage
Whether you prefer the intelligence of OpenAI or the wisdom of Ollama, bott has you covered. Choose your Large Language Model (LLM) and unleash the power of your terminal.
### Choosing your LLM (Large Language Model)
#### With Openai
1. Navigate to [OpenAI's API Keys section](https://platform.openai.com/api-keys) and create a new API key or use an existing one.
2. Configure bott to use OpenAI:
```bash
$ bott! config set -k llm openai
$ bott! config set -k openai:api_key -v YOUR_API_KEY
```
Securely stored in a keychain, your API key is safe with bott.3. Default model is `gpt-4`. If you want to change the OpenAI model (refer to [OpenAI's documentation](https://platform.openai.com/docs/models/gpt-4-and-gpt-4-turbo for available models), do:
```bash
$ bott! config set -k openai:model -v YOUR_PREFERRED_MODEL
```
#### With Ollama
1. Download Ollama from [ollama.ai](https://ollama.ai).
2. Default model is `codellama:7b-instruct`. If you want to change the model (refer to the [library](https://ollama.ai/library) for available models), do:
```bash
$ ollama pull codellama:7b-instruct
$ bott! config set -k ollama:model -v codellama:7b-instruct
```
3. Configure bott to use Ollama:
```bash
$ bott! config set -k llm -v ollama
```
Secure and ready, bott now utilizes the Ollama model to enhance your terminal experience.
### Commands
#### Queries
Bott excels in aiding you with everyday terminal activities. For instance, when working in a Git repository and wanting to add only the changed JS files to a commit:
```bash
$ bott! query "figure out all the js files that i have changed in the current directory and add them to the commit."
```
Bott keeps track of sessions, allowing you to ask follow-up questions:
```bash
$ bott! query "do the same for html files as well"
```
#### Debug
When troubleshooting commands, bott shines as your debugging assistant. If a command found online, like fetching the OS version, fails:
```bash
$ bott! run cat /etc/os-release
$ bott! debug
```
Bott steps in to investigate and find out why the command is failing on your system.Enjoy the journey with bott, your trusty companion in the terminal!