CowsayGenerator is a fun and lightweight Go program that generates motivational or humorous quotes using OpenAI's GPT API and displays them with the classic cowsay terminal program. It's perfect for brightening your day whenever you open a terminal!
cowsay.cowsay program.
sudo pacman -S cowsay
sudo apt install cowsay
brew install cowsay
export OPENAI_API_KEY=your_api_key_here
Clone the Repository
git clone https://github.com/ksande91/cowsay-generator.git
cd cowsay-generator
Build the Program
go build -o cowsaygenerator
Run the Program
./cowsaygenerator
From the folder where cowsaygenerator resides:
./cowsaygenerator
To make the program run every time you open a terminal:
Edit your ~/.bashrc file:
nano ~/.bashrc
Add this line:
/path/to/cowsaygenerator
Save and reload:
source ~/.bashrc
Edit your ~/.zshrc file:
nano ~/.zshrc
Add this line:
/path/to/cowsaygenerator
Save and reload:
source ~/.zshrc
Edit your ~/.config/fish/config.fish file:
nano ~/.config/fish/config.fish
Add this line:
/path/to/cowsaygenerator
Save and reload:
source ~/.config/fish/config.fish
Here’s what you’ll see when you run the program:
__________________________
< "Don’t moooove too fast, enjoy the grass!" >
--------------------------
\ ^__^
\ (oo)\_______
(__)\ )\/\
||----w |
|| ||
This project is licensed under the MIT License. See the LICENSE file for details.