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

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:
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

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:
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

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:
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

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:
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

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:
See Logging for monitoring and log analysis techniques.

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:
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)

Method 2: Inline (Single Execution)

Method 3: Config File (Persistent)

For persistent configuration across Claude Code restarts, use the config file:
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

  • Config File - Persistent configuration for Claude Code plugin
  • Logging - Log monitoring and analysis techniques