create-dk-app v1.4.3
create-dk-app
A command-line utility for creating a NextJs project.
Get started by running npm create dk-app@latest
Getting Started
To scaffold an app using create-dk-app
, run any of the following four commands and answer the command prompt questions:
npm
npm create dk-app@latest
yarn
yarn create dk-app
pnpm
pnpm create dk-app@latest
bun
bun create dk-app@latest
You'll be prompted for some values. Provide them, then a Next.js app will be created for you.
Answer the prompts with your own desired options. For example:
✔ What is the project name? … My Awesome Project
✔ What is the project slug? … my-awesome-project
✔ What is the project description? … Behold My Awesome Project!
✔ What is the author name? … DKSHS
✔ What is the project version? … 0.1.0
✔ Do you want to use linters? … Yes
✔ Do you want to use husky? … No
✔ Do you want to use lint staged? … No
✔ Do you want to use Next.Js app folder? … Yes
✔ What database ORM would you like to use? › Prisma
✔ Do you want to use Docker compose for the database? … Yes
✔ Do you want to use T3 Env? … Yes
✔ Do you want the project to be configured? … No
Enter the project and take a look around:
cd my-awesome-project/
ls
Now take a look at your repo. Don't forget to carefully look at the generated README.
Advanced usage
If you want to start faster, you can use the following options:
Flag | Description |
---|---|
-y , --default | Bypass the CLI and use all default values. |
--projectName <string> | The Project name. |
--projectSlug <string> | The Project Slug. |
--description <string> | The Project description. |
--authorName <string> | The author name. |
--version <string> | The project version. |
--useLinters [boolean] | Include linters in the project. Such as ESLint and Prettier. |
--useHusky [boolean] | Include husky in the project. |
--useLintStaged [boolean] | Include lint-staged in the project. |
--useAppFolder [boolean] | Use Next.Js app folder structure. |
--database <string> | Choose a database ORM. See for more info. |
--useDockerCompose [boolean] | Include docker compose in the project for the database. If database is different from none . |
--useEnvValidator [boolean] | Include T3-env validator in the project. |
--automaticStart [boolean] | This option will install the application packages, start a git repo and make the initial commit. |
See for more information about options.
Example
The following would be the structure of an application with T3-env:
pnpm dlx create-dk-app@latest --useEnvValidator
If you want to use all the default values with the exception of one or more, you can do it as follows:
pnpm dlx create-dk-app@latest --useHusky --useLintStaged -y
This will use the default values, with the exception of the --useHusky
and --useLintStaged
options.