praisonai --init is now safe to run before setup — if no provider is configured it prints provider guidance and exits cleanly rather than throwing a stack trace. Either order works for onboarding.
Onboarding Flow
Quick Start
1
Run praisonai without any setup
Y (or press Enter) to launch the setup wizard.2
Complete setup once
The setup wizard asks for your provider and API key, then stores the credential securely:Credentials are stored in
On first run, the picker shows every catalogue-known provider (Groq, OpenRouter, Mistral, DeepSeek, xAI, …) — not just the historical curated five — and prints a
Get your key: link before the masked prompt.When one of
OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY, or GOOGLE_API_KEY is already exported, the wizard skips the menu and pre-selects that provider — you only confirm.~/.praisonai/credentials.json (permissions 0600). Legacy ~/.praison/credentials.json is still read as a fallback and migrated automatically on the next write — no re-login required.3
Re-run — no prompts after the first time
Wizard flow (post-#2680)
The wizard moves through three stages: auto-detect, validate, and smoke-test.1
Auto-detect a key you already have
If a Answer
*_API_KEY is already exported, the first prompt is a confirmation — not a numeric menu:n to fall through to the full provider menu. The provider menu only appears when no key is detected, and is catalogue-driven — it lists every provider ModelCatalogue knows about (Groq, OpenRouter, Mistral, DeepSeek, xAI, …), curated ones first and custom last.2
Validate the key before it persists
Entered keys run through the same After up to three attempts the wizard proceeds with the last entry so you’re never stuck in a loop.
validate_api_key() check as praisonai auth login. A bad key re-prompts instead of silently writing a broken credential:3
Smoke-test before handing back the prompt
After the config is written, the wizard runs one live call and prints the reply:A failed smoke test is a warning, not an error — your config is already saved, so you can run
praisonai doctor to diagnose the key or model.Pass The wizard still writes the config; it just doesn’t dial the LLM.
--no-verify to skip the smoke test when running offline or in CI:How It Works
Bothpraisonai (bare) and praisonai run perform a credential check before doing any work.
Credential detection order
Behaviour by Mode
CI / Scripting
In non-interactive environments, PraisonAI exits with code1 and writes to stderr:
not sys.stdin.isatty() or --output json mode.
GitHub Actions example
Skipping the Prompt
Three ways to avoid the setup prompt:Default model on first run
If you run a command likepraisonai chat without --model on first use, PraisonAI picks a default that matches the provider credential it finds in your environment — Anthropic key → Claude, Gemini key → Gemini Flash, etc. See Default Model Resolution for the full ladder.
Best Practices
In CI, set credentials before invoking
In CI, set credentials before invoking
Set
OPENAI_API_KEY (or the provider key for your model) as a repository secret, then reference it in your workflow env block. This is the recommended approach — no credential files in your repo, no interactive prompts:Test your setup with a quick prompt before piping through automation
Test your setup with a quick prompt before piping through automation
Run
praisonai run "ping" manually before wiring the command into a pipeline or CI job. A successful response confirms credentials are configured and the model is reachable.Skip the smoke test in CI
Skip the smoke test in CI
The smoke test is convenient locally but wastes a token round-trip in CI. Skip it with
--no-verify on both setup and setup wizard.Related
Setup Wizard
Interactive wizard for configuring LLM provider credentials
Run Command
Run agents from files or prompts

