原始内容
pi-ci
Pi-native GitHub Actions workflow generator for pi.dev extensions.
Installation
pi install npm:@realvendex/pi-ci
What It Does
Generate GitHub Actions workflow YAML files pre-configured for pi.dev extension development. Supports three templates (minimal, default, full) with pre-wired jobs for vitest, biome, tsc, npm publish, and GitHub Release.
Tools
ci_generate
Generate a GitHub Actions CI workflow YAML file.
Parameters:
template(string, optional) —'minimal','default', or'full'(default:'default')packageName(string, optional) — Package name for npm publish stepnodeVersion(string, optional) — Node.js version (default:'22')includePublish(boolean, optional) — Include npm publish job (default: false)includeRelease(boolean, optional) — Include GitHub Release job (default: false)
Example:
Use the ci_generate tool with template="full" packageName="@realvendex/my-ext"
ci_validate
Validate an existing workflow YAML against pi.dev conventions.
Parameters:
yaml(string, required) — GitHub Actions workflow YAML content to validatestrict(boolean, optional) — Enable strict pi.dev convention checks (default: false)
Example:
Use the ci_validate tool with yaml="<your workflow YAML>" strict=true
ci_init
Scaffold a .github/workflows/ directory with a generated CI workflow.
Parameters:
template(string, optional) —'minimal','default', or'full'(default:'default')packageName(string, optional) — Package name for npm publish stepdryRun(boolean, optional) — Preview without writing files (default: false)
Example:
Use the ci_init tool with template="default" dryRun=true
Templates
| Template | Jobs | Use Case |
|---|---|---|
| minimal | CI only | Simple projects |
| default | CI + optional publish | Standard extensions |
| full | CI + publish + GitHub Release | Full release automation |
Pre-wired Jobs
- ci — Runs on every push/PR:
biome check,tsc --noEmit,vitest run - publish — Publishes to npm on tag push (requires
NPM_TOKENsecret) - release — Creates GitHub Release on tag push
Resources
License
MIT