Command Line Interface for using Gemini AI Here’s a README template you can use for your GitHub repository. It covers the basics of using the CLI on different operating systems and includes contribution guidelines.
The Gemini CLI is a command-line interface tool designed for interacting with the Gemini API. It allows users to set an API key, ask questions, and reset the API key. The CLI supports both command-based and interactive modes, making it versatile for various use cases.
-
Download the Executable:
- Download the
gemini-cli.exe
file from the releases section.
- Download the
-
Running the Executable:
- Double-click the
gemini-cli.exe
file to run it in interactive mode. - To use commands, open Command Prompt or PowerShell and run:
gemini-cli.exe <command>
- Double-click the
-
Compile Your Own Executable:
- If you prefer to compile your own executable, clone the repository, navigate to the src directory, and run the following command:
pyinstaller --onefile --name gemini-cli --add-data "config.json;." cli_script.py
-
Clone the Repository:
git clone https://github.com/yourusername/your-repo.git cd your-repo/src
-
Create a Virtual Environment:
python3 -m venv venv source venv/bin/activate
-
Install Dependencies:
pip install -r requirements.txt
-
Running the CLI:
- To run in interactive mode:
python cli_script.py
- To use commands:
python cli_script.py <command>
- To run in interactive mode:
- setkey: Set the Gemini API key. You will be prompted to enter your API key.
- ask: Enter interactive mode to ask questions using the Gemini API.
- resetkey: Reset the Gemini API key by removing it from the configuration.
- help: Show help information.
We welcome contributions to improve the Gemini CLI. To contribute:
-
Fork the Repository:
- Click on the "Fork" button at the top-right of this page.
-
Clone Your Fork:
git clone https://github.com/yourusername/your-fork.git
-
Create a New Branch:
git checkout -b feature/your-feature
-
Make Changes and Commit:
- Describe your changes clearly in your commit messages.
-
Push Your Changes:
git push origin feature/your-feature
-
Create a Pull Request:
- Go to the original repository and click on "New Pull Request."
- Code Style: Follow the existing code style of the project.
- Documentation: Ensure that any new features or changes are well-documented.
- Testing: Add or update tests as necessary.
This project is licensed under the GNU GENERAL PUBLIC License - see the LICENSE file for details.