guide
Permissions and boomkat.toml
Grant capabilities on the command line, store project defaults in boomkat.toml, or drop privileges after startup.
CLI flags
Pass comma-separated allowlists to --allow-<perm>, or omit the list to grant the whole category.
--deny-<perm>=list overrides any allow rule, including -A (--allow-all):
# Scope network to specific hosts/ports and filesystem to specific folders
bkr --allow-net=api.example.com,:8080 --allow-read=./data --allow-write=./out app.js
# Allow everything except cloud metadata IPs
bkr -A --deny-net=169.254.169.254 app.js
# Disable interactive terminal prompts
bkr --no-prompt --allow-net=:8080 app.js
Project defaults in boomkat.toml
bkr loads boomkat.toml from the entry script's directory (or the path passed to --config).
Relative paths in read and write resolve against the directory containing the TOML file. CLI flags are applied on top of the file and always take precedence.
[permissions]
prompt = false
net = ["127.0.0.1:8080", "api.example.com", "*.cdn.example.com"]
read = ["./public", "./data"]
write = ["./data"]
env = ["APP_*"]
run = ["git"]
When prompt = false (or --no-prompt is set), grants are fixed for the run and macOS applies a Seatbelt sandbox blocking network, process execution, and file writes outside those grants. Pass --no-sandbox to skip the OS sandbox.
Drop privileges at run time
Use the permissions module to inspect grants or revoke access after reading startup config:
import { query, revoke } from "permissions";
import { readText } from "file";
const secrets = JSON.parse(await readText("./secrets.json"));
// Drop read access to secrets.json for the rest of the process
await revoke({ name: "read", path: "./secrets.json" });
const status = await query({ name: "read", path: "./secrets.json" });
console.log(status.state); // "denied"
bkr --no-prompt --allow-read=./secrets.json app.ts
With prompting disabled, revoked permissions stay revoked; calling request() cannot widen access again.