website/versioned_docs/version-3.1.1/api/misc/create-docusaurus.mdx
A scaffolding utility to help you instantly set up a functional Docusaurus app.
npx create-docusaurus@latest [name] [template] [rootDir]
The name argument will be used as the site's path as well as the name field in the created app's package.json. It can be an absolute path, or a path relative to rootDir.
The template argument can be one of the following:
classic: Uses the classic template (recommended)facebook: Uses the Facebook/Meta template, which contains some Meta-specific setuphttps:// or git@), which can be cloned to the destinationThe rootDir will be used to resolve the absolute path to the site directory. The default is CWD.
:::warning
This command should be preferably used in an interactive shell so all features are available.
:::
-t, --typescriptUsed when the template argument is a recognized name. Currently, only classic provides a TypeScript variant.
-g, --git-strategyUsed when the template argument is a git repo. It needs to be one of:
deep: preserves full git historyshallow: clones with --depth=1copy: does a shallow clone, but does not create a git repocustom: enter your custom git clone command. We will prompt you for it. You can write something like git clone --depth 10, and we will append the repository URL and destination directory.-p, --package-managerValue should be one of npm, yarn, pnpm, or bun. If it's not explicitly provided, Docusaurus will infer one based on:
create-docusaurus (e.g. npm init, npx, yarn create, bunx, etc.)-s, --skip-installIf provided, Docusaurus will not automatically install dependencies after creating the app. The --package-manager option is only useful when you are actually installing dependencies.