deno init command scaffolds a new Deno project with a basic file structure.
Usage
Description
Initialize a new Deno project with starter files including a main module, test file, and configuration file.Flags
Initialize a library project with module exports and JSR publishing configuration
Initialize a server project with HTTP server example
Initialize an empty project with minimal setup
Initialize from a template package (npm: or jsr: prefix)
Skip interactive prompts when using —package flag
Project Types
Default Project
Creates a basic project with:main.ts- Main module with example functionmain_test.ts- Test filedeno.json- Configuration file with tasks
Library Project
Creates a library project ready for publishing to JSR:mod.ts- Module entry pointmod_test.ts- Test filedeno.json- Configuration with name, version, and exports
Server Project
Creates an HTTP server project:main.ts- Server with routing examplesmain_test.ts- Server testsstatic/- Static file directorydeno.json- Configuration with serve task
Empty Project
Creates a minimal project:main.ts- Simple hello worlddeno.json- Basic configuration