Skip to content

API keys

Sebastian Bularca edited this page Dec 1, 2026 · 1 revision

API keys

/setup gemini (or claude, openai) tests the key and saves it in .solv/.credentials: readable only by you, not encrypted, never commit it. Order: api_key_env, then key_command, then the saved key.

  • Shell commands get no key variables, and a loaded key in a tool result or log becomes [hidden]. A command can still read the file where you stored a key.
  • Environment variable (asks at a hidden prompt; then open a new terminal):
    • Windows (PowerShell 7): [Environment]::SetEnvironmentVariable("GEMINI_API_KEY", (Read-Host "Key" -MaskInput), "User")
    • Linux: read -rsp "Key: " k && echo "export GEMINI_API_KEY='$k'" >> ~/.bashrc && unset k && chmod 600 ~/.bashrc
    • macOS: read -rs "k?Key: " && echo "export GEMINI_API_KEY='$k'" >> ~/.zshrc && unset k && chmod 600 ~/.zshrc
  • Claude: create the key inside a workspace in the Claude Console.

Clone this wiki locally