Loading...
Loading...
Use when writing, running, configuring, reviewing, or debugging code in a Deno project, or when scaffolding a new one. Covers dependency management with deno install and deno add, package.json and node_modules support, npm and JSR packages, permissions, where configuration belongs across package.json, tsconfig.json and deno.json, workspaces, the built-in toolchain (fmt, lint, test, check, bench, compile), and publishing.
npx skill4agent add denoland/skills denodeno --versiondeno upgradedeno installpackage.jsonnode_modulesdeno add expressdeno task buildscripts.buildpackage.jsontasks.builddeno.jsondeno.jsonnode:fsfsdeno main.jsdeno runtsconfig.jsontsconfig.jsonmigrate-to-denodeno install # install everything declared
deno add express # from npm (unprefixed = npm)
deno add jsr:@std/path # from JSR
deno add -D vitest # dev dependency (package.json only)
deno remove express
deno outdated # list outdated deps
deno update # alias for `deno outdated --update`
deno update --latest # ignore existing semver ranges
deno list # declared deps + resolved versions (npm ls)
deno why express # why a package is in the tree
deno audit # vulnerability audit
deno ci # clean reproducible install for CI
dx cowsay hello # run a package binary without installing (npx)deno cideno installdeno.locknode_modules--proddxnpxbunxpnpm dlxdeno xnpx--min-dep-age120P7D0deno add --min-dep-age=0 npm:some-packagepostinstalldeno approve-scripts # interactive picker
deno install --allow-scripts=npm:better-sqlite3| File | Holds |
|---|---|
| dependencies, scripts |
| TypeScript compiler options |
| Deno config: |
package.jsondeno.jsonpackage.jsontsconfig.jsoncompilerOptionsdeno.jsontscdeno.lockpackage-lock.jsonyarn.lockbun.locknode_modules/.deno/{ "nodeModulesLinker": "hoisted" }nodeModulesDirpackage.jsondeno run --allow-net=api.example.com --allow-read=./data main.ts
deno run -A main.ts # allow everything| Flag | Short | Grants |
|---|---|---|
| | filesystem read |
| | filesystem write |
| | network |
| | environment variables |
| | OS information |
| | imports from remote hosts |
| — | subprocesses |
| — | native libraries (unstable) |
| | everything |
-S--allow-sys--allow-run--allow-net=example.com:443--allow-net--deny-*Requires net access to "..."-Adeno.json.jsonc{
"tasks": {
"dev": "deno watch -A main.ts",
"start": "deno run -A main.ts"
},
"fmt": { "exclude": ["build/"] },
"lint": { "rules": { "exclude": ["no-explicit-any"] } },
"exclude": ["build/", "dist/"]
}excludeexcludedeno.jsonimportspackage.jsonnameversionexportspackage.json"workspaces"pnpm-workspace.yamldeno.json{ "workspace": ["./packages/core", "./packages/cli"] }"packages/*"**deno task --filter '*' builddeno add express@std/*deno add jsr:@std/path npm:express
deno doc jsr:@std/path # read a package's API from the terminalhttps://deno.land/x/...deno adddeno fmt # format (--check for CI)
deno lint # lint (--fix, --rules)
deno test # tests (--watch, --parallel, --coverage=dir)
deno check main.ts # type-check without running
deno bench # benchmarks
deno coverage # coverage report from --coverage output
deno compile main.ts # single-file executable (--target cross-compiles)
deno doc mod.ts # docs (--html for a site)
deno info main.ts # module graph and cache info// deno-lint-ignore <rule>// deno-lint-ignore-file// deno-fmt-ignore// deno-fmt-ignore-file<!-- deno-fmt-ignore -->deno main.ts # deno run is optional
deno watch main.ts # reload on change (replaces nodemon)
deno task dev # task from package.json or deno.json
deno repl
deno eval "console.log(1)"deno watchdeno run --watch-hmrDeno.serve((_req) => new Response("Hello"));deno init my-project # script + test + deno.json
deno init --empty my-project # just main.ts and deno.json
deno init --lib my-lib # library laid out for JSR
deno create vite my-app # scaffold from a package initializerdeno createnpm createyarn createdeno create astro--jsrnpm publishdeno packdeno publishdeno.jsonnameversionexportsdeno publish --dry-run
deno publishdeno bump-version patch-Adeno.lockdeno installdeno cijsr:npm:package.jsondeno adddeno.jsonpackage.jsontsconfig.jsondeno fmt --checkdeno lintdeno checkDeno.*references/CLI.mddeno <subcommand> --help