block / goose

Goose is a developer agent that operates from your command line to help you do the boring stuff.
https://block.github.io/goose/
Apache License 2.0
109 stars 17 forks source link

feat: saved api_key to keychain for user #104

Closed lifeizhou-ap closed 2 weeks ago

lifeizhou-ap commented 3 weeks ago

Why Enable users to store api key in keychain for convenience

What

Rules When the api key environment variable does not exist,

Changes

Screenshot 2024-10-01 at 4 08 35 PM Screenshot 2024-10-01 at 4 09 20 PM Screenshot 2024-10-01 at 4 09 44 PM

Screenshot 2024-10-04 at 3 17 32 PM
lamchau commented 3 weeks ago

very cool! how would a user update the keychain with the same prompts (typo, rotation, etc)?

just had a thought! what do you think of a goose config (and maybe even a goose check)? that way we can use it as a catch all to do things

michaelneale commented 3 weeks ago

cc @alecthomas

lifeizhou-ap commented 2 weeks ago

just had a thought! what do you think of a goose config (and maybe even a goose check)? that way we can use it as a catch all to do things

  • check latest version
  • check profiles
  • check api keys of each providers (both environment variables and keychain)?

Yes, that could be useful.

lifeizhou-ap commented 2 weeks ago

how would a user update the keychain with the same prompts (typo, rotation, etc)?

I think we can enhance this later. When we load the api key from keychain, the console prints the message about the api_key source. If it is not correct, the user still can update by themselves.

alecthomas commented 2 weeks ago

This is awesome!