GO-TERM is an intelligent terminal assistant built in Go and powered by Gemini AI. It enhances your command line experience with AI-powered suggestions, error resolution, and command explanations.
- GO-TERM
- π§ AI-powered command assistance using Gemini API
- π Error resolution - Use AI to fix your last error with a simple command
- π Clipboard monitoring - Get command suggestions based on clipboard content
- π Command explanations - Get AI explanations for any command or concept
- π¬ Chat with AI - Get concise answers to your questions in 3-4 lines
- π¨ Beautiful UI - Colorful terminal interface with animations and spinners
- π Command history - Persistent command history with search capabilities
- π» Seamless shell integration - Works alongside your regular terminal commands
- Go 1.18 or higher
- Gemini API key (obtain from Google AI Studio)
- Git
# Clone the repository
git clone https://github.com/0PrashantYadav0/GO-TERM.git
cd GO-TERM
# Install dependencies
go mod download
# Build the project
go build -o goterm ./cmd/goterm
# Move to your bin directory (optional)
sudo mv goterm /usr/local/bin/go install github.com/0PrashantYadav0/GO-TERM/cmd/goterm@latest# Clone the repository
git clone https://github.com/0PrashantYadav0/GO-TERM.git
cd GO-TERM
# Build the Docker image
docker build -t go-term .
# Run GO-TERM in a container
docker run -it --rm go-termTo use GO-TERM, you need to set up your Gemini API key. You can do this by creating a JSON file in your home directory.
Create a file named ~/.goterm.json and add your API key in the following format:
To create the file, you can use the command line:
touch ~/.goterm.jsonThen, open the file in your favorite text editor and add the following content:
{
"gemini_apiKey": "<your_api_key>"
}Alternatively, you can use the command line to create this file:
echo '{"gemini_apiKey: "<YOUR_API_KEY>"}' > ~/.goterm.jsonOn first run, GO-TERM will prompt you for a Gemini API key. You can obtain one from Google AI Studio.
Your API key will be stored securely in ~/.goterm.json.
To change your API key later, simply edit this file:
{
"gemini_apiKey": "YOUR_API_KEY_HERE"
}Simply run:
gotermGO-TERM supports all regular shell commands, plus these special commands:
| Command | Description | Example |
|---|---|---|
hm |
Get AI help for fixing your last error | hm |
hp <query> |
Ask AI for a command | hp create a zip file of all jpg files |
he <query> |
Get AI explanation for a command or concept | he what does chmod 755 mean |
chat <question> |
Get a brief AI answer to your question | chat what is quantum computing? |
history |
Show command history | history |
exit |
Exit GO-TERM | exit |
The chat command allows you to ask questions and get concise answers from Gemini AI:
chat what is quantum computing?- Provides brief, informative answers in 3-4 lines
- Displays responses in a nicely formatted box
- Answers are not copied to clipboard or stored
- Perfect for quick information without disrupting your workflow
GO-TERM monitors your clipboard and suggests relevant commands when you copy:
- GitHub repository URLs β
git clone [url] - npm package URLs β
npm install [package] - Homebrew formula URLs β
brew install [formula] - Downloadable file URLs β Appropriate download commands
GO-TERM/
βββ cmd/
β βββ goterm/ # Main application entry point
βββ internal/
β βββ ai/ # AI integration with Gemini
β βββ clipboard/ # Clipboard monitoring functionality
β βββ terminal/ # Terminal and command handling
β βββ ui/ # User interface components
βββ pkg/
β βββ utils/ # Utility functions
βββ Dockerfile # Docker container definition
βββ go.mod # Go module definition
βββ go.sum # Go module dependencies
βββ README.md # Project documentation
βββ LICENSE # License information
- Command History: Stored in
~/.goterm_history - Error Logs: Recent command errors stored in
~/.goterm_error - API Configuration: Stored in
~/.goterm.json
If you encounter problems with your API key:
- Verify your key is valid in Google AI Studio
- Check that
~/.goterm.jsoncontains the correct key - Restart GO-TERM after making changes
If you encounter display issues:
# Run GO-TERM with TERM environment variable
TERM=xterm-256color gotermIf GO-TERM has trouble executing commands:
- Try running in simple mode:
NO_COLOR=1 goterm - Check if the command works directly in your regular shell
Contributions are welcome! Here's how you can contribute:
- Fork the repository
- Create a feature branch:
git checkout -b feature-name - Commit your changes:
git commit -am 'Add some feature' - Push to the branch:
git push origin feature-name - Submit a pull request
This project is licensed under the MIT License - see the LICENSE file for details.
- Gemini AI for providing the AI capabilities
- All contributors and supporters of the project
Made with β€οΈ by Prashant Yadav

