Skip to content

feat: add Gemini CLI auth login support#305

Open
AtharvaGurao wants to merge 1 commit intosipeed:mainfrom
AtharvaGurao:feat/auth-gemini-login
Open

feat: add Gemini CLI auth login support#305
AtharvaGurao wants to merge 1 commit intosipeed:mainfrom
AtharvaGurao:feat/auth-gemini-login

Conversation

@AtharvaGurao
Copy link

Summary

Adds Gemini (Google AI) as a supported provider for CLI authentication, enabling users to securely store and use their Gemini API key.

Usage

# Login (paste API key from aistudio.google.com/apikey)
picoclaw auth login --provider gemini

# Check status
picoclaw auth status

# Logout
picoclaw auth logout --provider gemini

The API key is stored securely in ~/.picoclaw/auth.json and loaded automatically when the provider is configured with auth_method: "token".

Changes

File Change
pkg/auth/token.go Added Gemini display name (aistudio.google.com/apikey)
cmd/picoclaw/main.go Wired Gemini into login, logout, help commands
pkg/providers/http_provider.go Load Gemini API key from auth store when auth_method is token (both explicit provider and model-name fallback)

How it works

  1. User runs picoclaw auth login --provider gemini
  2. Prompted to paste API key from Google AI Studio
  3. Key is stored in ~/.picoclaw/auth.json
  4. Config is updated with auth_method: "token"
  5. On next run, the Gemini provider loads the key from the auth store

Backward Compatible

  • Existing api_key in config continues to work (takes priority)
  • Only 3 files changed, 38 insertions, 8 deletions

Closes #267

Add Gemini (Google AI) as a supported provider for CLI authentication.
Users can now store their Gemini API key via:

  picoclaw auth login --provider gemini

The key is stored securely in ~/.picoclaw/auth.json and loaded
automatically when the provider is set to gemini with auth_method=token.

Changes:
- pkg/auth/token.go: add Gemini display name (aistudio.google.com/apikey)
- cmd/picoclaw/main.go: wire Gemini into login/logout/help commands
- pkg/providers/http_provider.go: load Gemini API key from auth store
  when auth_method is 'token' (both explicit provider and model-name
  fallback detection)

Closes sipeed#267
@Leeaandrob
Copy link
Collaborator

@Zepan Adds Gemini CLI auth login support — allows using Google's device auth flow for Gemini access without an API key.

Recommendation: Merge. +38/-8, lowers the barrier to using Gemini. Aligns with PicoClaw's goal of being accessible on minimal hardware with minimal setup.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Add CLI Logins for Openai and Gemini

2 participants