summaryrefslogtreecommitdiff
path: root/internal/cli/command.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-01 13:00:40 +0300
committerPaul Buetow <paul@buetow.org>2026-04-01 13:00:40 +0300
commitb006582e4c7323821eb836080a9bc9ec24243a47 (patch)
treea8e96ecdc74cd2a5bb19148d8a6a7cf90f6cbbb4 /internal/cli/command.go
parenta574e5290261f9ea2cc39fd0a9a2ba756fc1f67a (diff)
zr: add Gemini-backed translation provider
Diffstat (limited to 'internal/cli/command.go')
-rw-r--r--internal/cli/command.go11
1 files changed, 11 insertions, 0 deletions
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")
+}