🔧

Ripperdoc

Environment Variables

Complete list of environment variables

Ripperdoc can be configured through environment variables. For model and credential settings, Ripperdoc only reads RIPPERDOC_* variables (provider-specific env vars like OPENAI_API_KEY are ignored). If you already set api_key in your config, you can skip RIPPERDOC_API_KEY.

RIPPERDOC_ Model Overrides

Any RIPPERDOC_* variable overrides the corresponding config field in memory for the current session (no changes are written to disk). If no profile exists, set at least one of RIPPERDOC_MODEL, RIPPERDOC_PROTOCOL, or RIPPERDOC_BASE_URL so Ripperdoc can construct a profile. When RIPPERDOC_PROTOCOL is not set, it is inferred from the base URL and/or model name.

VariableDescription
RIPPERDOC_BASE_URLAPI base URL
RIPPERDOC_API_KEYAPI key for the base URL
RIPPERDOC_AUTH_TOKENBearer token (alternative to API key)
RIPPERDOC_MODELModel name (main pointer)
RIPPERDOC_SMALL_FAST_MODELQuick model name (quick pointer)
RIPPERDOC_PROTOCOLProvider override (anthropic, openai_compatible, gemini)

Example:

RIPPERDOC_BASE_URL=https://api.example.com/v1
RIPPERDOC_API_KEY=YOUR_API_KEY
RIPPERDOC_MODEL=gpt-4o-mini
RIPPERDOC_PROTOCOL=openai_compatible

Behavior Settings

Timeouts and Retries

VariableDescriptionDefault
RIPPERDOC_API_TIMEOUTAPI request timeout (seconds)120
RIPPERDOC_MAX_RETRIESMaximum API retry attempts10
RIPPERDOC_TOOL_TIMEOUTPer-tool execution timeout (seconds)300
RIPPERDOC_CONCURRENT_TOOL_TIMEOUTTotal timeout for concurrent tool batches (seconds)600

Context and Memory

VariableDescriptionDefault
RIPPERDOC_CONTEXT_TOKENSContext window size limitModel default
RIPPERDOC_AUTO_COMPACTEnable automatic compactiontrue
RIPPERDOC_MAX_QUERY_ITERATIONSMaximum query loop iterations1024
RIPPERDOC_MESSAGE_WARNING_THRESHOLDMessage count for warning500
RIPPERDOC_MESSAGE_CRITICAL_THRESHOLDMessage count for critical warning1000
RIPPERDOC_RESUME_REPLAY_MAX_MESSAGESMax messages to replay on resume (-1 for all, 0 to skip)120

File Operations

VariableDescriptionDefault
RIPPERDOC_FILE_CACHE_MAX_ENTRIESMax cached file entries500
RIPPERDOC_FILE_CACHE_MAX_MEMORY_MBMax file cache memory (MB)50
RIPPERDOC_MAX_READ_FILE_SIZE_BYTESMax file size to read (bytes)262144
RIPPERDOC_MAX_READ_LINESMax lines to read without limit2000

Bash Tool

VariableDescriptionDefault
RIPPERDOC_BASH_TIMEOUT_MSDefault bash timeout (ms)120000
RIPPERDOC_BASH_MAX_TIMEOUT_MSMaximum bash timeout (ms)600000
RIPPERDOC_BASH_MAX_OUTPUT_LENGTHMax output characters30000
RIPPERDOC_BASH_TASK_TTL_SECBackground task TTL (seconds)3600

Shell Configuration

VariableDescriptionDefault
RIPPERDOC_SHELLPreferred shellAuto-detected
RIPPERDOC_SHELL_PATHPath to shell executableAuto-detected

LSP Settings

VariableDescriptionDefault
RIPPERDOC_LSP_TIMEOUTLSP request timeout (seconds)20

MCP Settings

VariableDescriptionDefault
RIPPERDOC_MCP_MAX_OUTPUT_TOKENSMax MCP output tokens50000
RIPPERDOC_MCP_WARNING_TOKENSMCP warning threshold40000

Agent Settings

VariableDescriptionDefault
RIPPERDOC_AGENT_RUN_TTL_SECAgent run time-to-live (seconds)3600

Logging

VariableDescriptionDefault
RIPPERDOC_LOG_LEVELLog level (DEBUG, INFO, WARNING, ERROR)WARNING

Development

VariableDescriptionDefault
RIPPERDOC_DEBUGEnable debug modefalse
RIPPERDOC_DEV_MODEEnable development modefalse

Example .env File

# Model overrides (env-only)
RIPPERDOC_BASE_URL=https://api.example.com/v1
RIPPERDOC_API_KEY=YOUR_API_KEY
RIPPERDOC_MODEL=gpt-4o-mini
RIPPERDOC_PROTOCOL=openai_compatible

# Timeouts
RIPPERDOC_API_TIMEOUT=180
RIPPERDOC_MAX_RETRIES=5

# Context
RIPPERDOC_CONTEXT_TOKENS=100000
RIPPERDOC_AUTO_COMPACT=true

# Bash settings
RIPPERDOC_BASH_TIMEOUT_MS=300000
RIPPERDOC_BASH_TASK_TTL_SEC=7200

# File settings
RIPPERDOC_MAX_READ_FILE_SIZE_BYTES=1048576
RIPPERDOC_MAX_READ_LINES=4000

# LSP settings
RIPPERDOC_LSP_TIMEOUT=30

# Logging
RIPPERDOC_LOG_LEVEL=WARNING

Loading Environment Variables

From Shell

export RIPPERDOC_BASE_URL="https://api.example.com/v1"
export RIPPERDOC_API_KEY="YOUR_API_KEY"
export RIPPERDOC_MODEL="gpt-4o-mini"
export RIPPERDOC_PROTOCOL="openai_compatible"
ripperdoc

From .env File

Create a .env file in your project root:

RIPPERDOC_BASE_URL=https://api.example.com/v1
RIPPERDOC_API_KEY=YOUR_API_KEY
RIPPERDOC_MODEL=gpt-4o-mini
RIPPERDOC_PROTOCOL=openai_compatible

Then use a tool like direnv or source it manually:

source .env
ripperdoc

In Python SDK

import os
os.environ["RIPPERDOC_BASE_URL"] = "https://api.example.com/v1"
os.environ["RIPPERDOC_API_KEY"] = "YOUR_API_KEY"
os.environ["RIPPERDOC_MODEL"] = "gpt-4o-mini"
os.environ["RIPPERDOC_PROTOCOL"] = "openai_compatible"

from ripperdoc.sdk import query

Security Notes

  1. Never commit API keys to version control
  2. Use .env.local for local overrides (add to .gitignore)
  3. Rotate keys if accidentally exposed
  4. Use environment-specific keys for different environments