Expand description
Parser for OpenCode’s auth.json file.
Format: { “provider_id”: { “type”: “api”, “key”: “sk-…” } } Also supports: { “provider_id”: { “type”: “oauth”, “token”: “…” } }
Structs§
- Auth
Entry - A single provider’s auth entry.
Functions§
- parse_
auth_ file - Parse auth.json from a file path.
- parse_
auth_ json - Parse auth.json from a string. Supports JSONC (JSON with comments and trailing commas).
Type Aliases§
- Auth
Entries - Auth entries parsed from auth.json.