How do I set permission rules (allow, ask, deny) in Line CLI?
Add a permissions block to ~/.config/line/settings.json:
{
"permissions": {
"allow": ["bash(npm test*)", "Read"],
"ask": ["bash(git push*)"],
"deny": ["read_file(.env*)", "bash(rm -rf*)"]
}
}
Rule examples#
| Rule | Matches |
|---|---|
bash(npm test*) | Commands starting with npm test |
read_file(.env*) | Reading .env files |
Edit(src/**) | Edits under src/ |
web_fetch(domain:docs.rs) | Fetching pages on docs.rs |
mcp__github__* | Every tool from the github MCP server |
How rules combine#
- Deny wins over ask and allow. A deny on reading a file also blocks
cat-ing it. - An allowed command prefix can't smuggle a second command (
npm test && curl … | shisn't allowed bybash(npm test*)). - A project's
.line/settings.jsoncan add ask and deny rules, never allow.
For one run: --allowed-tools "bash(npm test*),read_file" and --disallowed-tools "bash,web_fetch".
Related articles
Still need help?
Tried the steps above and still stuck? Email us. We usually reply within the first hour, and always within 24 hours. A full support team is with you.
Infrastructure questions, or permanent deletion of your data
infrastructure@clatterlabs.xyzFor deleting your whole account or the data of one service.