Prerequisites
Before setting up the integration, ensure you have:- Node.js: Version 20 or higher installed on your system
- Unbound Application: A configured application in your Unbound Security dashboard
Installation
Step 1: Install Gemini CLI
Install the Gemini CLI globally using npm:Step 2: Configure Environment Variables
To set up your environment to point Gemini CLI to Unbound AI Gateway, run the following command in your terminal:- Authenticate your account through the Unbound dashboard.
- Retrieve and register your gateway credentials.
- Redirect you back to a success page.
Step 3: First-Time Setup
When you open Gemini CLI for the first time after setup, you’ll be prompted with: “How would you like to authenticate for this project?” You’ll see three options:- Login with Google
- Use Gemini API Key
- Vertex AI
Step 4: Verify Installation
Test that Gemini CLI is properly configured:Usage
Basic Usage
Once configured, you can start using Gemini CLI in your terminal:- Generate code for various programming languages
- Ask questions about development topics
- Get assistance with debugging
- Process and analyze text content
Example Commands
Advanced Usage
Model Selection
You can specify different Gemini models:Troubleshooting
Common Issues
Gemini CLI not found after installation:- Ensure your Unbound API key is valid
- Check that the base URL is correct
- Verify your internet connection
- Confirm the Unbound service is running
Security Benefits
Using Gemini CLI with Unbound Security AI Gateway provides:- Request Monitoring: All AI requests are logged and monitored
- Cost Control: Set spending limits and track usage across all models
- Compliance: Ensure AI interactions meet your organization’s standards
- Guardrails: Apply security policies to AI responses
- Audit Trail: Complete visibility into AI usage patterns
- Model Routing: Intelligent routing to optimize performance and costs
- Rate Limiting: Prevent abuse and manage resource usage
Best Practices
Development Workflow
- Start with simple prompts to test the integration
- Use specific, clear instructions for better results
- Iterate on prompts to improve output quality
- Monitor usage through Unbound dashboard
- Set appropriate guardrails for your use case
Security Considerations
- Keep your API keys secure and never commit them to version control
- Use environment variables for configuration
- Regularly rotate your API keys
- Monitor usage patterns for anomalies
- Set up appropriate guardrails for your organization’s needs

