From 12429d058a4275042c175114eb9f07b81ea985c4 Mon Sep 17 00:00:00 2001 From: HayzDev Date: Sat, 20 Jun 2026 22:05:42 -0700 Subject: [PATCH] Add Pi Coding Agent (pi.dev) as a first-class supported AI Adds `uipro init --ai pi` support so Pi users can install the UI/UX Pro Max skill without a manual file copy workaround. Files added: - src/ui-ux-pro-max/templates/platforms/pi.json - cli/assets/templates/platforms/pi.json (mirrors the above) Files modified: - cli/src/types/index.ts: added 'pi' to AIType union, AI_TYPES, and AI_FOLDERS (pi: ['.pi']) - cli/src/utils/template.ts: added 'pi': 'pi' to AI_TO_PLATFORM - cli/src/utils/detect.ts: detect .pi/ or ~/.pi/, add Pi case to getAITypeDescription - skill.json: added 'pi' to the platforms list - README.md: added `uipro init --ai pi` to the install list Verified locally: - bun build succeeds - 'uipro init --ai pi --offline' writes to .pi/agent/skills/ - python3 scripts/search.py with --design-system returns a complete design system spec Pi's skill discovery: directories with SKILL.md under ~/.pi/agent/skills/ are loaded recursively by the pi-coding-agent (via the standard Agent Skills spec). The folderStructure (root: '.pi', skillPath: 'agent/skills/ui-ux-pro-max') matches the user-global install location. Project-local installs also work because pi also discovers .pi/skills//SKILL.md at project scope. --- README.md | 1 + cli/assets/templates/platforms/pi.json | 21 +++++++++++++++++++ cli/src/types/index.ts | 10 +++++++-- cli/src/utils/detect.ts | 6 ++++++ cli/src/utils/template.ts | 1 + skill.json | 3 ++- src/ui-ux-pro-max/templates/platforms/pi.json | 21 +++++++++++++++++++ 7 files changed, 60 insertions(+), 3 deletions(-) create mode 100644 cli/assets/templates/platforms/pi.json create mode 100644 src/ui-ux-pro-max/templates/platforms/pi.json diff --git a/README.md b/README.md index 71bb41ec6..9ab9b7807 100755 --- a/README.md +++ b/README.md @@ -290,6 +290,7 @@ uipro init --ai droid # Droid (Factory) uipro init --ai kilocode # KiloCode uipro init --ai warp # Warp uipro init --ai augment # Augment +uipro init --ai pi # Pi Coding Agent (https://pi.dev) uipro init --ai all # All assistants ``` diff --git a/cli/assets/templates/platforms/pi.json b/cli/assets/templates/platforms/pi.json new file mode 100644 index 000000000..4d55c30c9 --- /dev/null +++ b/cli/assets/templates/platforms/pi.json @@ -0,0 +1,21 @@ +{ + "platform": "pi", + "displayName": "Pi Coding Agent", + "installType": "full", + "folderStructure": { + "root": ".pi", + "skillPath": "agent/skills/ui-ux-pro-max", + "filename": "SKILL.md" + }, + "scriptPath": "agent/skills/ui-ux-pro-max/scripts/search.py", + "frontmatter": { + "name": "ui-ux-pro-max", + "description": "UI/UX design intelligence. 67 styles, 96 palettes, 57 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples." + }, + "sections": { + "quickReference": true + }, + "title": "UI/UX Pro Max - Design Intelligence", + "description": "Comprehensive design guide for web and mobile applications. Contains 67 styles, 96 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 13 technology stacks. Searchable database with priority-based recommendations.", + "skillOrWorkflow": "Skill" +} diff --git a/cli/src/types/index.ts b/cli/src/types/index.ts index ab8385ada..d939b3496 100755 --- a/cli/src/types/index.ts +++ b/cli/src/types/index.ts @@ -1,4 +1,4 @@ -export type AIType = 'claude' | 'cursor' | 'windsurf' | 'antigravity' | 'copilot' | 'kiro' | 'roocode' | 'codex' | 'qoder' | 'gemini' | 'trae' | 'opencode' | 'continue' | 'codebuddy' | 'droid' | 'kilocode' | 'warp' | 'augment' | 'all'; +export type AIType = 'claude' | 'cursor' | 'windsurf' | 'antigravity' | 'copilot' | 'kiro' | 'roocode' | 'codex' | 'qoder' | 'gemini' | 'trae' | 'opencode' | 'continue' | 'codebuddy' | 'droid' | 'kilocode' | 'warp' | 'augment' | 'pi' | 'all'; export type InstallType = 'full' | 'reference'; @@ -41,7 +41,7 @@ export interface PlatformConfig { skillOrWorkflow: string; } -export const AI_TYPES: AIType[] = ['claude', 'cursor', 'windsurf', 'antigravity', 'copilot', 'roocode', 'kiro', 'codex', 'qoder', 'gemini', 'trae', 'opencode', 'continue', 'codebuddy', 'droid', 'kilocode', 'warp', 'augment', 'all']; +export const AI_TYPES: AIType[] = ['claude', 'cursor', 'windsurf', 'antigravity', 'copilot', 'roocode', 'kiro', 'codex', 'qoder', 'gemini', 'trae', 'opencode', 'continue', 'codebuddy', 'droid', 'kilocode', 'warp', 'augment', 'pi', 'all']; // Legacy folder mapping for backward compatibility with ZIP-based installs. // Note: .shared is included for platforms that used ZIP installs. Post-ZIP platforms @@ -65,4 +65,10 @@ export const AI_FOLDERS: Record, string[]> = { kilocode: ['.kilocode', '.shared'], warp: ['.warp', '.shared'], augment: ['.augment', '.shared'], + // Pi installs into ~/.pi/agent/skills//SKILL.md. The + // `.pi` folder is the conventional root for both project-local + // (.pi/skills/) and user-global (~/.pi/agent/skills/) skill discovery. + // The cli writes the skill under agent/skills/ to match the user + // global location; project-local discovery also picks this up. + pi: ['.pi'], }; diff --git a/cli/src/utils/detect.ts b/cli/src/utils/detect.ts index 26390614c..b90e684c7 100755 --- a/cli/src/utils/detect.ts +++ b/cli/src/utils/detect.ts @@ -1,5 +1,6 @@ import { existsSync } from 'node:fs'; import { join } from 'node:path'; +import { homedir } from 'node:os'; import type { AIType } from '../types/index.js'; interface DetectionResult { @@ -64,6 +65,9 @@ export function detectAIType(cwd: string = process.cwd()): DetectionResult { if (existsSync(join(cwd, '.augment'))) { detected.push('augment'); } + if (existsSync(join(cwd, '.pi')) || existsSync(join(homedir(), '.pi'))) { + detected.push('pi'); + } // Suggest based on what's detected let suggested: AIType | null = null; @@ -114,6 +118,8 @@ export function getAITypeDescription(aiType: AIType): string { return 'Warp (.warp/skills/)'; case 'augment': return 'Augment (.augment/skills/)'; + case 'pi': + return 'Pi Coding Agent (.pi/agent/skills/)'; case 'all': return 'All AI assistants'; } diff --git a/cli/src/utils/template.ts b/cli/src/utils/template.ts index 3223a6ead..1d0d3bf70 100755 --- a/cli/src/utils/template.ts +++ b/cli/src/utils/template.ts @@ -46,6 +46,7 @@ const AI_TO_PLATFORM: Record = { kilocode: 'kilocode', warp: 'warp', augment: 'augment', + pi: 'pi', }; async function exists(path: string): Promise { diff --git a/skill.json b/skill.json index 4c6748bf4..3f66ac4e7 100644 --- a/skill.json +++ b/skill.json @@ -35,7 +35,8 @@ "droid", "warp", "augment", - "antigravity" + "antigravity", + "pi" ], "install": "npx uipro-cli init --ai {{platform}}" } diff --git a/src/ui-ux-pro-max/templates/platforms/pi.json b/src/ui-ux-pro-max/templates/platforms/pi.json new file mode 100644 index 000000000..4d55c30c9 --- /dev/null +++ b/src/ui-ux-pro-max/templates/platforms/pi.json @@ -0,0 +1,21 @@ +{ + "platform": "pi", + "displayName": "Pi Coding Agent", + "installType": "full", + "folderStructure": { + "root": ".pi", + "skillPath": "agent/skills/ui-ux-pro-max", + "filename": "SKILL.md" + }, + "scriptPath": "agent/skills/ui-ux-pro-max/scripts/search.py", + "frontmatter": { + "name": "ui-ux-pro-max", + "description": "UI/UX design intelligence. 67 styles, 96 palettes, 57 font pairings, 25 charts, 13 stacks (React, Next.js, Vue, Svelte, SwiftUI, React Native, Flutter, Tailwind, shadcn/ui). Actions: plan, build, create, design, implement, review, fix, improve, optimize, enhance, refactor, check UI/UX code. Projects: website, landing page, dashboard, admin panel, e-commerce, SaaS, portfolio, blog, mobile app, .html, .tsx, .vue, .svelte. Elements: button, modal, navbar, sidebar, card, table, form, chart. Styles: glassmorphism, claymorphism, minimalism, brutalism, neumorphism, bento grid, dark mode, responsive, skeuomorphism, flat design. Topics: color palette, accessibility, animation, layout, typography, font pairing, spacing, hover, shadow, gradient. Integrations: shadcn/ui MCP for component search and examples." + }, + "sections": { + "quickReference": true + }, + "title": "UI/UX Pro Max - Design Intelligence", + "description": "Comprehensive design guide for web and mobile applications. Contains 67 styles, 96 color palettes, 57 font pairings, 99 UX guidelines, and 25 chart types across 13 technology stacks. Searchable database with priority-based recommendations.", + "skillOrWorkflow": "Skill" +}