| title | command | openGraphLayout | openGraphTitle | description |
|---|---|---|---|---|
deno create, scaffold a new project |
create |
/open_graph/cli-commands.jsx |
deno create |
Scaffold a new project from a template package |
The deno create command scaffolds a new project from a template package. It
works with both JSR and npm
packages that provide project templates.
deno create [OPTIONS] [PACKAGE] [-- [ARGS]...]By default, unprefixed package names are resolved from JSR. You can use the
npm: or jsr: prefix to be explicit, or use the --npm / --jsr flags.
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 @my-scope/my-template, Deno looks for the ./create
export and runs it as the scaffolding script.
Create a project from a JSR package:
deno create @fresh/initCreate a project from an npm package:
deno create npm:vite my-appUsing the --npm flag to treat unprefixed names as npm packages:
deno create --npm create-vite my-appPass arguments to the template package:
deno create @fresh/init -- --force--npm- Treat unprefixed package names as npm packages--jsr- Treat unprefixed package names as JSR packages (default)-y, --yes- Bypass the prompt and run with full permissions