Missing credentials
Symptom#
You run scaiflux, scaiflux repl, or scaiflux prompt "..." and
see one of:
1 2 | |
1 2 | |
1 2 3 | |
What it means#
ScaiFlux has no way to talk to a model. It looks in three places, in order, and gives up if none have anything usable:
SCAIGRID_API_KEY+SCAIGRID_BASE_URLenvironment variables.- A stored session at
~/.scaiflux/credentials.json(written byscaiflux setuporscaiflux login). OPENAI_API_KEY(+ optionalOPENAI_BASE_URL) for a BYO OpenAI-compatible backend.
If none are set, the runtime aborts before it can do anything.
Fix#
Easiest — run the wizard:
1 | |
Three prompts: endpoint (defaults to ScaiLabs), API key (paste an
sgk_live_... key from your ScaiKey dashboard), default model. The
wizard writes ~/.scaiflux/credentials.json (mode 0600) and you're
done.
Headless / scripted — set env vars instead:
1 2 3 | |
These environment variables override any stored session, so they're also the cleanest way to test a different key without disturbing your default config.
Already ran setup but still seeing this — check whether the credentials file is where ScaiFlux looks for it:
1 2 | |
The doctor report tells you exactly which credential source it
resolved (or which check failed). If the file exists but the wrong
user owns it (e.g. you ran setup under sudo and your
non-sudo user can't read it), fix the ownership or re-run setup
without sudo.
Related#
- Install — get ScaiFlux on a machine.
- Quickstart — from zero to your first prompt.