Quick Start
Run praisonai without any setup
Y (or press Enter) to launch the setup wizard.Complete setup once
The setup wizard asks for your provider and API key, then stores the credential securely:Credentials are stored in
~/.praison/credentials.json (permissions 0600).How It Works
Bothpraisonai (bare) and praisonai run perform a credential check before doing any work.
Credential detection order
| Step | What is checked | Example |
|---|---|---|
| 1. Env vars (fast path) | OPENAI_API_KEY, ANTHROPIC_API_KEY, GOOGLE_API_KEY, GEMINI_API_KEY, GROQ_API_KEY, COHERE_API_KEY | export OPENAI_API_KEY=sk-... |
| 2. Credential store | ~/.praison/credentials.json written by praisonai setup | praisonai setup |
| 3. LLM resolution | resolve_llm_endpoint_with_credentials() β final fallback | Stored OpenAI base URL |
Behaviour by Mode
| Scenario | Old behaviour | New behaviour |
|---|---|---|
| Configured user (env var or stored credential) | Works normally | Works β no extra prompts, no added latency |
New TTY user, no credentials, praisonai | Launched TUI, failed on first LLM call | Prints prompt, offers setup wizard |
New TTY user, no credentials, praisonai run "hi" | Ran agent, failed on first LLM call | Same prompt as above; on success continues the run |
CI / piped stdin / --output json | Cryptic LLM failure | Writes error to stderr, exits 1 |
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:| Method | Command / Action |
|---|---|
| Set an env var | export OPENAI_API_KEY=sk-... |
| Run setup ahead of time | praisonai setup |
| Answer βNoβ at the prompt | Type n β exits 0 with a hint to run praisonai auth login |
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:Prefer stored credentials over env vars for shared machines
Prefer stored credentials over env vars for shared machines
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.Related
Setup Wizard
Interactive wizard for configuring LLM provider credentials
Run Command
Run agents from files or prompts
CLI Reference
Complete command tree and flag reference
Installer Internals
How the installer scripts work including post-install flow

