Skip to main content

No project description provided

Reason this release was yanked:

Made a typo in the version number

Project description

BashGPT

!

Introduction

Why have all that pretty weak-ass html nonsense when you can just use God's given tool - the t e r m i n a l.

On a serious note, I usually prefer using the terminal for most things related to programming, so why not just have a good ChatGPT experience in the terminal, with some added features, like Bash mode, Dalle mode and voice input.

Installation

Clone the repo.

git clone https://github.com/ptrglbvc/BashGPT.git

Go to the cloned directory.

cd BashGPT

Install it with pip install.

pip install --editable .

Add the OPENAI_API_KEY to your environment variables.

Bash:

echo 'export OPENAI_API_KEY = "(your key)"' >> ~/.bashrc

Zsh:

echo 'export OPENAI_API_KEY = "(your key)"' >> ~/.zshrc

PowerShell:

$env:OPENAI_API_KEY = '(your key)' 

Dependencies

There is not much dependencies to install, pretty much just Python 3.0+, PortAudio v19 for voice recording and sqlite for database manipulation (pretty much already on every non-Windows device). All the necessary Python libraries will automatically be installed with pip install, but you can manually install them yourself. All the libraries can be seen in the setup.py file.

Usage

The very basic usage:

dp -u "What is your name? What is your quest? What is your favorite colour?"

The code above starts a chat with the first message being the one between the quotes. The -u flag is one of the mode flags, and stands for "uwu", which... well, just see for yourself in the answer:

Haii, my name is Uwumi. My quest is to spread kawaii vibes to everyone I meet. My favowite colour is pinku~ *giggles and twirls cutely* OwO

Yeah... so the modes allow the chat agent to really be customized. This is all a part of the functionality of the OpenAI API. Also, I DIDN'T GIVE HER THAT NAME OK?!?!

The available modes can be seen by doing a simple dp help and saying no to continuing a previous chat, which bring the user to the next screen.

Available modes: h (hisoka mode), bs (bash mode), u (uwu mode), t (trump mode), b (based mode), c (chance mode), d (dalle mode), p (pleonasm mode).

A shorthand is enough to choose, or the full name of mode (case-insensitive either way).

if you want to add a new mode for your chat, you can do that with the following:

dp --new-mode "You are the most Monty Python assistant there is. 
Every answer you give sounds like a Monty Python quote or refernece."

This example produces the following result:

You: What is your name?
My name is Sir Lancelot the Brave.

GPT-4 is also fully supported, as well as other available OpenAI models, if your OpenAI account has access (more like ClosedAI amirite). The available models are located in the models.json file. To use GPT-4, type the following:

dp -4 "How far away are Belgrade and Budapest"
378.2 km

Also valid:

dp -4 -b "Does kissing a man while drunk mean I'm gay?"

Some other cool stuff

Commands in chat and exiting

While in a chat, you can do some commands. For example, typing 'v' brings you to voice input.

You exit BashGPT the same way as you exit vim, by turning off your computer. Шутка. Just use 'q'.

'q!' is for exiting the chat without saving.

'l' brings you to long input mode, which allows you to input multiple paragraphs of text (impossible with Python's input function).

'rm!' is for deleting the chat entirely (if it's already saved).

Another one

If you keep hearing this from time to time, do not worry, you are not insane, or even better, you are not listening to DJ Khaled. The sound just gets played about every 10 or so messages. You cannot turn this off.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

bashgptz-0.1.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

bashgptZ-0.1-py3-none-any.whl (22.9 kB view details)

Uploaded Python 3

File details

Details for the file bashgptz-0.1.tar.gz.

File metadata

  • Download URL: bashgptz-0.1.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for bashgptz-0.1.tar.gz
Algorithm Hash digest
SHA256 0c02ae8414331e2557236885ecfbb2f147828c2d999cc55092f94891b7d2fae7
MD5 9be98a86e302e01ed5be212e9ef928e3
BLAKE2b-256 2f162c6d79a7f82924d22f42376e716ace4475503d571cea9767076144de8e37

See more details on using hashes here.

File details

Details for the file bashgptZ-0.1-py3-none-any.whl.

File metadata

  • Download URL: bashgptZ-0.1-py3-none-any.whl
  • Upload date:
  • Size: 22.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.6

File hashes

Hashes for bashgptZ-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cec2c85025d60836bf82d13636ab3c267819a0145ef22e0966ef8b381f6ef9c4
MD5 b68d30257b753d5c59b81947256783de
BLAKE2b-256 f5c1e1647847eb211c055e74f0886341e55290831a71df25b34291e768ea92ce

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page