Skip to content
Configuration

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. Set VIBE_PROVIDER, VIBE_API_KEY, and VIBE_MODEL β€” do not set VIBE_API_URL.
  • Local providers (ollama, lmstudio, vllm) run on your machine. Set VIBE_PROVIDER and point VIBE_API_URL at 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 both VIBE_API_URL and VIBE_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.

The default 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"
If you set a custom 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:

ProviderHonors VIBE_API_URLSends Bearer authUse for
openaiNo (always OpenAI)YesOpenAI itself
vllmYesNoLocal, unauthenticated vLLM servers
openai-compatibleYesYesAuthenticated 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"
Validation: gollm checks your configuration when vibe starts. Hosted providers validate the API key format up front (e.g. Anthropic keys must start with 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=false

Choose spinner style (default: dots):

export VIBE_PROGRESS_STYLE=arrow  # Options: dots, line, circle, bounce, arrow, runes

Available Styles:

  • dots - β ‹ β ™ β Ή β Έ β Ό β ΄ β ¦ β § β ‡ ⠏
  • line - - \ | /
  • circle - ◐ β—“ β—‘ β—’
  • bounce - ⠁ β ‚ β „ β ‚
  • arrow - ← β†– ↑ β†— β†’ β†˜ ↓ ↙
  • runes - α›œ ᛃ α›‹ (Norse runes)

Streaming Output

Enable typewriter effect for command output (default: true):

export VIBE_STREAM_OUTPUT=false

Control streaming speed (default: 20ms):

export VIBE_STREAM_DELAY=10ms  # Faster
export VIBE_STREAM_DELAY=50ms  # Slower

Show/Hide Explanations

Control whether command explanations are displayed (default: true):

export VIBE_SHOW_EXPLANATION=false

Show/Hide Warnings

Control whether warnings are shown for dangerous commands (default: true):

export VIBE_SHOW_WARNINGS=false

Behavior Configuration

Interactive Mode

Require confirmation before inserting commands (default: false):

export VIBE_INTERACTIVE=true

When 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 history

Set maximum number of history entries (default: 100):

export VIBE_HISTORY_SIZE=200

Customize 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=false

Set cache lifetime (default: 24h):

export VIBE_CACHE_TTL=12h

Caching dramatically improves performance for repeated queries. Cached responses are 100-400x faster.

API Settings

Set request timeout (default: 30s):

export VIBE_TIMEOUT=60s

Set generation temperature (default: 0.2):

export VIBE_TEMPERATURE=0.3

Lower temperature = more deterministic, higher = more creative.

Set maximum response tokens (default: 1000):

export VIBE_MAX_TOKENS=1000

Advanced 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=true

Debug & 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=true

When VIBE_DEBUG_LOGS=true, vibe will log:

  • Raw LLM responses
  • Parsing attempts and failures
  • Which fallback layer succeeded
  • Extracted/cleaned JSON content

Configuration Reference

VariableDefaultDescription
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_URLhttp://localhost:11434/v1Endpoint 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_MODELllama3:8bModel to use. Set this for hosted providers β€” the default only suits Ollama.
VIBE_TEMPERATURE0.2Generation temperature (0.0-2.0)
VIBE_MAX_TOKENS1000Max response tokens
VIBE_TIMEOUT30sRequest timeout
Display Options
VIBE_SHOW_EXPLANATIONtrueShow command explanations
VIBE_SHOW_WARNINGStrueShow warnings for dangerous commands
VIBE_SHOW_PROGRESStrueShow progress spinner during generation
VIBE_PROGRESS_STYLEdotsSpinner style: dots, line, circle, bounce, arrow
VIBE_STREAM_OUTPUTtrueStream output with typewriter effect
VIBE_STREAM_DELAY20msDelay between streamed words
Behavior
VIBE_INTERACTIVEfalseConfirm before inserting command
VIBE_USE_STRUCTURED_OUTPUTtrueUse JSON schema for structured responses
VIBE_ENABLE_CACHEtrueEnable response caching
VIBE_CACHE_TTL24hCache lifetime
History
VIBE_ENABLE_HISTORYtrueEnable query history tracking
VIBE_HISTORY_SIZE100Maximum 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_RETRIES3Max retry attempts for failed parsing
VIBE_ENABLE_JSON_EXTRACTIONtrueExtract JSON from corrupted responses
VIBE_STRICT_VALIDATIONtrueValidate response structure
VIBE_SHOW_RETRY_STATUStrueShow retry progress during generation
Debugging
VIBE_DEBUG_LOGSfalseEnable 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., find without -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"