Configuration
All configuration is done through environment variables in your ~/.zshrc. All settings are optional and have sensible defaults.
Provider Configuration
vibe-zsh uses gollm to talk to each provider natively. There are three kinds of provider:
- Hosted providers (
openai,anthropic,groq,openrouter,deepseek,google-openai,mistral,cohere) have a fixed endpoint built in. SetVIBE_PROVIDER,VIBE_API_KEY, andVIBE_MODELβ do not setVIBE_API_URL. - Local providers (
ollama,lmstudio,vllm) run on your machine. SetVIBE_PROVIDERand pointVIBE_API_URLat the local server; no API key needed. - Custom OpenAI-compatible gateways (
openai-compatible) are OpenAI-compatible endpoints that you host or proxy yourself and that require a Bearer API key. Set bothVIBE_API_URLandVIBE_API_KEY. See Custom OpenAI-compatible gateways.
Select a provider with VIBE_PROVIDER. If you don’t set it, vibe infers the
provider from VIBE_API_URL (mainly to keep older configs working). Setting
VIBE_PROVIDER explicitly is the recommended approach.
VIBE_API_URL is ignored by hosted providers. The openai, anthropic,
groq, etc. providers each have a fixed, built-in endpoint. The openai
provider always targets api.openai.com and ignores VIBE_API_URL.
To point vibe at a custom OpenAI-compatible gateway that needs a Bearer API
key, use the dedicated openai-compatible provider, which honors both
VIBE_API_URL and VIBE_API_KEY. If you set a custom VIBE_API_URL without
VIBE_PROVIDER, vibe infers openai-compatible automatically. See
Custom OpenAI-compatible gateways.
VIBE_MODEL is llama3:8b (chosen for the default Ollama setup).
Always set VIBE_MODEL when you use a hosted provider, or requests will ask for
a model that doesn’t exist there.Ollama (local) - Default
export VIBE_PROVIDER="ollama"
export VIBE_API_URL="http://localhost:11434/v1"
export VIBE_MODEL="llama3:8b"This is the default configuration. If you have Ollama running locally, vibe will work out of the box.
OpenAI
export VIBE_PROVIDER="openai"
export VIBE_API_KEY="sk-..."
export VIBE_MODEL="gpt-4o"
# No VIBE_API_URL needed β the openai provider always targets api.openai.com.Anthropic
export VIBE_PROVIDER="anthropic"
export VIBE_API_KEY="sk-ant-..."
export VIBE_MODEL="claude-3-5-sonnet-20241022"Groq
export VIBE_PROVIDER="groq"
export VIBE_API_KEY="gsk_..."
export VIBE_MODEL="llama-3.1-70b-versatile"OpenRouter
export VIBE_PROVIDER="openrouter"
export VIBE_API_KEY="sk-or-..."
export VIBE_MODEL="anthropic/claude-3.5-sonnet"LM Studio (local)
export VIBE_PROVIDER="lmstudio"
export VIBE_API_URL="http://localhost:1234/v1"
export VIBE_MODEL="local-model"Custom OpenAI-compatible gateways
Many services (self-hosted gateways, proxies, alternative inference hosts) expose
an OpenAI-compatible /v1 API but require a Bearer API key. The openai
provider cannot reach these β it always points at api.openai.com and ignores
VIBE_API_URL. The vllm provider honors a custom endpoint but sends no
Authorization header, so authenticated gateways reject it with 401.
For these gateways, use the dedicated openai-compatible provider. It honors
VIBE_API_URL and sends VIBE_API_KEY as a Bearer token:
export VIBE_PROVIDER="openai-compatible" # custom endpoint + Bearer auth
export VIBE_API_URL="https://your-gateway.example.com/v1"
export VIBE_API_KEY="sk-..." # sent as: Authorization: Bearer sk-...
export VIBE_MODEL="your-model-name"VIBE_API_URL (a host vibe doesn’t recognize) and leave
VIBE_PROVIDER unset, vibe automatically infers openai-compatible. Setting it
explicitly is still recommended.Provider cheat sheet for OpenAI-compatible endpoints:
| Provider | Honors VIBE_API_URL | Sends Bearer auth | Use for |
|---|---|---|---|
openai | No (always OpenAI) | Yes | OpenAI itself |
vllm | Yes | No | Local, unauthenticated vLLM servers |
openai-compatible | Yes | Yes | Authenticated custom gateways/proxies |
Worked example:
# WRONG β vllm reaches the gateway but is rejected with 401 (no auth header)
export VIBE_PROVIDER="vllm"
export VIBE_API_URL="https://api.ai.rwx.dev/v1"
export VIBE_API_KEY="sk-..."
export VIBE_MODEL="some-model"
# CORRECT β openai-compatible reaches the gateway AND authenticates
export VIBE_PROVIDER="openai-compatible"
export VIBE_API_URL="https://api.ai.rwx.dev/v1"
export VIBE_API_KEY="sk-..."
export VIBE_MODEL="some-model"sk-ant-), and local providers must already be running and reachable.Display Configuration
Progress Indicators
Control the progress spinner shown during command generation (default: true):
export VIBE_SHOW_PROGRESS=falseChoose spinner style (default: dots):
export VIBE_PROGRESS_STYLE=arrow # Options: dots, line, circle, bounce, arrow, runesAvailable Styles:
dots- β β β Ή β Έ β Ό β ΄ β ¦ β § β β line- - \ | /circle- β β β βbounce- β β β β arrow- β β β β β β β βrunes- α α α (Norse runes)
Streaming Output
Enable typewriter effect for command output (default: true):
export VIBE_STREAM_OUTPUT=falseControl streaming speed (default: 20ms):
export VIBE_STREAM_DELAY=10ms # Faster
export VIBE_STREAM_DELAY=50ms # SlowerShow/Hide Explanations
Control whether command explanations are displayed (default: true):
export VIBE_SHOW_EXPLANATION=falseShow/Hide Warnings
Control whether warnings are shown for dangerous commands (default: true):
export VIBE_SHOW_WARNINGS=falseBehavior Configuration
Interactive Mode
Require confirmation before inserting commands (default: false):
export VIBE_INTERACTIVE=trueWhen enabled, vibe will show the command and ask for confirmation before inserting it into your prompt.
Query History
Control query history tracking (default: true):
export VIBE_ENABLE_HISTORY=false # Disable historySet maximum number of history entries (default: 100):
export VIBE_HISTORY_SIZE=200Customize the history keybindings:
export VIBE_HISTORY_KEY="^R" # Use Ctrl+R for history menu (default: ^Xh)
export VIBE_REGENERATE_KEY="^[r" # Use Alt+R for quick regenerate (default: ^Xg)Note: Avoid using ^H (Ctrl+H) as it conflicts with Backspace.
Performance Configuration
Cache Settings
Enable/disable response caching (default: true):
export VIBE_ENABLE_CACHE=falseSet cache lifetime (default: 24h):
export VIBE_CACHE_TTL=12hCaching dramatically improves performance for repeated queries. Cached responses are 100-400x faster.
API Settings
Set request timeout (default: 30s):
export VIBE_TIMEOUT=60sSet generation temperature (default: 0.2):
export VIBE_TEMPERATURE=0.3Lower temperature = more deterministic, higher = more creative.
Set maximum response tokens (default: 1000):
export VIBE_MAX_TOKENS=1000Advanced Configuration
Parsing & Reliability
Control how vibe handles LLM responses (defaults are recommended):
# Max retry attempts for failed parsing (default: 3)
export VIBE_MAX_RETRIES=5
# Extract JSON from corrupted responses (default: true)
export VIBE_ENABLE_JSON_EXTRACTION=true
# Validate response structure (default: true)
export VIBE_STRICT_VALIDATION=true
# Use JSON schema for structured responses (default: true)
export VIBE_USE_STRUCTURED_OUTPUT=trueDebug & Troubleshooting
Enable detailed logging for debugging parsing issues:
# Enable debug logging (default: false)
export VIBE_DEBUG_LOGS=true
# Show retry progress during generation (default: true)
export VIBE_SHOW_RETRY_STATUS=trueWhen VIBE_DEBUG_LOGS=true, vibe will log:
- Raw LLM responses
- Parsing attempts and failures
- Which fallback layer succeeded
- Extracted/cleaned JSON content
Configuration Reference
| Variable | Default | Description |
|---|---|---|
| API Configuration | ||
VIBE_PROVIDER | (inferred from VIBE_API_URL) | LLM provider. Hosted: openai, anthropic, groq, openrouter, deepseek, google-openai, mistral, cohere. Local: ollama, lmstudio, vllm. Custom gateway: openai-compatible. Recommended to set explicitly. |
VIBE_API_URL | http://localhost:11434/v1 | Endpoint URL. Used by local providers and openai-compatible. Hosted providers ignore this and use their fixed endpoints. |
VIBE_API_KEY | "" | API key. Required for hosted providers and openai-compatible; ignored by local providers. |
VIBE_MODEL | llama3:8b | Model to use. Set this for hosted providers β the default only suits Ollama. |
VIBE_TEMPERATURE | 0.2 | Generation temperature (0.0-2.0) |
VIBE_MAX_TOKENS | 1000 | Max response tokens |
VIBE_TIMEOUT | 30s | Request timeout |
| Display Options | ||
VIBE_SHOW_EXPLANATION | true | Show command explanations |
VIBE_SHOW_WARNINGS | true | Show warnings for dangerous commands |
VIBE_SHOW_PROGRESS | true | Show progress spinner during generation |
VIBE_PROGRESS_STYLE | dots | Spinner style: dots, line, circle, bounce, arrow |
VIBE_STREAM_OUTPUT | true | Stream output with typewriter effect |
VIBE_STREAM_DELAY | 20ms | Delay between streamed words |
| Behavior | ||
VIBE_INTERACTIVE | false | Confirm before inserting command |
VIBE_USE_STRUCTURED_OUTPUT | true | Use JSON schema for structured responses |
VIBE_ENABLE_CACHE | true | Enable response caching |
VIBE_CACHE_TTL | 24h | Cache lifetime |
| History | ||
VIBE_ENABLE_HISTORY | true | Enable query history tracking |
VIBE_HISTORY_SIZE | 100 | Maximum number of history entries |
VIBE_HISTORY_KEY | ^Xh (Ctrl+X H) | Keybinding for history menu |
VIBE_REGENERATE_KEY | ^Xg (Ctrl+X G) | Keybinding to regenerate last command |
| Parsing & Retry | ||
VIBE_MAX_RETRIES | 3 | Max retry attempts for failed parsing |
VIBE_ENABLE_JSON_EXTRACTION | true | Extract JSON from corrupted responses |
VIBE_STRICT_VALIDATION | true | Validate response structure |
VIBE_SHOW_RETRY_STATUS | true | Show retry progress during generation |
| Debugging | ||
VIBE_DEBUG_LOGS | false | Enable debug logging for troubleshooting |
OS-Aware Command Generation
vibe automatically detects your operating system and shell to generate commands that work on YOUR system:
- macOS: Uses BSD utilities (e.g.,
findwithout-printf,sed -i '') - Linux: Uses GNU utilities (e.g.,
find -printf,sed -i) - Shell-specific: Generates syntax appropriate for zsh, bash, etc.
This detection happens automatically - no configuration needed! Commands are tailored to your environment.
Example Configuration
Here’s a complete example configuration in your ~/.zshrc:
# vibe configuration
export VIBE_PROVIDER="openai"
export VIBE_API_KEY="sk-..."
export VIBE_MODEL="gpt-4o"
export VIBE_TEMPERATURE=0.2
export VIBE_SHOW_EXPLANATION=true
export VIBE_SHOW_PROGRESS=true
export VIBE_PROGRESS_STYLE=dots
export VIBE_STREAM_OUTPUT=true
export VIBE_STREAM_DELAY=20ms
export VIBE_INTERACTIVE=false
export VIBE_ENABLE_CACHE=true
export VIBE_CACHE_TTL=24h
export VIBE_ENABLE_HISTORY=true
export VIBE_HISTORY_SIZE=100
export VIBE_HISTORY_KEY="^Xh"
export VIBE_REGENERATE_KEY="^Xg"