Skip to main content

Module credentials

Module credentials 

Source
Expand description

CLI credential store for the online API Personal Access Token (PAT).

Resolution precedence: the BALLISTICS_API_TOKEN environment variable takes precedence over the credentials file at ~/.ballistics/credentials.toml (mirroring the ToS-acceptance file location). The file is written 0600 on Unix and never echoed after saving.

Functionsยง

clear_token
Remove the credentials file if present.
credentials_path
Path to the credentials file (~/.ballistics/credentials.toml).
load_token
Resolve the token: BALLISTICS_API_TOKEN env var first, then the credentials file.
save_token
Save the token to the credentials file (0600 on Unix), creating the directory as needed.