Skip to main content

Module config

Module config 

Source
Expand description

Configuration loading for matrixcode.

Universal naming style (no provider-specific prefixes):

  • api_key
  • base_url
  • model
  • plan_model
  • compress_model

Also supports Claude Code style aliases for compatibility:

  • ANTHROPIC_AUTH_TOKEN (alias for api_key)
  • ANTHROPIC_BASE_URL (alias for base_url)
  • ANTHROPIC_MODEL (alias for model)

Priority (highest to lowest):

  1. Environment variables (API_KEY, BASE_URL, MODEL, etc.)
  2. ~/.matrix/config.json (matrixcode’s own config)
  3. ~/.claude/settings.json (Claude Code fallback)
  4. Defaults

Structs§

MatrixConfig
Matrixcode configuration file structure. Uses universal naming (no ANTHROPIC_ prefix).

Functions§

create_default_config
Create a default config file for new users.
create_example_config
Create example config file with field documentation.

Type Aliases§

Config
Type alias for compatibility