MCPcopy
hub / github.com/t3-oss/create-t3-app / runCli

Function runCli

cli/src/cli/index.ts:78–433  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

76};
77
78export const runCli = async (): Promise<CliResults> => {
79 const cliResults = defaultOptions;
80
81 const program = new Command()
82 .name(CREATE_T3_APP)
83 .description("A CLI for creating web applications with the t3 stack")
84 .argument(
85 "[dir]",
86 "The name of the application, as well as the name of the directory to create"
87 )
88 .option(
89 "--noGit",
90 "Explicitly tell the CLI to not initialize a new git repo in the project",
91 false
92 )
93 .option(
94 "--noInstall",
95 "Explicitly tell the CLI to not run the package manager's install command",
96 false
97 )
98 .option(
99 "-y, --default",
100 "Bypass the CLI and use all default options to bootstrap a new t3-app",
101 false
102 )
103 /** START CI-FLAGS */
104 /**
105 * @experimental Used for CI E2E tests. If any of the following option-flags are provided, we
106 * skip prompting.
107 */
108 .option("--CI", "Boolean value if we're running in CI", false)
109 /** @experimental - Used for CI E2E tests. Used in conjunction with `--CI` to skip prompting. */
110 .option(
111 "--tailwind [boolean]",
112 "Experimental: Boolean value if we should install Tailwind CSS. Must be used in conjunction with `--CI`.",
113 (value) => !!value && value !== "false"
114 )
115 /** @experimental Used for CI E2E tests. Used in conjunction with `--CI` to skip prompting. */
116 .option(
117 "--nextAuth [boolean]",
118 "Experimental: Boolean value if we should install NextAuth.js. Must be used in conjunction with `--CI`.",
119 (value) => !!value && value !== "false"
120 )
121 /** @experimental Used for CI E2E tests. Used in conjunction with `--CI` to skip prompting. */
122 .option(
123 "--betterAuth [boolean]",
124 "Experimental: Boolean value if we should install BetterAuth. Must be used in conjunction with `--CI`.",
125 (value) => !!value && value !== "false"
126 )
127 /** @experimental - Used for CI E2E tests. Used in conjunction with `--CI` to skip prompting. */
128 .option(
129 "--prisma [boolean]",
130 "Experimental: Boolean value if we should install Prisma. Must be used in conjunction with `--CI`.",
131 (value) => !!value && value !== "false"
132 )
133 /** @experimental - Used for CI E2E tests. Used in conjunction with `--CI` to skip prompting. */
134 .option(
135 "--drizzle [boolean]",

Callers 1

mainFunction · 0.85

Calls 2

getVersionFunction · 0.85
getUserPkgManagerFunction · 0.85

Tested by

no test coverage detected