Skip to content

CLI Reference

Terminal window
npx create-xtarter-app@latest [project-name] [options]

The package also exports a programmatic API for scripts, described in the package README.

Argument Required Description
project-name No Project name. If omitted, the CLI prompts.
Option Alias Default Description
--template -t - Template ID, skipping the prompt. See Templates
--pm -p - Package manager: pnpm, npm, bun, or yarn
--git / --no-git - true Git init
--clean - - Remove CI/CD config files after scaffolding
--force -f - Overwrite an existing target directory
--ref - - Git ref (branch, tag, or commit SHA) to download
--yes -y - Skip selection prompts and use defaults (next-chakra, pnpm, Git init, no cleanup)
--quiet - - Suppress banners, spinners, and decorative output
--json - - Output the scaffold result as JSON (implies --quiet)
--color / --no-color - true Colorized output
--help -h - Show help
--version -v - Show the version

The project name has no default. Provide [project-name] with --yes for a fully non-interactive run.

Command Description
preview [template] Show template details without scaffolding
Defaults
npm create xtarter-app@latest -- my-app --yes
Current directory
npm create xtarter-app@latest -- . -t vite-tailwind
Bun, no git
npm create xtarter-app@latest -- my-app --pm bun --no-git
Overwrite
npm create xtarter-app@latest -- my-app -t vite-tailwind --force
Preview
npm create xtarter-app@latest -- preview next-tailwind
  • Invalid template ID or package manager: prints the valid values and exits.
  • Invalid invocation: unknown options and commands exit 1 before anything runs, with a suggested correction when one is close.
  • Existing target directory: cancels unless --force is used. Explicit inputs are validated before the directory is created, modified, or deleted.
  • Download failure: retries up to 3 times, then exits.
  • Install failure: removes the target directory when the CLI created it, then exits.
  • Git init failure: logs a warning and reports gitInitialized: false in --json output without discarding the scaffold.