Skip to main content

Module config

Module config 

Source
Expand description

Configuration loading for matrixcode.

Variable names are aligned with Claude Code for consistency:

  • ANTHROPIC_AUTH_TOKEN (API key)
  • ANTHROPIC_BASE_URL
  • ANTHROPIC_MODEL
  • ANTHROPIC_DEFAULT_SONNET_MODEL
  • ANTHROPIC_DEFAULT_HAIKU_MODEL (compress model)
  • ANTHROPIC_REASONING_MODEL (plan model)

Priority:

  1. CLI arguments (highest priority)
  2. ~/.matrix/config.json (matrixcode’s own config)
  3. ~/.claude/settings.json (Claude Code config)
  4. Environment variables

This allows seamless sharing of settings between matrixcode and Claude Code.

Structs§

MatrixConfig
Matrixcode configuration file structure. Field names align with Claude Code conventions.

Functions§

create_default_config
Create a default config file for new users. Uses Claude Code style field names.

Type Aliases§

Config
Type alias for compatibility