#Setting Deno CLI options
A subset of Deno CLI options can be specified with dedicated properties in config files.
Deno options are effectively only applied to
denocommands that accept them.
#Permissions
Deno permissions can be specified using allow.
# `allow` can be a list of permission names
allow:
- net
- read
scripts:
start:
cmd: server.ts
allow: # or a map
net: 127.0.0.1
read: true # allow all reads
#TS/Deno config file
Use the config property to specify a Deno config file or tsconfig (Deno's --config option).
scripts:
start:
cmd: server.ts
config: tsconfig.json
#Import maps
Import maps are specified in importMap.
scripts:
start:
cmd: deno run --unstable server.ts
importMap: import_map.json
#Inspect
inspect and inspectBrk correspond to the --inspect and --inspect-brk options.
scripts:
start:
cmd: server.ts
inspect: 127.0.0.1:9229 # use inspect: true to apply the default settings
#Lockfile
The lock property sets the namesake Deno option.
scripts:
start:
cmd: server.ts
lock: lock.json
ℹ️ Setting this option doesn't create a lock file: you will have to create/update it by passing the
--lock-writeoption manually to your script at the appropriate time. More info here.
#Reload
Reload source code cache (recompile TypeScript).
scripts:
start:
cmd: server.ts
reload: true # Reload everything
reload: https://deno.land/std # Reload only standard modules
reload: # Reload specific modules
- https://deno.land/std/fs/utils.ts
- https://deno.land/std/fmt/colors.ts
#Other boolean flags
The --cached-only, --no-check, --no-remote, --quiet, --unstable options can
be applied using the following properties:
scripts:
start:
cmd: server.ts
cachedOnly: true
noCheck: true
noRemote: true
quiet: true
unstable: true
#Log
The log property corresponds to deno's --log-level. The allowed values are debug and info.
scripts:
start:
cmd: server.ts
log: debug
#Cert
Specify a PEM certificate for http client in cert.
scripts:
start:
cmd: server.ts
cert: certificate.pem
#V8 flags
V8 flags can be specified like permissions under the v8Flags property.
v8Flags:
- expose-gc
- async-stack-trace
scripts:
start:
cmd: server.ts
v8Flags:
logfile: v8.log