TOOL INTEGRATION
Gemini CLI
Google's terminal AI agent. HashBid serves the native Gemini protocol, so the official CLI works with a few environment variables and one settings entry.
Before you start
Setup
01Install Gemini CLI
Requires Node.js 20 or later.
node --versionnpm install -g @google/gemini-cli02Set the environment variables
Gemini CLI ignores OpenAI-style variables; it only reads its own. Use a Gemini model enabled on the Models page.
export GEMINI_API_KEY="<YOUR_API_KEY>"
export GOOGLE_GEMINI_BASE_URL="https://hashbidx.ai/v1/gemini"
export GEMINI_MODEL="<MODEL_ID>"$env:GEMINI_API_KEY="<YOUR_API_KEY>"
$env:GOOGLE_GEMINI_BASE_URL="https://hashbidx.ai/v1/gemini"
$env:GEMINI_MODEL="<MODEL_ID>"set GEMINI_API_KEY=<YOUR_API_KEY>
set GOOGLE_GEMINI_BASE_URL=https://hashbidx.ai/v1/gemini
set GEMINI_MODEL=<MODEL_ID>These only last for the current session. To keep them, add the export lines to ~/.zshrc / ~/.bashrc, or set them as Windows user environment variables.
03Select API key authentication
Tell Gemini CLI to authenticate with GEMINI_API_KEY; without this it stops with Invalid auth method selected. Create ~/.gemini/settings.json (Windows: %USERPROFILE%\.gemini\settings.json), or merge the security entry into your existing file.
{
"security": {
"auth": {
"selectedType": "gemini-api-key"
}
}
}04Start Gemini CLI
Run it in the same terminal. If asked whether to connect VS Code, choose Yes to let it read your open files. With the variables and the auth setting in place, the login menu is skipped.
geminiVerify it works
- You land at the
>prompt without a sign-in menu. - Ask
Hello, please introduce yourself.and get a reply. - The request shows up on the Logs page of this console.
FAQ
404 / “Invalid URL”
GOOGLE_GEMINI_BASE_URL must be https://hashbidx.ai/v1/gemini — not the bare /v1 base used by OpenAI tools. Restart the terminal after fixing it.
“Content generator not initialized” or an auth-method prompt
Check that ~/.gemini/settings.json sets security.auth.selectedType to gemini-api-key. Then make sure the CLI sees your variables: use GEMINI_API_KEY, not OPENAI_API_KEY, and run gemini in the window where you set them.
Model not found
Check GEMINI_MODEL against the exact model ID on the Models page.