opencode
opencode copied to clipboard
feat: store sensitive info in keychain
Stores sensitive information in keychain. Tested on macOS only.
updated to use new bun.secrets API
replaces get() set() all() delete() functions in auth to use keychain instead of file.
pros:
- increases security
cons:
- removes text-editability of API keys
- breaking change to UX, requiring either automatic migrations of secrets into keychain, or users must re-auth to everything.
this was oneshotted with opencode and gpt-5. if any changes are desired lmk
@thdxr looking for review here. I have a patch ready to perform automatic migration-into-keychain every time a user accesses a secret.