matrixcode 0.2.5

A smart code agent CLI with multi-model support, context compression, and task planning
Documentation
# =============================================================================
# MatrixCode Configuration
# =============================================================================

# -----------------------------------------------------------------------------
# Publish Settings (for release)
# -----------------------------------------------------------------------------

# NPM token for publishing (get from https://www.npmjs.com/settings/tokens)
NPM_TOKEN=

# Cargo token for publishing to crates.io (get from https://crates.io/me)
CARGO_TOKEN=

# -----------------------------------------------------------------------------
# Provider Settings
# -----------------------------------------------------------------------------

# Provider: "anthropic" or "openai"
PROVIDER=anthropic

# API Key (or use provider-specific: ANTHROPIC_API_KEY / OPENAI_API_KEY)
API_KEY=sk-ant-your-key-here

# Model name (main model for task execution)
# Anthropic: claude-sonnet-4-20250514, claude-opus-4-20250514, claude-3-5-haiku-20241022
# OpenAI: gpt-4o, gpt-4-turbo, gpt-3.5-turbo
MODEL_NAME=claude-sonnet-4-20250514

# Base URL (optional, for custom endpoints)
# Anthropic default: https://api.anthropic.com
# OpenAI default: https://api.openai.com/v1
BASE_URL=

# -----------------------------------------------------------------------------
# Multi-Model Configuration
# -----------------------------------------------------------------------------
# When MULTI_MODEL is enabled, different models can be used for different tasks.
# If not specified, all roles default to MODEL_NAME (main model).

# Enable multi-model mode (true/false)
# When true, creates separate providers for planning and compression
MULTI_MODEL=false

# Planning model - used for task decomposition and step planning
# Defaults to MODEL_NAME if not specified
PLAN_MODEL=

# Compression model - used for context summarization
# Recommended: claude-3-5-haiku (smaller, cheaper)
# Defaults to MODEL_NAME if not specified
COMPRESS_MODEL=

# Fast model - used for quick operations (classification, extraction)
# Recommended: claude-3-5-haiku
# Defaults to MODEL_NAME if not specified
FAST_MODEL=

# -----------------------------------------------------------------------------
# Memory Settings
# -----------------------------------------------------------------------------
# Memory system accumulates knowledge across sessions for context awareness.

# AI keyword extraction mode for memory matching:
# - auto (default): rule-based first, AI fallback when keywords are insufficient
# - always: always use AI for keyword extraction (more accurate but slower)
# - never: never use AI, only rule-based extraction (fastest, zero cost)
MEMORY_AI_KEYWORDS=auto

# -----------------------------------------------------------------------------
# Context & Compression Settings
# -----------------------------------------------------------------------------

# Compression threshold (0.0-1.0) - trigger compression when context reaches this ratio
# Default: 0.75 (compress when 75% full)
COMPRESSION_THRESHOLD=0.75

# Target ratio after compression (0.0-1.0) - keep this fraction of tokens
# Default: 0.4 (compress to 40% of original)
COMPRESSION_TARGET_RATIO=0.4

# Minimum messages to preserve during compression
# Default: 8 (always keep last 8 messages)
MIN_PRESERVE_MESSAGES=8

# Override context window size (tokens) - useful for proxy endpoints
CONTEXT_SIZE=

# Disable automatic context compression
NO_COMPRESSION=false

# -----------------------------------------------------------------------------
# Output Settings
# -----------------------------------------------------------------------------

# Enable Anthropic extended thinking (true/false)
THINK=true

# Maximum output tokens per response
MAX_TOKENS=16384

# Render output as Markdown in terminal (true/false)
# Auto-disabled if NO_COLOR is set or non-TTY
MARKDOWN=true

# -----------------------------------------------------------------------------
# Prompt Configuration
# -----------------------------------------------------------------------------

# Prompt profile: default, safe, fast, review
PROMPT_PROFILE=default

# -----------------------------------------------------------------------------
# Web Search (Anthropic only)
# -----------------------------------------------------------------------------

# Disable server-side web search
NO_WEB_SEARCH=false

# Maximum web searches per turn
WEB_SEARCH_MAX_USES=5

# -----------------------------------------------------------------------------
# Caching (Anthropic only)
# -----------------------------------------------------------------------------

# Disable prompt caching
NO_CACHING=false

# -----------------------------------------------------------------------------
# Skills
# -----------------------------------------------------------------------------

# Extra skills directories (colon-separated)
SKILLS_DIR=

# =============================================================================
# Example Configurations
# =============================================================================

# --- Single Model (default) ---
# PROVIDER=anthropic
# MODEL_NAME=claude-sonnet-4-20250514
# MULTI_MODEL=false

# --- Multi-Model with separate models ---
# PROVIDER=anthropic
# MODEL_NAME=claude-sonnet-4-20250514
# MULTI_MODEL=true
# PLAN_MODEL=claude-sonnet-4-20250514
# COMPRESS_MODEL=claude-3-5-haiku-20241022
# FAST_MODEL=claude-3-5-haiku-20241022

# --- Multi-Model, all using main model ---
# PROVIDER=anthropic
# MODEL_NAME=claude-sonnet-4-20250514
# MULTI_MODEL=true
# (PLAN_MODEL, COMPRESS_MODEL, FAST_MODEL will use MODEL_NAME)

# --- Only specify compress model ---
# PROVIDER=anthropic
# MODEL_NAME=claude-sonnet-4-20250514
# COMPRESS_MODEL=claude-3-5-haiku-20241022
# (others will use MODEL_NAME)

# --- OpenAI configuration ---
# PROVIDER=openai
# MODEL_NAME=gpt-4o
# API_KEY=sk-your-openai-key