Godo is a command-line tool that uses AI to suggest and execute Linux commands based on natural language descriptions.
Screen.Recording.2024-12-27.at.10.02.51.PM.mov
-
Ensure you have Go installed on your system. If not, download and install it from golang.org.
-
Clone this repository or download the
godo.gofile. -
Install the required dependencies:
go get github.com/joho/godotenv -
Compile the program:
go build -
Move the compiled binary to a directory in your system's PATH. For example:
sudo mv godo /usr/local/bin/
-
Create a
.envfile in your home directory:touch ~/.env -
Open the
.envfile in a text editor and add your Gemini API key and endpoint:GEMINI_API_KEY=your_actual_api_key_here GEMINI_API_ENDPOINT=https://generativelanguage.googleapis.com/v1beta/models/gemini-1.5-flash-latest:generateContentReplace
your_actual_api_key_herewith your real Gemini API key. -
Save and close the file.
Once installed and configured, you can use Godo from anywhere in your terminal:
godo how to do something in linux
For example:
godo how to list all files including hidden ones
The AI will suggest a command, and you'll be prompted whether you want to execute it.
Always review the suggested command before executing it, especially for commands that might modify your system.
If you encounter any issues:
- Ensure your
.envfile is correctly set up in your home directory. - Check that you have the necessary permissions to execute the
godocommand. - Verify that your Gemini API key is valid and has the necessary permissions.
Contributions are welcome! Please feel free to submit a Pull Request.