Skip to main content
typemux-cc can be configured through environment variables. These can be set directly when running the binary, or persistently via the config file.

Core Configuration

TYPEMUX_CC_BACKEND

TYPEMUX_CC_BACKEND
string
default:"pyright"
The LSP backend to use for type-checking.Valid values:
  • pyright - Microsoft’s pyright type checker (default)
  • ty - Astral’s experimental type checker (by the creators of uv)
  • pyrefly - Meta’s experimental type checker
Example:
export TYPEMUX_CC_BACKEND="ty"
Make sure the corresponding backend binary is available in your PATH:
  • pyright: requires pyright-langserver command
  • ty: requires ty command
  • pyrefly: requires pyrefly command

Backend Pool Management

TYPEMUX_CC_MAX_BACKENDS

TYPEMUX_CC_MAX_BACKENDS
integer
default:"8"
Maximum number of concurrent backend processes that can run simultaneously.Each virtual environment gets its own backend process. When the pool reaches this limit, the least recently used (LRU) backend will be evicted when a new one is needed.Constraints:
  • Minimum value: 1
  • Recommended: 4-16 depending on available RAM
Example:
export TYPEMUX_CC_MAX_BACKENDS="16"
For monorepos with many projects, increase this value to avoid frequent backend restarts. Each backend consumes 100-500MB of RAM depending on project size.

TYPEMUX_CC_BACKEND_TTL

TYPEMUX_CC_BACKEND_TTL
integer
default:"1800"
Backend time-to-live in seconds. Idle backends are automatically evicted after this duration.Default: 1800 (30 minutes)Special value:
  • 0 - Disables TTL-based eviction (backends only evicted when pool is full)
Example:
# 1 hour TTL
export TYPEMUX_CC_BACKEND_TTL="3600"

# Disable TTL eviction
export TYPEMUX_CC_BACKEND_TTL="0"
TTL helps reclaim memory from idle backends. Set to 0 if you frequently switch between many projects and want to avoid re-initialization delays.

TYPEMUX_CC_WARMUP_TIMEOUT

TYPEMUX_CC_WARMUP_TIMEOUT
integer
default:"2"
Warmup timeout in seconds. After spawning, backends need time to build their cross-file index.During warmup, index-dependent requests (definition, references, implementation, typeDefinition) are queued. The backend transitions to “ready” when either:
  1. The backend sends a $/progress end notification (index build complete)
  2. This timeout expires (fail-open: queued requests are sent anyway)
Default: 2 (seconds)Special value:
  • 0 - Disables warmup entirely (all requests forwarded immediately)
Example:
# Wait up to 5 seconds for index build
export TYPEMUX_CC_WARMUP_TIMEOUT="5"

# Disable warmup (forward all requests immediately)
export TYPEMUX_CC_WARMUP_TIMEOUT="0"
Setting this to 0 may cause incomplete results for “find references” and “go to definition” requests immediately after backend spawn.

Logging Configuration

TYPEMUX_CC_LOG_FILE

TYPEMUX_CC_LOG_FILE
string
default:"(not set)"
Path to log file for persistent logging.Default behavior: Logs are written to stderr onlyWhen set: Logs are written to both stderr AND the specified fileExample:
export TYPEMUX_CC_LOG_FILE="/tmp/typemux-cc.log"
See Logging for monitoring and log analysis techniques.

RUST_LOG

RUST_LOG
string
default:"typemux_cc=debug"
Controls logging verbosity. Uses the tracing crate’s env filter syntax.Common values:
  • typemux_cc=info - High-level events (venv switches, warmup transitions)
  • typemux_cc=debug - Default. Includes venv search details and LSP method names
  • typemux_cc=trace - Very verbose (all search steps, detailed debugging)
Example:
# Minimal logging
export RUST_LOG="typemux_cc=info"

# Maximum verbosity
export RUST_LOG="typemux_cc=trace"
The log level affects all output (both stderr and file). Lower verbosity improves performance but provides less debugging information.

Setting Environment Variables

Method 1: Direct Export (Temporary)

export TYPEMUX_CC_BACKEND="ty"
export TYPEMUX_CC_LOG_FILE="/tmp/typemux-cc.log"
./target/release/typemux-cc

Method 2: Inline (Single Execution)

TYPEMUX_CC_BACKEND=ty TYPEMUX_CC_LOG_FILE=/tmp/typemux-cc.log ./target/release/typemux-cc

Method 3: Config File (Persistent)

For persistent configuration across Claude Code restarts, use the config file:
mkdir -p ~/.config/typemux-cc
cat > ~/.config/typemux-cc/config << 'EOF'
export TYPEMUX_CC_BACKEND="ty"
export TYPEMUX_CC_LOG_FILE="/tmp/typemux-cc.log"
export TYPEMUX_CC_MAX_BACKENDS="16"
export RUST_LOG="typemux_cc=debug"
EOF
See Config File for more details.

Precedence Rules

When multiple configuration methods are used:
  1. CLI flags (e.g., --backend ty) - Highest priority
  2. Environment variables - Middle priority
  3. Built-in defaults - Lowest priority
CLI flags like --backend, --max-backends, --backend-ttl, and --log-file override the corresponding environment variables.

Quick Reference Table

VariableTypeDefaultDescription
TYPEMUX_CC_BACKENDstringpyrightLSP backend to use (pyright, ty, pyrefly)
TYPEMUX_CC_MAX_BACKENDSinteger8Max concurrent backend processes (min: 1)
TYPEMUX_CC_BACKEND_TTLinteger1800Backend TTL in seconds (0 = disabled)
TYPEMUX_CC_WARMUP_TIMEOUTinteger2Warmup timeout in seconds (0 = disabled)
TYPEMUX_CC_LOG_FILEstring(not set)Log file path (stderr + file when set)
RUST_LOGstringtypemux_cc=debugLog level (info, debug, trace)
  • Config File - Persistent configuration for Claude Code plugin
  • Logging - Log monitoring and analysis techniques