Configuration
Config Hierarchy
Three layers
Section titled “Three layers”SANDCODE has a three-tier configuration system. Each layer overrides the one above it:
┌─────────────────────────────────┐│ Distro defaults │ ← src/distro/defaults.ts│ (lowest priority) │├─────────────────────────────────┤│ User config │ ← ~/.sandcode/config.json│ (personal preferences) │├─────────────────────────────────┤│ Project config │ ← .sandcode/settings.json│ (highest priority) │└─────────────────────────────────┘Distro defaults
Section titled “Distro defaults”Built into the codebase at src/distro/defaults.ts. These define SANDCODE’s identity:
- Default provider:
zai - Default model:
GLM-5.1 - Features: auto memory, project tracker, recipes, startup tips
- Branding: amber primary color (
#F5A623)
You never edit these directly.
User config
Section titled “User config”Located at ~/.sandcode/config.json. Applies to all projects:
{ "model": "GLM-5.1", "provider": "zai", "theme": "dark", "autoAccept": false}Project config
Section titled “Project config”Located at .sandcode/settings.json in your project root. Overrides everything:
{ "model": "GLM-5.1", "allowedTools": ["Bash", "Edit", "Read"], "hooks": { "postToolUse": "npm test" }}There’s also .sandcode/settings.local.json for personal project overrides (add to .gitignore).
Resolution example
Section titled “Resolution example”If distro defaults set theme: "dark", user config sets theme: "light", and project config sets nothing — the resolved value is "light" (user config wins).
If project config sets theme: "dark-ansi", that wins over everything.