From b006582e4c7323821eb836080a9bc9ec24243a47 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 1 Apr 2026 13:00:40 +0300 Subject: zr: add Gemini-backed translation provider --- internal/cli/command.go | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'internal/cli/command.go') diff --git a/internal/cli/command.go b/internal/cli/command.go index b07bd26..a5a8c13 100644 --- a/internal/cli/command.go +++ b/internal/cli/command.go @@ -155,3 +155,14 @@ func GetOpenAIKey() string { // Then check config file return viper.GetString("audio.openai_key") } + +// GetGoogleAPIKey retrieves the Google API key from environment or config. +func GetGoogleAPIKey() string { + // First check environment variable + if key := os.Getenv("GOOGLE_API_KEY"); key != "" { + return key + } + + // Then check config file + return viper.GetString("google.api_key") +} -- cgit v1.2.3