skip to content
Gift Egwuenu
Search articles
Back to TIL

OpenCode permissions

Getting prompted to allow bash commands every time can get annoying. You can configure permissions in your opencode.json to skip the prompts.

{
	"permission": {
		"bash": "allow"
	}
}

Or allow specific commands only:

{
	"permission": {
		"bash": {
			"*": "ask",
			"git *": "allow",
			"ls *": "allow"
		}
	}
}

See the permissions docs to configure other tools like edit, read, etc.