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.

# 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-term
To 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.json
Then, 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.json
On 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:
goterm
GO-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?
GO-TERM monitors your clipboard and suggests relevant commands when you copy:
git clone [url]npm install [package]brew install [formula]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
~/.goterm_history~/.goterm_error~/.goterm.jsonIf you encounter problems with your API key:
~/.goterm.json contains the correct keyIf you encounter display issues:
# Run GO-TERM with TERM environment variable
TERM=xterm-256color goterm
If GO-TERM has trouble executing commands:
NO_COLOR=1 gotermContributions are welcome! Here's how you can contribute:
git checkout -b feature-namegit commit -am 'Add some feature'git push origin feature-nameThis project is licensed under the MIT License - see the LICENSE file for details.
Made with ❤️ by Prashant Yadav
No reviews yet. Be the first to rate this tool.
Sign in to leave a review.