banana-code-gemini-oauth
v1.0.1
Published
Gemini OAuth provider plugin for Banana Code
Downloads
14
Readme
🍌 Banana Gemini OAuth Plugin
[!CAUTION] Use at your own risk. Google’s policies indicate that utilizing Gemini CLI OAuth credentials within third-party tools (like this plugin) may be classified as a policy violation. This could potentially lead to account flags, abuse detection, or temporary restrictions. While enforcement varies, you should be aware of the inherent risks. If you prefer an officially supported and zero-risk method, we strongly recommend using Banana Code with a standard Google Cloud API Key instead.
A premium, secure OAuth 2.0 authentication provider for Banana Code, allowing you to use Google Gemini with your personal or workspace account without the hassle of managing API keys.
✨ Features
- Seamless Authentication: One-click Google Login flow via your browser.
- Auto-Refresh: Automatically handles token expiration and refreshing in the background.
- Secure Storage: Tokens are stored safely in your local config, never transmitted to third parties.
- Multi-Model Support: Access the latest 2.5 and 3.0 models directly.
- Intelligent Tier Detection: Built-in support for identifying Paid vs. Free account quotas.
🚀 Quick Start
Installation
Install directly via the Banana Code CLI:
banana /plugin install banana-code-gemini-oauthAlternatively, if you are developing locally:
banana /plugin install /path/to/banana-code-gemini-authFirst Login
Once installed, simply select Gemini (OAuth) as your provider in Banana Code. On your first request, a browser window will open automatically for authentication.
For headless environments (SSH/Terminals), the plugin will provide a URL for manual authorization.
🛠 Commands
The plugin adds several useful commands to your Banana Code environment:
| Command | Description |
| :--- | :--- |
| /gemini-oauth-login | Re-trigger the Google OAuth flow to switch accounts or refresh access. |
| /gemini-oauth-logout | Securely wipe all stored OAuth tokens from your local machine. |
🧠 Supported Models
The plugin fully supports the Gemini model ecosystem:
- ⚡ Gemini 3 Flash (Fast & Efficient)
- 🚀 Gemini 3.1 Pro (Complex Reasoning)
- 🧪 Experimental Models (Latest from Google DeepMind)
- 🤖 Auto Selection (Optimized for your task)
🔐 Privacy & Security
We take your security seriously:
- Local Only: Your OAuth tokens are stored at
~/.config/banana-code/gemini-oauth-token.json. - Direct to Google: Authentication happens directly with Google; this plugin never sees your password.
- Minimal Scopes: We only request the minimum permissions required to interact with the Gemini API.
⚡ Technical Details (For Developers)
Token Management
Uses @openauthjs/openauth for robust PKCE-based OAuth 2.0 flows, ensuring compatibility with modern security standards.
🤝 Contributing
Contributions are welcome! If you find a bug or have a feature request, please open an issue or submit a pull request.
- Fork the repository.
- Create your feature branch (
git checkout -b feature/amazing-feature). - Commit your changes (
git commit -m 'Add some amazing feature'). - Push to the branch (
git push origin feature/amazing-feature). - Open a Pull Request.
📄 License & Acknowledgments
This project is licensed under the MIT License.
Parts of the core logic and API integration patterns were adapted from the opencode-gemini-auth project by Jens. We are grateful for their work in the open-source community.
See the LICENSE file for the full license text and copyright notices.
