dgadd init
Initialize installer configuration before adding registry items.
Usage
npm packages: @diffgazer/add is on npm. pnpm add -D @diffgazer/add puts dgadd on pnpm exec, and npx @diffgazer/add <command> runs it without the install. Components also install without dgadd from the hosted registry: npx shadcn add https://r.b4r7.dev/r/ui/<item>.json.
What it does
-
Detects your project configuration:
- Package manager
- Tailwind CSS version
- TypeScript path aliases
- Source directory (
src/or root)
-
Creates
diffgazer.jsonwith aliases for components, hooks, and utilities. -
Creates install directories:
src/components/ui/for UI componentssrc/hooks/for copied hookssrc/lib/for shared utilities
-
Installs required dependencies.
-
Copies
src/styles/theme.cssandsrc/styles/styles.css.
It does not edit tsconfig.json, Vite, Next, or your app CSS entrypoint. Configure a TypeScript or Vite source alias such as @/* or ~/* in the app before running init, or pass --allow-missing-alias only when your tooling already resolves source aliases.
Options
--reset-manifest is a destructive recovery operation. It removes the ownership ledger from diffgazer.json without deleting previously installed files, so subsequent dgadd diff and dgadd remove commands can no longer track those orphaned files.