Login to a Provider

Run the interactive login command to authenticate with your preferred LLM provider:

openanalyst login

This opens a provider picker. Select your provider, complete the OAuth flow in your browser, and credentials are saved automatically to ~/.openanalyst/credentials.json.

Direct Provider Login
For Claude, Codex, and Gemini you can login directly with your Anthropic, OpenAI, or Google account — no API key needed.

Alternatively, set API keys directly:

# Edit ~/.openanalyst/.env
ANTHROPIC_API_KEY=sk-ant-...
OPENAI_API_KEY=sk-...
GEMINI_API_KEY=AIza...

Launch the TUI

Start OpenAnalyst in its default full-screen terminal UI:

openanalyst

You'll see the startup banner, account status, and an empty chat ready for input.

Tip
Use --no-tui for a classic REPL experience: openanalyst --no-tui

Ask a Question

Type a natural language prompt and press Enter:

explain the architecture of this codebase

The agent reads your project files, understands the structure, and streams a response with syntax-highlighted code blocks.

Use Slash Commands

Type / to see autocomplete suggestions. Try these:

# See session status and token usage
/status

# Switch to a different model mid-conversation
/model gpt-4o

# Generate a git commit message from staged changes
/commit

# Run a deep bug analysis
/bughunter

Try One-Shot Mode

For quick tasks, pass the prompt directly:

# One-shot prompt (no interactive session)
openanalyst "summarize the README"

# Use a specific model
openanalyst --model gemini-2.5-pro "review this code for bugs"

# Pipe input
cat error.log | openanalyst "explain these errors"

Usage Modes

ModeCommandDescription
TUI (default) openanalyst Full-screen terminal UI with sidebar, chat panel, status bar
REPL openanalyst --no-tui Classic line-by-line REPL with streaming output
One-shot openanalyst "prompt" Single prompt → response → exit
Headless agent openanalyst-agent Autonomous agent runner for CI/scripts

Common Flags

FlagDescription
--model <name>Use a specific model (e.g., opus, gpt-4o, gemini-2.5-pro)
--no-tuiDisable TUI, use REPL mode
--permission-mode <mode>Set permission level: read-only, workspace-write, danger-full-access
--resumeResume the last conversation session
--versionPrint version and exit