id = "create-next-app" name = "create-next-app" homepage = "https://nextjs.org/docs/app/api-reference/cli/create-next-app" description = "Create Next.js-powered React apps with one command." icon = "SimpleIcons:nextdotjs" executables = ["create-next-app"] [dotfiles] # Unlike the rest of the create-* scaffolders, this one remembers the answers # to its prompts so `--yes` and "reuse previous settings" can replay them. # packages/create-next-app/index.ts does `new Conf({ projectName: # 'create-next-app' })` and keeps them under a `preferences` key; conf's # defaults (configName "config", fileExtension "json", projectSuffix # "nodejs") resolve that to envPaths('create-next-app', { suffix: 'nodejs' }) # .config/config.json, which env-paths builds as ~/Library/Preferences/ # on macOS, $XDG_CONFIG_HOME (~/.config) on Linux and %APPDATA%//Config # on Windows. Both were read out of the published 16.3.4 bundle. paths = [ "~/Library/Preferences/create-next-app-nodejs/config.json", "~/.config/create-next-app-nodejs/config.json", "%APPDATA%/create-next-app-nodejs/Config/config.json", ] exclude = [] # Prompt answers only — TypeScript, the linter, Tailwind, the App Router, the # import alias. Nothing here authenticates anything. secret = [] # Read at startup and rewritten when the run finishes; each run is a separate # short-lived process. side_effect = false # No machine_lines: importAlias is a project convention the user wants on # every machine, and the rest are booleans. [commands] format = 1 label = "Create a Next.js app" description = "Scaffold a new Next.js project. Only the flags present in the Fig completion data are offered." quality = "ai-draft" base = "fig:create-next-app" parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false } [[commands.source]] id = "fig" kind = "completion" url = "https://github.com/withfig/autocomplete/blob/master/src/create-next-app.ts" license = "MIT" [[commands.field]] id = "dir" label = "Project directory" type = "path" position = 0 path = { kind = "directory", role = "output", must_exist = false } sources = ["fig"] [[commands.field]] id = "typescript" label = "TypeScript" description = "Initialize as a TypeScript project." type = "boolean" option = ["--typescript", "--ts"] sources = ["fig"] [[commands.field]] id = "use_npm" label = "Use npm" type = "boolean" option = ["--use-npm"] sources = ["fig"] [[commands.field]] id = "use_pnpm" label = "Use pnpm" type = "boolean" option = ["--use-pnpm"] sources = ["fig"] [[commands.field]] id = "example" label = "Example" description = "An example name from the official Next.js repo or a GitHub URL." type = "string" option = ["--example", "-e"] sources = ["fig"] [[commands.task]] id = "new" label = "New TypeScript app" set = { typescript = [true] } fields = ["dir", "typescript", "use_npm", "use_pnpm"] required = ["dir"] [[commands.task]] id = "from-example" label = "From an example" fields = ["dir", "example", "use_npm", "use_pnpm"] required = ["dir", "example"] [[commands.group]] id = "basic" label = "Basic" fields = ["dir", "typescript", "example"] [[commands.group]] id = "advanced" label = "Package manager" fields = ["use_npm", "use_pnpm"]