A command-line interface for interacting with Google's Gemini AI model. This project provides a simple and interactive way to chat with the Gemini model directly from your terminal.
- Interactive chat interface with Gemini AI
- Conversation history management
- Context-aware responses
- Graceful error handling
- Clean exit with Ctrl+C
- Python 3.7 or higher
- Google API key for Gemini
- Clone the repository:
git clone https://github.com/CollinsKipkemoi/gemini-shell.git
cd gemini-shell- Install the required dependencies:
pip install -r requirements.txt- Create a
.envfile in the project root and add your Google API key:
GOOGLE_API_KEY=your_api_key_here
Run the script:
python script.py- Type your message and press Enter to chat with the AI
- Press Ctrl+C to exit the chat
gemini-shell/
├── script.py # Main application file
├── requirements.txt # Project dependencies
├── .env # Environment variables (not tracked in git)
└── README.md # This file
google-generativeai: Google's official Gemini API clientpython-dotenv: Environment variable managementdatetime: Timestamp handlingjson: Data serialization
Contributions are welcome! Please feel free to submit a Pull Request.
- Google Gemini AI team for providing the API
- Python community for the excellent libraries used in this project