Skip to content

Instantly share code, notes, and snippets.

@Icaruk
Last active April 14, 2026 22:29
Show Gist options
  • Select an option

  • Save Icaruk/6e31f3e97b6958de6f8fc1263f59cb33 to your computer and use it in GitHub Desktop.

Select an option

Save Icaruk/6e31f3e97b6958de6f8fc1263f59cb33 to your computer and use it in GitHub Desktop.
Opencode configuration
{
"$schema": "https://opencode.ai/config.json",
"autoupdate": true,
"model": "zai-coding-plan/glm-4.7",
"small_model": "zai-coding-plan/glm-4.7-flash",
"agent": {
"plan": {
"model": "zai-coding-plan/glm-5.1",
"tools": {
"write": false,
"edit": false,
"bash": false
}
},
"build": {
"model": "zai-coding-plan/glm-4.7"
},
"build-fast": {
"description": "A faster but less accurate version of build agent, used for simple tasks or when speed is preferred over accuracy.",
"model": "zai-coding-plan/glm-4.7-flash",
"color": "#7AE9FF"
},
},
"mcp": {
"context7": {
"type": "remote",
"url": "https://mcp.context7.com/mcp",
"headers": {
"CONTEXT7_API_KEY": "__REDACTED__"
},
"enabled": true
},
"codebase-memory-mcp": {
"enabled": true,
"type": "local",
"command": [
"./PATH/TO/codebase-memory-mcp/codebase-memory-mcp.exe"
]
}
},
"plugin": [
"@franlol/opencode-md-table-formatter@0.0.3",
"@tarquinen/opencode-dcp@latest",
"@slkiser/opencode-quota",
"@sveltejs/opencode",
"@icaruk/zai-peak-hours@latest"
],
"permission": {
"skill": "ask",
"question": "allow",
"command": {
// ==================== GIT ====================
"git commit *": "ask",
"git push *": "deny",
"git reset --hard *": "ask",
"git rebase *": "ask",
"git force push *": "deny",
"git --force *": "deny",
// ==================== UNIX / MACOS / LINUX ====================
// Destructive file operations
"rm -rf *": "deny",
"rm -rf /": "deny",
"sudo *": "ask",
"chmod *": "ask",
"chown *": "ask",
// Dangerous network
"curl * | sh": "deny",
"wget * | sh": "deny",
"ssh *": "ask",
"scp *": "ask",
// Shell
"sh *": "ask",
"bash *": "ask",
"zsh *": "ask",
"eval *": "ask",
"exec *": "ask",
// Redirections
"> *": "ask",
">> *": "ask",
// Package managers
"apt *": "ask",
"apt-get *": "ask",
"yum *": "ask",
"dnf *": "ask",
"pacman *": "ask",
"brew *": "ask",
// ==================== WINDOWS ====================
// Destructive file operations
"del /f /s /q *": "deny",
"del /q /f /s *": "deny",
// Permissions
"takeown *": "ask",
"icacls *": "ask",
"cacls *": "ask",
"runas *": "ask",
// Registry
"reg *": "ask",
"regedit *": "deny",
"regedit": "deny",
"reg delete *": "deny",
// Destructive disk management
"format *": "deny",
"diskpart": "deny",
"diskpart *": "deny",
// PowerShell/CMD
"powershell *": "ask",
"pwsh *": "ask",
"powershell.exe *": "ask",
"pwsh.exe *": "ask",
"cmd *": "ask",
"cmd /c *": "ask",
"cmd /k *": "ask",
// Network
"net *": "ask",
"netsh *": "ask",
"telnet *": "ask",
// Process
"taskkill *": "ask",
// Services
"sc *": "ask",
"services.msc": "deny",
// Installers
"msiexec *": "ask",
"setup.exe *": "ask",
"install.exe *": "ask",
// WMIC
"wmic *": "ask",
// ==================== NODE / NPM / PNPM ====================
"npm publish": "ask",
"npm unpublish": "deny",
"npm exec *": "ask",
"npx *": "ask",
"pnpm publish": "ask",
"pnpm unpublish": "deny",
"pnpm exec *": "ask",
"pnpx *": "ask",
"pnpm dlx *": "ask",
// ==================== DOCKER ====================
"docker run *": "ask",
"docker exec *": "ask",
"docker rm *": "ask",
"docker rmi *": "ask",
"docker system prune *": "ask",
// ==================== CLOUD CLI ====================
"aws *": "ask",
"az *": "ask",
"gcloud *": "ask",
"firebase *": "ask",
"planetscale *": "ask",
"heroku *": "ask",
"railway *": "ask",
"render *": "ask",
"wrangler *": "ask",
// ==================== DATABASE CLI ====================
"atlas *": "ask",
// ==================== VERSION MANAGERS ====================
"mise *": "ask",
"nvm *": "ask",
"volta *": "ask"
},
"network": {
"fetch": "allow",
"websocket": "ask"
},
},
"formatter": false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment