Skip to main content
praisonai auth stores provider API keys locally so praisonai run works without exporting env vars every session.

Quick Start

# Interactive — key is hidden at the prompt
praisonai auth login openai

# Then run immediately
praisonai run "What is 2+2?"

Commands

CommandDescription
auth login <provider>Store credentials (prompts if --key omitted)
auth listList stored providers (keys redacted)
auth status [provider]Check format; add --validate for live OpenAI check
auth logout <provider>Remove one provider
auth logout --allRemove all stored credentials

Login

praisonai auth login openai
praisonai auth login openai --key sk-...
echo "sk-..." | praisonai auth login openai --key-stdin

# Optional extras
praisonai auth login openai --key sk-... --base-url https://api.openai.com/v1 --model gpt-4o
praisonai auth login openai --skip-validation

List & status

praisonai auth list
praisonai auth status
praisonai auth status openai --validate

Logout

praisonai auth logout openai
praisonai auth logout --all

Storage & Security

ItemValue
File~/.praison/credentials.json
Permissions0o600 (auto-corrected on read if loose)
WritesAtomic via temp file + os.replace
DisplayKeys redacted as sk-1***efgh everywhere except the file

Supported Providers

ProviderKey prefixEnv var injected at run time
openaisk-OPENAI_API_KEY (+ OPENAI_BASE_URL if set)
anthropicsk-ant-ANTHROPIC_API_KEY
google / geminiAIGOOGLE_API_KEY / GEMINI_API_KEY
tavilytvly-TAVILY_API_KEY
groqgsk_GROQ_API_KEY
cohere(none)COHERE_API_KEY
Unknown providers accept keys with length ≥ 10.

How Run Uses Credentials

praisonai run resolves credentials in this order:
  1. Environment variables (OPENAI_API_KEY, ANTHROPIC_API_KEY, …)
  2. Stored credentials (injected into os.environ before the run)
  3. LLM endpoint resolution via resolve_llm_endpoint_with_credentials
If nothing is found, non-interactive mode exits with:
Error: No API key configured. Run: praisonai auth login
See Run for the interactive wizard path.

Run

Preflight credential check before execution

Config

Default model via [llm] in config.toml

Setup

First-run setup wizard