A package for generating Prisma PHP icons
npm install ppiconsnpx ppicons add anchor
npx ppicons add --all
npx ppicons update
ppicons add downloads and writes one component file. |
--all generates the entire icon set in one run. |
ppicons update refreshes existing generated icons safely. |
caspian.config.json → Python, prisma-php.json → PHP. |
--force overwrites existing files when explicitly requested. |
chevron-right → ChevronRight). |
bash
npx ppicons add anchor
`
$3
`bash
npx ppicons add --all
`
$3
`bash
npx ppicons update
`
$3
`bash
npx ppicons add anchor --force
npx ppicons add --all --force
`
---
Language selection (PHP vs Python)
The CLI supports:
- --lang php → generate PHPX components (Prisma PHP ecosystem)
- --lang py → generate Python components (Caspian ecosystem)
$3
If you do not pass --lang, ppicons-cli attempts to pick the right mode:
1. If caspian.config.json exists in the project root → Python mode
2. Else if prisma-php.json exists in the project root → PHP mode
3. Else → defaults to PHP mode
This makes it seamless to use inside Caspian projects without extra flags.
$3
`bash
Force Python output
npx ppicons add user --lang py
Force PHP output
npx ppicons add user --lang php
`
---
Usage reference
`bash
npx ppicons add [--all] [--force] [--lang php|py]
`
$3
- --all — generate all icons
- --force — overwrite existing files
- --lang php|py — explicitly choose output language
---
Using the generated icons
Because the generated artifacts are real components, you get:
- consistent sizing and attribute handling
- editor support (rename, search, “go to definition”, etc.)
- fewer UI regressions from inconsistent SVG markup
$3
Icons are generated as .py modules using PascalCase filenames.
Typical usage:
- treat the icon as a component/function
- pass standard attributes (class, width/height, etc.) via the component’s attribute mechanism
$3
Icons are generated as PHPX-compatible components with namespaces derived from the folder structure.
The stub is designed so icons behave like standard PHPX components and accept attributes cleanly.
---
Troubleshooting
$3
Pass --lang php explicitly:
`bash
npx ppicons add anchor --lang php
`
$3
Use --force:
`bash
npx ppicons add --all --force
``