deno create
The deno create command scaffolds a new project from a template package. It works with both JSR and npm packages that provide project templates.
Usage
deno create [OPTIONS] [PACKAGE] [-- [ARGS]...]
The [PACKAGE] argument requires either a jsr: or npm: prefix, or one of the --jsr / --npm flags. Unprefixed package names error out with Missing 'jsr:' or 'npm:' prefix.
How it works
Package resolution differs between npm and JSR:
-
npm packages use the
create-naming convention. Runningdeno create npm:viteresolves to thecreate-vitepackage on npm and executes its main entry point. -
JSR packages use the
./createexport. Any JSR package can act as a template by defining a./createentry point in itsdeno.json:
{
"name": "@my-scope/my-template",
"version": "1.0.0",
"exports": {
".": "./mod.ts",
"./create": "./create.ts"
}
}
When you run deno create jsr:@my-scope/my-template, Deno looks for the ./create export and runs it as the scaffolding script.
Examples
Create a project from a JSR package:
deno create jsr:@fresh/init
Create a project from an npm package:
deno create npm:vite my-app
Using the --npm flag to treat unprefixed names as npm packages:
deno create --npm create-vite my-app
Pass arguments to the template package:
deno create jsr:@fresh/init -- --force
Flags
-
--npm- Treat unprefixed package names as npm packages -
--jsr- Treat unprefixed package names as JSR packages -
-y, --yes- Bypass the prompt and run with full permissions
deno create [OPTIONS] [PACKAGE] [-- [ARGS]...]scaffolds a project from a package
Options
--jsrTreat unprefixed package names as JSR packages.
--npmTreat unprefixed package names as npm packages.
--yes, -yBypass the prompt and run with full permissions.
Last updated on
© 2018–2025 the Deno authors
Licensed under the MIT License.
https://docs.deno.com/runtime/reference/cli/create