Skip to main content

Module parser

Module parser 

Source
Expand description

Parser for OpenCode’s auth.json file.

Format: { “provider_id”: { “type”: “api”, “key”: “sk-…” } } Also supports: { “provider_id”: { “type”: “oauth”, “token”: “…” } }

Structs§

AuthEntry
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§

AuthEntries
Auth entries parsed from auth.json.