docs(coding-agent): added LLM provider env vars and expanded CLI help documentation

- Added comprehensive environment variables documentation including API keys for 11 new LLM providers (Groq, Cerebras, xAI, OpenRouter, Mistral, z.ai, MiniMax, OpenCode, Cursor, Vercel AI Gateway, Perplexity) and cloud provider configuration.
- Expanded CLI help text with detailed API keys section documenting all supported LLM providers, cloud providers, search services, and model override configuration variables.
- Fixed redundant fallback check in porting guide example by removing duplicate `Bun.env.HOME` reference.
This commit is contained in:
can1357
2026-02-05 04:51:42 +01:00
parent 89e6479661
commit a1a4824cd7
4 changed files with 55 additions and 1 deletions
+1 -1
View File
@@ -82,7 +82,7 @@ We run on Bun. Replace Node APIs only when Bun provides a better alternative.
```typescript
// BROKEN: env vars may be undefined, "~" is not expanded
const home = Bun.env.HOME || Bun.env.HOME || "~";
const home = Bun.env.HOME || "~";
const tmp = Bun.env.TMPDIR || "/tmp";
```
+5
View File
@@ -1,8 +1,13 @@
# Changelog
## [Unreleased]
### Added
- Added documentation for additional LLM provider API keys (Groq, Cerebras, xAI, OpenRouter, Mistral, z.ai, MiniMax, OpenCode, Cursor, Vercel AI Gateway) in environment variables reference
- Added documentation for cloud provider configuration (AWS Bedrock, Google Vertex AI) in environment variables reference
- Added documentation for search provider API keys (Perplexity, Anthropic Search) in environment variables reference
- Added documentation for model override environment variables (`PI_SMOL_MODEL`, `PI_SLOW_MODEL`, `PI_PLAN_MODEL`) in CLI help text
- Added comprehensive environment variables reference documentation at `docs/environment-variables.md` covering API keys, configuration, debugging, and testing variables
- Added theme system with 44 customizable color tokens, two built-in themes (dark/light), and auto-detection based on terminal background
- Added `/theme` command to interactively select and switch between themes
@@ -16,6 +16,17 @@ This document lists all environment variables used by the coding agent.
| `GH_TOKEN` | GitHub CLI token (fallback for Copilot) | - |
| `GITHUB_TOKEN` | GitHub token (fallback for Copilot and API access) | - |
| `EXA_API_KEY` | Exa search API key | - |
| `GROQ_API_KEY` | Groq API key for Llama and other models | - |
| `CEREBRAS_API_KEY` | Cerebras API key | - |
| `XAI_API_KEY` | xAI API key for Grok models | - |
| `OPENROUTER_API_KEY` | OpenRouter aggregated models API key | - |
| `MISTRAL_API_KEY` | Mistral AI API key | - |
| `ZAI_API_KEY` | z.ai API key (ZhipuAI/GLM models) | - |
| `MINIMAX_API_KEY` | MiniMax API key | - |
| `OPENCODE_API_KEY` | OpenCode API key | - |
| `CURSOR_ACCESS_TOKEN` | Cursor AI access token | - |
| `AI_GATEWAY_API_KEY` | Vercel AI Gateway API key | - |
| `PERPLEXITY_API_KEY` | Perplexity search API key | - |
### Provider-Specific Configuration
+38
View File
@@ -287,7 +287,45 @@ ${chalk.bold("Environment Variables:")}
${chalk.dim("# Configuration")}
PI_CODING_AGENT_DIR - Session storage directory (default: ~/${CONFIG_DIR_NAME}/agent)
${chalk.bold("API Keys (Environment Variables):")}
${chalk.dim("# Core Providers")}
ANTHROPIC_API_KEY - Anthropic Claude models
ANTHROPIC_OAUTH_TOKEN - Anthropic OAuth (takes precedence over API key)
OPENAI_API_KEY - OpenAI GPT models
GOOGLE_API_KEY - Google Gemini models
GITHUB_TOKEN - GitHub Copilot (or GH_TOKEN, COPILOT_GITHUB_TOKEN)
${chalk.dim("# Additional LLM Providers")}
AZURE_OPENAI_API_KEY - Azure OpenAI models
GROQ_API_KEY - Groq models
CEREBRAS_API_KEY - Cerebras models
XAI_API_KEY - xAI Grok models
OPENROUTER_API_KEY - OpenRouter aggregated models
MISTRAL_API_KEY - Mistral models
ZAI_API_KEY - z.ai models (ZhipuAI/GLM)
MINIMAX_API_KEY - MiniMax models
OPENCODE_API_KEY - OpenCode models
CURSOR_ACCESS_TOKEN - Cursor AI models
AI_GATEWAY_API_KEY - Vercel AI Gateway
${chalk.dim("# Cloud Providers")}
AWS_PROFILE - AWS Bedrock (or AWS_ACCESS_KEY_ID + AWS_SECRET_ACCESS_KEY)
GOOGLE_CLOUD_PROJECT - Google Vertex AI (requires GOOGLE_CLOUD_LOCATION)
GOOGLE_APPLICATION_CREDENTIALS - Service account for Vertex AI
${chalk.dim("# Search & Tools")}
EXA_API_KEY - Exa web search
PERPLEXITY_API_KEY - Perplexity web search
ANTHROPIC_SEARCH_API_KEY - Anthropic search provider
${chalk.dim("# Configuration")}
PI_CODING_AGENT_DIR - Session storage directory (default: ~/${CONFIG_DIR_NAME}/agent)
PI_SMOL_MODEL - Override smol/fast model (see --smol)
PI_SLOW_MODEL - Override slow/reasoning model (see --slow)
PI_PLAN_MODEL - Override planning model (see --plan)
For complete environment variable reference, see:
${chalk.dim("docs/environment-variables.md")}
${chalk.bold("Available Tools (all enabled by default):")}
read - Read file contents
bash - Execute bash commands