summaryrefslogtreecommitdiff
path: root/internal/cli/command.go
diff options
context:
space:
mode:
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")
+}