pphat.me logoRegistry
Docs/commands

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 init

Prompts 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 config

Get Configuration

npx pphat config get
npx pphat config get icons.nextjs.dir

Set Configuration

npx pphat config set icons.nextjs.use true

list / ls

Lists available icons or components in the registry with interactive page-by-page browsing.

npx pphat list icons
npx pphat ls components

add

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 github

add component <names…>

npx pphat add component button card modal

Legacy shortcut

For backwards compatibility, add <name> with no subcommand is treated as add icon <name>:

npx pphat add react vue

Options (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 github

Options

| 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/icons
npx pphat add-icon github -f nextjs

add-component / add-comp

Hyphenated alias for add component. Downloads one or multiple UI components.

npx pphat add-component button card modal

Options

| 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/ui
npx pphat add-comp card modal

remove

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 vue

remove component <names…>

npx pphat remove component button card

Options (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 vue
npx pphat remove-icon react -f svg -d public/icons

remove-component / remove-comp

Hyphenated alias for remove component.

npx pphat remove-component button card
npx pphat remove-comp modal -f nextjs -d src/components/ui