Deno is a modern JavaScript and TypeScript runtime built on V8, Rust, and Tokio, designed to address Node.js shortcomings with secure-by-default permissions, built-in TypeScript support, and Web Standards compliance. Created by Ryan Dahl (Node.js creator), Deno eliminates node_modules, uses URL imports, and ships with a complete built-in toolchain including formatter, linter, test runner, and bundler. The runtime's explicit permission model requires opt-in flags for file system, network, and environment access, making it ideal for security-conscious applications. With Deno 2.0 achieving full npm compatibility and backwards compatibility with Node.js, developers can leverage the entire npm ecosystem while benefiting from Deno's modern architecture, native TypeScript execution without transpilation, and seamless deployment to edge runtimes via Deno Deploy.
What This Cheat Sheet Covers
This topic spans 15 focused tables and 156 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.
Table 1: Core Permission Flags
| Flag | Example | Description |
|---|---|---|
deno run --allow-read=./data script.ts | • Grants file system read access to specified paths • omit path for unrestricted read access | |
deno run --allow-write=/tmp script.ts | • Grants file system write access to specified paths • required for creating, modifying, or deleting files | |
deno run --allow-net=api.example.com script.ts | • Grants network access to specified domains • required for HTTP requests, WebSockets, TCP/UDP connections | |
deno run --allow-env=API_KEY,DB_URL script.ts | • Grants environment variable access • specify variable names or omit for unrestricted env access | |
deno run --allow-run=git,npm script.ts | • Grants subprocess execution permission • specify allowed commands or omit for unrestricted subprocess spawning |