CLI Reference
Commands
scafix
Root interactive entrypoint. Shows the intro banner and delegates to the interactive init flow.
npx scafix
npx scafix --name my-app --directory apps/my-app --package-manager pnpm- Requires a TTY.
- Rejects non-interactive
--yesusage without an explicit stack.
scafix init
Interactive stack picker followed by the shared prompts and any stack-specific customization prompts.
npx scafix init
npx scafix init --name my-app --directory apps/my-app- Interactive only. Use
scafix create <stack> --yesfor non-interactive scaffolding.
scafix create [stack]
Directly scaffold a known stack while still honoring shared options and stack-specific overrides. If the stack is omitted, Scafix falls back to the interactive init flow.
npx scafix create
npx scafix create next
npx scafix create express --pattern rest --package-manager pnpm- When required shared options are missing, Scafix prompts for them if a TTY is available.
- If no stack is passed,
scafix createfalls back to the same interactive flow asscafix init.
Shared options
| Option | CLI flags | Type / values | Default | Notes |
|---|---|---|---|---|
| Project name | -n, --name <name> | string | my-project | Project name used for prompts and scaffold generation. |
| Project directory | -d, --directory <dir> | string | n/a | Relative target directory. Defaults to the normalized project name. |
| Package manager | --package-manager <pm> | npm npmpnpm pnpmyarn yarnbun bun | npm | Selects the package manager Scafix uses or passes through to upstream CLIs. If omitted, Scafix first tries to detect the nearest package manager from the current working directory. |
| Git initialization | --git--no-git | boolean | false | Controls whether Scafix initializes Git after the scaffold is created. In non-interactive --yes create flows, Git defaults to true. |
| Accept defaults | -y, --yes | boolean | false | Skips prompts and uses deterministic defaults for the selected stack. Requires an explicit stack via scafix create <stack> --yes. |
| Debug output | --debug | boolean | false | Prints stack traces and extra logging when an operation fails. |
Stack override flags
These flags are accepted by the CLI parse layer, but each stack page remains the source of truth for stack-specific behavior and defaults.
| Flag(s) | Meaning | Stacks |
|---|---|---|
--app-router--no-app-router | Choose App Router or the Pages Router scaffold. | Next.js, T3 Stack |
--build-tool <buildTool> | Select the package build pipeline when TypeScript is enabled. | NPM Package |
--cors--no-cors | Adds CORS middleware support. | Node.js + Express + TypeScript |
--dotenv--no-dotenv | Adds .env loading support. | Node.js + Express + TypeScript |
--eslint--no-eslint | Controls whether create-next-app enables ESLint. | Next.js, Node.js + Express + TypeScript, NPM Package |
--framework <framework>--template <template> | Select the generated Vite framework starter. | Vite |
--helmet--no-helmet | Adds Helmet security headers middleware. | Node.js + Express + TypeScript |
--next-auth--no-next-auth | Include or remove NextAuth. | T3 Stack |
--pattern <pattern> | Select the generated application structure. | Node.js + Express + TypeScript |
--prettier--no-prettier | Adds Prettier configuration to the scaffold. | Vite, Next.js, Node.js + Express + TypeScript, NPM Package |
--prisma--no-prisma | Include or remove Prisma. | T3 Stack |
--routing--no-routing | Include Angular router setup. | Angular |
--shadcn--no-shadcn | Adds shadcn/ui after project creation when Tailwind is enabled. | Next.js |
--shadcn--no-shadcn--shadcn-vue | Adds shadcn/ui for React templates or enables equivalent UI bootstrap for Vue via --shadcn-vue. | Vite |
--src-dir--no-src-dir | Controls whether the project uses a src/ directory. | Next.js |
--ssr--no-ssr | Enable Angular server-side rendering. | Angular |
--strict--no-strict | Enable strict TypeScript compiler options. | NestJS |
--style <style> | Choose the stylesheet format for the generated Angular project. | Angular |
--tailwind-version <version> | Select the Tailwind version when Tailwind is enabled. | Vite |
--tailwind--no-tailwind | Adds Tailwind CSS to the generated project. | Vite, Next.js, T3 Stack |
--template <template> | Select the official Astro starter template. | Astro, SvelteKit, Nuxt, Hono, Expo, Tauri |
--test-framework <testFramework> | Select the generated test setup. | NPM Package |
--trpc--no-trpc | Include or remove the tRPC package set. | T3 Stack |
--types <types>--typescript--no-typescript | Choose TypeScript or JSDoc/CheckJS typing. | SvelteKit |
--typescript--no-typescript | Choose TypeScript or JavaScript output. | Vite, Next.js, NestJS, Node.js + Express + TypeScript, Fastify, NPM Package |
--zard--no-zard | Adds zard/ui setup after the Angular scaffold is created. | Angular |
Behavior notes
- Interactive root usage requires a TTY. Non-interactive shells should use
scafix create <stack> --yes. - When
--nameis omitted, Scafix falls back tomy-projectin--yesmode or prompts interactively. - Directories must be relative paths inside the current working directory. Existing directories are rejected.
- Scafix strips
.gitdirectories produced by upstream generators and only initializes Git itself when requested.
Package manager detection
Detection order:
bun.lock / bun.lockb->pnpm-lock.yaml->yarn.lock->package-lock.json->package.json#packageManagerDefault manager:
npmDetection walks up from the current working directory and prefers the nearest ancestor match.
If no supported lockfile or package manager field is found, Scafix defaults to npm.
Yarn Berry is detected from
.yarnrc.yml, Plug'n'Play files, or apackageManagerfield.
Representative examples
npx scafix
npx scafix create
npx scafix create next --name dashboard --yes --package-manager pnpm
npx scafix create express --pattern rest --cors --helmet
npx scafix create npm --build-tool tsup --test-framework vitest