create (and integrate)

Docs

create writes a runnable Next.js app wearing your design system. integrate is not supported for now; see the end of How it works.

How to use it

npx designsource create [folder] [--no-screens] [--token <project token>] [--api <origin>] [--force]
npx designsource integrate [folder] [--framework vue|svelte|angular|css] [--token <project token>] [--api <origin>] [--force]

create takes a new or empty folder (default my-design-system) and prints the next steps in the dialect of the runner you used (pnpm, npm, yarn or bun).

Flag Does
folder The target. New or empty for create; the app's folder for integrate.
--no-screens create only: leave the project's screens out of the app.
--framework integrate only: vue, svelte, angular or css.
--token The project token, or DS_SYNC_TOKEN; else the one connect saved for the folder; else your login sign-in when the folder is linked to a design system.
--api Another server.
--force Overwrite the files the command writes when they already exist.

How it works

create writes Tailwind v4 with the shadcn theme built from your tokens, the 62 components under components/ui, a front page on /, and the design system under /design-system: the component gallery, every block on its own route, the sample pages and your mockup page, with light and dark through next-themes. Your project's screens come along: each on /app/<name> inside a sidebar shell, /app listing them, and the section's Screens view at /design-system/screens. Marketing pages come along too, on their own routes inside a site menu and footer: the home page replaces the starter's front page at /, and the others sit at /<name>. --no-screens leaves all of that out, and a project with no screens still gets the shell and an /app that says so. Font imports for a Google font go above Tailwind's import. The app pins the Next.js version this release was verified against; a pnpm run pins packageManager.

create writes every file in one pass and rolls back what it created on a failure.

integrate is not supported for now: DS source supports React apps only. It still runs, printing that line first, but it may change or go away.

What can go wrong

  • A non-empty folder stops create. --force overwrites.
  • integrate is not supported for now: DS source supports React apps. It still runs, but it may change or go away.
  • On the free plan create stops with the Pro line; see CLI errors.