67 lines
2.6 KiB
Plaintext
67 lines
2.6 KiB
Plaintext
# =============================================================================
|
||
# Claw Code — Environment Configuration
|
||
# =============================================================================
|
||
# Copy this file to .env and fill in your values.
|
||
# Minimum required: ANTHROPIC_API_KEY (cloud) or ANTHROPIC_BASE_URL (local).
|
||
# =============================================================================
|
||
|
||
# --- API Configuration (pick one mode) ---------------------------------------
|
||
|
||
# Mode A: Anthropic API (cloud)
|
||
#ANTHROPIC_API_KEY=${YOUR_API_KEY}
|
||
#ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
|
||
|
||
# Mode B: Local LLM via OpenAI-compatible endpoint (LM Studio, Ollama, etc.)
|
||
# OPENAI_BASE_URL=http://127.0.0.1:1234
|
||
# OPENAI_API_KEY=dummy
|
||
|
||
# Model override (prefix with "openai/" to force OpenAI adapter)
|
||
# ANTHROPIC_MODEL=claude-sonnet-4-20250514
|
||
|
||
# Sampling temperature (0.0–2.0). Overridden by --temperature flag and /temperature.
|
||
# CLAW_TEMPERATURE=0.7
|
||
|
||
# --- Paths -------------------------------------------------------------------
|
||
# Custom config directory (default: ~/.claw or ~/.config/claw)
|
||
# CLAW_CONFIG_HOME=/path/to/.claw
|
||
|
||
# Claude Code config directory (for compatibility)
|
||
# CLAUDE_CONFIG_DIR=/path/to/.claude
|
||
|
||
# --- Runtime -----------------------------------------------------------------
|
||
# Workspace policy: "allow" to skip confirmation prompts
|
||
# CLAW_WORKSPACE_POLICY=allow
|
||
|
||
# --- Compression / Context Budget --------------------------------------------
|
||
# Minimum tool result bytes before summarization kicks in (default: 500)
|
||
# CLAW_TOOLRESULT_MIN_BYTES=500
|
||
|
||
# Number of recent messages to preserve verbatim (not compressed) (default: 6)
|
||
# CLAW_CONTEXT_PRESERVE_MSGS=6
|
||
|
||
# WebSearch result TTL in seconds before it gets summarized (default: 15)
|
||
# CLAW_WEBSEARCH_TTL_SECS=15
|
||
|
||
# WebFetch result TTL in seconds before it gets summarized (default: 30)
|
||
# CLAW_WEBFETCH_TTL_SECS=30
|
||
|
||
# Recent messages to keep during compaction (default: 4)
|
||
# CLAW_COMPACT_PRESERVE_MSGS=4
|
||
|
||
# Token budget for recent messages during compaction (default: 2000)
|
||
# CLAW_COMPACT_PRESERVE_TOKENS=2000
|
||
|
||
# Max estimated tokens before forced compaction (default: 10000)
|
||
# CLAW_COMPACT_MAX_TOKENS=10000
|
||
|
||
# Number of full turns to preserve during compaction (default: 0)
|
||
# CLAW_COMPACT_PRESERVE_TURNS=0
|
||
|
||
# Summary truncation limits (default: max_chars=1200, max_lines=24, max_line_chars=160)
|
||
# CLAW_SUMMARY_MAX_CHARS=1200
|
||
# CLAW_SUMMARY_MAX_LINES=24
|
||
# CLAW_SUMMARY_MAX_LINE_CHARS=160
|
||
|
||
# Anti-thrash ratio — skip compaction if savings ratio is below this (0.0–1.0, default: 0.10)
|
||
# CLAW_COMPACT_ANTITHRASH_RATIO=0.10
|