deno commands cheatsheet.
Run, permission, test and compile — the Deno commands you use every day. Tap to copy.
deno run <file>.tsRun a TypeScript or JavaScript filedeno run --allow-net <file>Run with network access alloweddeno run -A <file>Run with all permissions granteddeno run --watch <file>Re-run automatically on file changesdeno serve <file>Serve an HTTP handler exported by the filedeno run --allow-read <file>Allow filesystem read accessdeno run --allow-write <file>Allow filesystem write accessdeno run --allow-env <file>Allow reading environment variablesdeno run --allow-run <file>Allow running subprocessesdeno run --deny-net <file>Deny network access explicitlydeno task <name>Run a task defined in deno.jsondeno add <pkg>Add a dependency to deno.jsondeno installInstall dependencies from deno.jsondeno cache <file>Download and cache a module's dependenciesdeno testRun tests in the projectdeno test --allow-allRun tests with all permissionsdeno benchRun benchmarksdeno coverageReport test coveragedeno fmtFormat your codedeno lintLint your code for problemsdeno check <file>Type-check without runningdeno doc <file>Show a module's documentationdeno compile <file>Build a standalone executabledeno upgradeUpdate Deno to the latest versiondeno --versionShow the installed Deno versiondeno infoShow cache and dependency infoWhat Deno actually does
Deno is a modern runtime for JavaScript and TypeScript, built as an alternative to Node.js by the same original author. Its headline trick is that it runs TypeScript directly — no separate compile step, no tsconfig wrangling — so deno run app.ts just works. It also ships a whole toolchain in one binary: a test runner, formatter, linter and bundler are all built in, which means far fewer dev dependencies cluttering your project.
Secure by default
The distinctive thing about running code with Deno is that a program can't touch anything sensitive unless you say so. By default a script has no access to the network, filesystem or environment variables. You opt in with permission flags: --allow-net for network, --allow-read and --allow-write for files, --allow-env for environment. When you just want to get moving, -A grants everything, and matching --deny-* flags let you carve out exceptions.
Tasks and dependencies
Configuration lives in deno.json, which holds an import map and a tasks section you run with deno task <name> — the rough equivalent of package scripts. Deno 2 added familiar package management: deno add records a dependency (from JSR or npm), deno install pulls everything the project needs, and deno cache downloads a module graph ahead of time so later runs are offline-fast.
The built-in toolchain
Because so much comes bundled, day-to-day upkeep is a handful of subcommands: deno fmt formats, deno lint catches problems, deno check type-checks without running, and deno test runs your suite. When you're ready to ship, deno compile turns a script into a single standalone executable. These pair naturally with the Git commands for version control and the Docker commands when you containerise your app.