Skip to main content
typemux-cc supports three Python type-checking backends. You can switch between them using environment variables or CLI flags.

Supported Backends

pyright

Default - Microsoft’s fast type checkerStatus: ✅ Stable

ty

Experimental - By the creators of uvStatus: 🧪 Verified

pyrefly

Experimental - Meta’s type checkerStatus: 🧪 Verified

Backend Commands

Each backend has a specific command and arguments used to spawn the LSP server:

Installation

You must install at least one backend before using typemux-cc.

Selection Methods

Set TYPEMUX_CC_BACKEND in your config file for persistent backend selection.
1

Create config file

2

Choose your backend

Edit ~/.config/typemux-cc/config and set one of:
3

Restart Claude Code

Changes take effect on next Claude Code launch.

Method 2: CLI Flag (Manual Execution)

When running typemux-cc manually (outside Claude Code plugin):

Method 3: One-time Environment Variable

How Backend Selection Works

Backend selection is parsed at startup from CLI args or environment:
The backend type is stored in proxy state and used for all spawned processes:
All backends in the pool use the same backend type. You cannot run pyright and ty simultaneously in the same proxy instance.

Backend-Specific Features

pyright

Features

  • Full LSP support (hover, completion, references, rename, etc.)
  • Fast incremental checking
  • Extensive type inference
  • pyrightconfig.json / pyproject.toml configuration
  • Workspace symbol search
Configuration: pyright reads pyrightconfig.json or [tool.pyright] in pyproject.toml from the workspace root.

ty

Features

  • Fast type checking (built in Rust)
  • Experimental LSP support
  • Limited hover/completion (as of early 2025)
  • Good diagnostic performance
Limitations:
  • Some LSP features incomplete (references, rename)
  • Configuration options limited compared to pyright
Known Issues:
  • Editable installs (setuptools) not supported by any LSP backend (ty#475)
  • Use hatchling/flit build backends instead

pyrefly

Features

  • Meta’s internal type checker
  • Experimental LSP support
  • Fast performance on large codebases
Limitations:
  • Documentation scarce
  • Limited community support
  • May have incomplete LSP features

Environment Variables Applied to Backends

All backends receive these environment variables when spawned:
Currently all backends use the same environment setup. The apply_env method exists as an extension point for future backend-specific customization.

Switching Backends

1

Update config

2

Restart Claude Code

Backend selection happens at startup. Restart to apply changes.
3

Verify

You should see:

Troubleshooting

Backend command not found

Backend fails to spawn

Check logs for spawn errors:
Common causes:
  • Backend not installed
  • Backend binary not executable
  • Missing dependencies (e.g., Node.js for pyright npm install)

Wrong backend running

Verify config:
Check startup logs:

Performance Comparison

Recommendation: Stick with pyright unless you have specific needs. It has the most complete LSP implementation and is battle-tested in production.

Summary

Backend selection checklist

  1. Install your preferred backend (npm install -g pyright recommended)
  2. Set TYPEMUX_CC_BACKEND in ~/.config/typemux-cc/config
  3. Restart Claude Code
  4. Verify via logs: tail -f /tmp/typemux-cc.log