Expand description
Provider keys from a file, for sessions that did not export them: a Claude Code session started
without GEMINI_API_KEY failed every blyte dispatch at turn 0 (2026-09-29).
The file is $BLYTE_ENV_FILE (empty turns it off), else $XDG_CONFIG_HOME/blyte/env, else
~/.config/blyte/env: NAME=value lines, with an optional export prefix, surrounding quotes,
blank lines and # comments. A variable already set in the environment wins. A file other users
can read is not loaded.
Functionsยง
- default_
path - Where blyte looks for the file, or
Nonewhen it is turned off. - get
- Reads the value of
namefrompath, orOk(None)if the file or variable is absent. - load
- Sets each variable in the file at
paththat is not already set, and returns their names. A missing file sets nothing. Call it before any threads start: it usesstd::env::set_var. - parse
- The
NAME=valuepairs intext. - set
- Sets one or more
NAME=valuelines in the file atpath: replaces an existing line for the same name, keeps all other lines and comments, and appends new names. Creates the file and its parent directory if needed, with file mode 0600 on Unix.