Phi
CLI
@dicehub/phiv1.0.0-beta.1

Commands

Run the CLI through your package manager. All commands are non-interactive.

Help

pnpm dlx @dicehub/phi@beta help

Initialize the config once per project

pnpm dlx @dicehub/phi@beta init

List installable blocks

pnpm dlx @dicehub/phi@beta blocks

Install a block

pnpm dlx @dicehub/phi@beta add PageHeader

Configuration

phi init writes a phi.json in the project root. TheblocksDir sets where phi add copies block source, relative to the project root.

{
  "schemaVersion": 1,
  "blocksDir": "src/components/phi"
}

Choose a different directory with --blocks-dir, and overwrite an existing config with--force:

pnpm dlx @dicehub/phi@beta init --blocks-dir app/ui --force

Behavior

  • phi add requires a valid phi.json; phi blocks works without one.
  • Block names are exact and case-sensitive.
  • Existing files abort the install. --force replaces only the files declared by that block.
  • The CLI never deletes files, runs package managers, executes shell commands, or downloads content.
  • Copied templates keep their final @dicehub/phi imports; no import rewriting happens.

Installed blocks are your source code. They stay pinned to the Phi components they import, but you can edit the copied files freely.