CLI Commands
A complete reference for every command exposed by the @pphatdev/registry CLI (v1.4.0).
You can run the CLI via global installation (pphat) or directly via npx. The following invocations are equivalent:
npx pphat <command>npx pphatdev <command>npx @pphatdev/registry <command>init
Interactively initializes project preferences and generates a pphatdev.json file in the project root.
npx pphat initPrompts will guide you through selecting resource types (icons, components), formats (SVG, Next.js, Nuxt.js), and storage paths.
config
View and update configuration settings interactively or programmatically.
Interactive Configuration
npx pphat configGet Configuration
npx pphat config getnpx pphat config get icons.nextjs.dirSet Configuration
npx pphat config set icons.nextjs.use truelist / ls
Lists available icons or components in the registry with interactive page-by-page browsing.
npx pphat list iconsnpx pphat ls componentsadd
Parent command that downloads icons or components using a subcommand grammar. Both forms below are equivalent — pick whichever reads best in your workflow.
add icon <names…>
npx pphat add icon react vue githubadd component <names…>
npx pphat add component button card modalLegacy shortcut
For backwards compatibility, add <name> with no subcommand is treated as add icon <name>:
npx pphat add react vueOptions (apply to every form)
| Flag | Long flag | Description |
| --- | --- | --- |
| -f | --format <fmt> | Output format (svg, nextjs, nuxtjs) |
| -d | --dir <path> | Destination directory |
add-icon
Hyphenated alias for add icon. Downloads one or multiple icons from the registry into your project.
npx pphat add-icon react vue githubOptions
| Flag | Long flag | Description |
| --- | --- | --- |
| -f | --format <fmt> | Output format (svg, nextjs, nuxtjs) |
| -d | --dir <path> | Destination directory |
Examples
npx pphat add-icon react vue -d src/assets/iconsnpx pphat add-icon github -f nextjsadd-component / add-comp
Hyphenated alias for add component. Downloads one or multiple UI components.
npx pphat add-component button card modalOptions
| Flag | Long flag | Description |
| --- | --- | --- |
| -f | --format <fmt> | Output format (nextjs, nuxtjs) |
| -d | --dir <path> | Destination directory |
Examples
npx pphat add-component button -f nextjs -d src/components/uinpx pphat add-comp card modalremove
Parent command that deletes previously downloaded icons or components. It mirrors add's path resolution, so it only removes files an equivalent add would have written. Missing files are treated as "already gone" — no error, exit 0.
remove icon <names…>
npx pphat remove icon react vueremove component <names…>
npx pphat remove component button cardOptions (apply to every form)
| Flag | Long flag | Description |
| --- | --- | --- |
| -f | --format <fmt> | Restrict removal to one format (svg, nextjs, nuxtjs) |
| -d | --dir <path> | Restrict removal to a specific directory |
Reports Removed X (N files) per format.
remove-icon
Hyphenated alias for remove icon.
npx pphat remove-icon react vuenpx pphat remove-icon react -f svg -d public/iconsremove-component / remove-comp
Hyphenated alias for remove component.
npx pphat remove-component button cardnpx pphat remove-comp modal -f nextjs -d src/components/ui