Welcome to the Gemini CLI App, a simple and powerful command-line tool that interacts with the Gemini API. Follow the steps below to set up and run the application seamlessly!
First, clone this repository to your local machine:
git clone https://github.com/alvishprasla11/CLI-GEMINI.git
cd CLI-GEMINI
Create a new .env
file in the root directory of the project:
touch .env
Then, obtain an API Key from Gemini and add it to your .env
file:
GEMINI_API_KEY=your_api_key_here
Set up a virtual environment and install the required dependencies:
python -m venv venv # Create virtual environment
source venv/bin/activate # Activate (Mac/Linux)
venv\Scripts\activate # Activate (Windows)
pip install -r requirements.txt # Install dependencies
Convert your script into an executable so it can be easily run from the CLI:
pyinstaller --onefile --name gemini-cli gemini.py
This will generate an executable file inside the dist
directory.
Navigate to the dist
folder and run the executable:
cd dist
./gemini-cli # Mac/Linux
.gemini-cli.exe # Windows
✅ Interacts with the Gemini API using your API key
✅ Supports environment variable configuration for security
✅ Simple command-line interface for easy usage
✅ Packaged as an executable file for portability
-
Permission denied while running the executable(NEED TO DO THIS IN MAC/LINUX!)?
Try giving it execution permissions:chmod +x gemini-cli
-
Issues with dependencies?
Make sure you are in the virtual environment and try reinstalling:pip install --force-reinstall -r requirements.txt
-
Invalid API key error?
Double-check your.env
file and ensure you copied the correct key.
Got ideas or improvements? Feel free to fork the repo and submit a pull request!
This project is licensed under the MIT License.
Happy coding! 🚀