Skip to content

This CLI Gemini file allows you to run gemini thinking model in your CLI using your own API key(which is free! for the time being for the thinking model).

License

Notifications You must be signed in to change notification settings

alvishprasla11/CLI-GEMINI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🌟 Gemini CLI App

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!


🚀 Getting Started

1️⃣ Clone the Repository

First, clone this repository to your local machine:

git clone https://github.com/alvishprasla11/CLI-GEMINI.git
cd CLI-GEMINI

2️⃣ Set Up Environment Variables

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

3️⃣ Create a Virtual Environment & Install Dependencies

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

4️⃣ Create an Executable File

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.

5️⃣ Run the Application

Navigate to the dist folder and run the executable:

cd dist
./gemini-cli  # Mac/Linux
.gemini-cli.exe  # Windows

🎯 Features

✅ 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


🛠 Troubleshooting

  • 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.


🤝 Contributing

Got ideas or improvements? Feel free to fork the repo and submit a pull request!


📜 License

This project is licensed under the MIT License.


⭐ If you find this project useful, consider giving it a star ⭐ on GitHub!

Happy coding! 🚀

About

This CLI Gemini file allows you to run gemini thinking model in your CLI using your own API key(which is free! for the time being for the thinking model).

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages