bkr

reference

CLI, flags, and boomkat.toml

Subcommands, permission categories, runtime flags, and config file syntax.

Commands

CommandBehavior
bkr [flags] <script> [args...]Run <script> (.js, .mjs, .jsx, .ts, .mts, .tsx) as an ES module with top-level await. Trailing arguments populate process.args.
bkr [flags] [repl]Start an interactive REPL when no script is given. Supports top-level await, _ (last value), _error (last error), .help, .clear, and .exit.
bkr test [flags] [--watch] [--filter=text] [paths...]Find and run *.test.*, *_test.*, and *.spec.* files under paths (default .). Exits with status 1 if any test fails or no test files match.
bkr check <script>Scan the static local module graph of <script>, print imported built-in modules, and suggest the --allow-* flags needed.

Permission categories

CategoryAllowlist entry syntaxChecked by
nethost, host:port, *.domain, [ipv6]:port, or :porthttp.serve, net.connect, net.listen, net.resolve, fetch, WebSocket
readFile or directory path (canonicalized via realpath)file reads/stat/list, sqlite open, http TLS cert/key files, Worker module loading
writeFile or directory path (canonicalized via realpath)file writes/mkdir/remove/rename, writable sqlite databases
envVariable name or prefix wildcard PREFIX*process.env.get, set, delete, toObject
runExecutable basename (e.g. git) or pathprocess.spawn, process.run
ffi, sys, importExact name or prefix wildcard PREFIX*Reserved categories queryable through permissions

Permission and sandbox flags

FlagEffect
--allow-<perm>[=a,b]Grant a permission category, or restrict it to a comma-separated allowlist.
--deny-<perm>=a,bDeny matching entries. Deny rules always override allow rules and -A.
-A, --allow-allGrant every permission category.
--prompt / --no-promptEnable or disable interactive [y/n/A] prompts on /dev/tty. Defaults to on when both stdin and stderr are TTYs.
--no-sandboxSkip the macOS Seatbelt sandbox when prompting is off, or silence the missing-sandbox warning on Linux.
--config <file>Load permissions from <file> instead of looking for boomkat.toml beside the entry script.

Execution and scaling flags

FlagEffect
--time-limit=<ms>Interrupt any synchronous JS turn or SQLite query that runs longer than <ms> milliseconds. HTTP requests return 500; other turns exit with status 1.
--http-workers=<1..64>Run N in-process server VMs behind one listener, handing accepted connections round-robin.
--http-processes=<1..64>Run N worker processes behind a native TCP acceptor that passes sockets over SCM_RIGHTS.
--jitEnable native JIT compilation on binaries built with SLJIT.

boomkat.toml

Loaded automatically from the entry script's directory (or the path given to --config). Relative paths in read and write resolve against the directory containing the TOML file. Each key takes a boolean or an array of allowlist strings; CLI flags override the file.

[permissions]
prompt = false
net = ["127.0.0.1:8080", "*.example.com"]
read = ["./data"]
write = false
env = ["APP_*"]
run = ["git"]