Skip to content

Configuration

SWUST Code uses JSON/JSONC config files for models, permissions, providers, MCP, agents, plugins, and TUI behavior.

Config Locations

ScopePaths
Global~/.config/swust-code/config.json, swust-code.json, swust-code.jsonc
Projectswust-code.json, swust-code.jsonc discovered upward from the current directory
Project directory.swust-code/swust-code.json, .swust-code/swust-code.jsonc
TUItui.json, tui.jsonc in global or project .swust-code directories

Project config overrides global config, and the closest project config wins. Use SWUST_CODE_CONFIG for one explicit file or SWUST_CODE_CONFIG_DIR for an additional config directory.

Basic Config

json
{
  "$schema": "https://opencode.ai/config.json",
  "model": "anthropic/claude-sonnet-4-6",
  "permission": {
    "bash": "ask",
    "edit": "allow",
    "read": "allow"
  }
}

Skill Sources

json
{
  "skills": {
    "paths": [".swust-code/skills"],
    "urls": ["https://example.com/.well-known/skills/"]
  }
}

The CLI/TUI path currently reads this v1 object shape. The core v2 layer adapts these entries into local directory or remote URL sources internally.

Environment Variables

VariableDescription
SWUST_CODE_CONFIGUse one explicit config file
SWUST_CODE_CONFIG_DIRCustom config directory
SWUST_CODE_CONFIG_CONTENTInject config content from an environment variable
SWUST_CODE_DISABLE_PROJECT_CONFIGDisable project config discovery
SWUST_CODE_DBCustom database path
SWUST_CODE_PUREDisable external plugins
SWUST_CODE_DISABLE_MODELS_FETCHDisable model catalog refresh
SWUST_CODE_SERVER_PASSWORDPassword for serve and web
SWUST_CODE_SERVER_USERNAMEUsername for serve and web
SWUST_CODE_MEMORY_RECONCILE_ON_SEARCHAuto-sync memory before search (default: true)