dgadd init
Initialize installer configuration before adding registry items.
Usage
Before publication: Diffgazer packages are not yet published to npm, so there is no dgadd bin until you install one. Follow the canonical Copy-first mode procedure to build and pack @diffgazer/add, then install that packed tarball in the target app. The target-app install is what puts dgadd on pnpm exec.
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.