create-turbo-stack

Analyze

Reverse-engineer an existing Turborepo into a Preset.

The analyze command scans an existing Turborepo monorepo and generates a Preset JSON that describes its current stack. This is useful for:

  • Importing existing projects into the Builder for visualization
  • Auditing what technologies a monorepo uses
  • Sharing your stack configuration with others
  • Diffing your current state against an ideal configuration

Usage

npx create-turbo-stack analyze [path]

If no path is given, the current directory is used.

What It Detects

CategoryDetects
Package Managerbun, pnpm, npm, yarn (via lockfile)
LinterBiome, ESLint + Prettier
TypeScriptStrict vs relaxed mode
DatabaseDrizzle (+ driver), Prisma, Supabase
APItRPC, Hono, REST (Next.js API routes)
AuthSupabase Auth, Better Auth, Clerk, NextAuth, Lucia
CSSTailwind 4, Tailwind 3, vanilla
UIshadcn/ui
AnalyticsPostHog, Vercel Analytics, Plausible
Error TrackingSentry
EmailReact Email + Resend, Nodemailer
Rate LimitingUpstash
AIVercel AI SDK, LangChain
AppsNext.js, Hono, detected by framework deps
PackagesAll workspace packages with type inference

Confidence Levels

Each detection returns a confidence level:

  • certain — Direct evidence found (e.g., bun.lock exists → bun)
  • likely — Strong indirect evidence (e.g., drizzle-orm in deps → drizzle)
  • guess — Weak signal or fallback (e.g., no lockfile → npm assumed)

Output

By default, the analyzed preset is printed to stdout as JSON:

npx create-turbo-stack analyze ./my-project > preset.json

Open in Builder

Use --open-builder to open the result directly in the web Builder:

npx create-turbo-stack analyze --open-builder

This encodes the preset into a URL and opens your browser.

Save as Config

Use --save to write the result to .turbo-stack.json:

npx create-turbo-stack analyze --save

Example Output

{
  "basics": {
    "projectName": "my-saas",
    "scope": "@my-saas",
    "packageManager": "pnpm",
    "linter": "biome",
    "typescript": "strict"
  },
  "apps": [
    { "name": "web", "type": "nextjs", "port": 3000, "i18n": false, "consumes": ["ui", "db"] }
  ],
  "packages": [
    { "name": "ui", "type": "ui", "producesCSS": true, "exports": ["."] },
    { "name": "db", "type": "library", "producesCSS": false, "exports": ["."] }
  ],
  "database": { "strategy": "drizzle", "driver": "postgres" },
  "api": { "strategy": "trpc" },
  "auth": { "provider": "clerk" },
  "css": { "framework": "tailwind4", "ui": "shadcn" },
  "integrations": {
    "envValidation": true,
    "analytics": "posthog",
    "errorTracking": "sentry",
    "email": "none",
    "rateLimit": "none",
    "ai": "none"
  }
}

On this page