Use Google Gemini in your terminal
Google AI Studio has a free tier, which makes Gemini a good first provider.
Set up
Section titled “Set up”- Create an API key at https://aistudio.google.com/apikey.
- Run
kunji keys add geminiand paste the key. kunji checks it works, then stores it in your OS keychain. - Pick a default model from the list (type to search).
- Run
kunjiand start chatting.
Details
Section titled “Details”| Provider id | gemini |
| Type | OpenAI-compatible API |
| API address | https://generativelanguage.googleapis.com/v1beta/openai |
| Key variable | GEMINI_API_KEY or GOOGLE_API_KEY |
Use it
Section titled “Use it”kunji models gemini # see available modelskunji use gemini:<model> # make one your defaultkunji chat -m gemini:<model> # or chat with it onceInside a chat, switch to it with /model gemini:<model>; the conversation carries over.
Use an environment variable instead
Section titled “Use an environment variable instead”For CI or scripts you can skip the keychain:
export GEMINI_API_KEY=your-key-herekunji ask -m gemini:<model> "Hello"