@kikkimo/gemini-switcher
v1.0.0
Published
Interactive environment variable switcher for Google Gemini API with beautiful Gemini-style interface
Maintainers
Readme
Gemini Switcher
An elegant interactive authentication manager for Google's Gemini CLI with a beautiful Gemini-CLI-style interface. Manage multiple Gemini API credentials and switch between them seamlessly.
📖 Documentation
✨ Features
- 🎨 Claude-style interface with authentic gemini blue color scheme
- ⌨️ Arrow key navigation with fallback to number selection
- 🔐 Encrypted credential storage using AES-256-CBC encryption
- 🔄 Multi-credential management - Add, remove, and switch between authentications
- 🌍 Global installation - use
gemini-switcherfrom anywhere - 🔧 Smart environment setup - automatically configures shell environment variables
- 💻 Cross-platform - Windows, macOS, and Linux support
🚀 Quick Start
Install globally:
npm install -g @kikkimo/gemini-switcherRun the switcher:
gemini-switcherAdd your first authentication: Enter your Google API key (starting with
AIza) and Google Cloud Project ID when prompted
That's it! The switcher will guide you through the setup process.
📦 Installation
Global Installation (Recommended)
npm install -g @kikkimo/gemini-switcherAfter installation, you can run gemini-switcher from any directory.
Local Installation
git clone https://github.com/kikkimo/gemini-switcher.git
cd gemini-switcher
npm install
node gemini-switcher🎮 Usage
Available Authentication Options
- Add New Gemini Authentication - Add new Google API key and Cloud Project ID
- Remove Gemini Authentication - Remove existing authentication with table navigation
- Switch Gemini Authentication - Select and activate authentication (sets system environment variables)
- Exit - Generate shell commands to set environment variables for current session
Interactive Navigation
- Arrow Keys: Use ↑↓ to navigate, Enter to select (in TTY environments)
- Number Selection: Type 1-4 and press Enter (in non-TTY environments)
- Quick Exit: Press Esc or Q to quit anytime
Example Session
$ gemini-switcher
┌────────────────────────────────────────┐
│ Gemini Environment Switcher │
└────────────────────────────────────────┘
Use ↑↓ arrow keys to navigate, Enter to select
→ Add New Gemini Authentication
Remove Gemini Authentication
Switch Gemini Authentication
Exit⚙️ Configuration
Automatic Configuration
On first run, the switcher will:
- Automatically create
authentications.jsonin the installation directory - Guide you through entering your Google API key and Cloud Project ID
- Encrypt and store your credentials securely using machine-specific encryption
Manual Configuration
The configuration file authentications.json stores encrypted credentials:
{
"authentications": [
{
"apiKey": "encrypted_api_key_here",
"projectId": "encrypted_project_id_here"
}
]
}Note: All credentials are automatically encrypted when entered through the switcher. Do not manually edit encrypted values.
Security Features
- AES-256-CBC Encryption: Credentials are encrypted using industry-standard encryption
- Machine-specific Keys: Encryption keys are derived from machine-specific data
- Local Storage Only: Encrypted credentials cannot be decrypted on other machines
- Secure Input: API key input supports copy/paste and validation
📋 Requirements
- Node.js: 20.0.0 or higher
- Gemini CLI: Installed and accessible via
geminicommand - Terminal: Any modern terminal with Node.js support
🔧 Development
Building from Source
git clone https://github.com/kikkimo/gemini-switcher.git
cd gemini-switcher
npm installTesting Locally
npm start
# or
node gemini-switcher🤝 Contributing
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
📄 License
This project is licensed under the MIT License - see the LICENSE file for details.
🙏 Acknowledgments
- Built with ❤️ for the Gemini CLI community
- Thanks to all contributors and users
🐛 Issues & Support
If you encounter any issues or have questions:
- Check existing Issues
- Create a new issue with detailed information
- Include your operating system, Node.js version, and error messages
Note: This switcher is designed to work with Google's Gemini CLI. Make sure you have the Gemini CLI installed before using this tool.
