مرحلة التكرار السريع · قد تتغير الواجهات والوثائق
Liri Liri الوثائق
كل الوثائق
AR

الوثائق متاحة حالياً باللغة الإنجليزية فقط.

This page is synced from app/docs/配置与安全/configuration.md in the GitHub repository. If it differs from the source, the repository wins.

Configuration Guide

Configuration Hierarchy

Liri’s configuration is applied in order of priority, from highest to lowest:

  1. Environment variables - injected at runtime, highest priority
  2. Configuration file - config/governance.json
  3. Defaults - default settings in the code

Environment Variables

VariableDescriptionRequired
DEEPSEEK_API_KEYDeepSeek API key (get one at https://platform.deepseek.com/api_keys)Yes
DEEPSEEK_BASE_URLDeepSeek API endpoint (the default is fine)No
DEEPSEEK_MODELDeepSeek model name (the default is fine)No
LOG_LEVELLog levelNo
PORTService portNo

Configuration File

config/governance.json contains the full system configuration:

{
  "permissions": {
    "file_read": {
      "allowed": true,
      "paths": ["./src", "./config", "./docs"]
    },
    "file_write": {
      "allowed": true,
      "paths": ["./src", "./config"]
    },
    "bash_exec": {
      "allowed": true,
      "commands": ["node", "bun", "npm", "git", "npx"],
      "forbiddenCommands": ["rm -rf /*", "del /f /s"]
    }
  },
  "rateLimit": {
    "requestsPerMinute": 60,
    "tokensPerMinute": 100000
  }
}

Runtime Configuration

# Show current configuration
/config show

# Show a specific configuration item
/config get DEEPSEEK_MODEL

# Modify configuration (temporary)
/config set LOG_LEVEL debug

# Reset configuration to defaults
/config reset LOG_LEVEL

الملف المصدر: app/docs/配置与安全/configuration.md