ui-pro-forge-cli 2.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +99 -0
- package/assets/data/app-interface.csv +31 -0
- package/assets/data/charts.csv +26 -0
- package/assets/data/colors.csv +194 -0
- package/assets/data/google-fonts.csv +1924 -0
- package/assets/data/icons.csv +106 -0
- package/assets/data/landing.csv +35 -0
- package/assets/data/motion.csv +17 -0
- package/assets/data/products.csv +193 -0
- package/assets/data/react-performance.csv +45 -0
- package/assets/data/stacks/angular.csv +51 -0
- package/assets/data/stacks/astro.csv +54 -0
- package/assets/data/stacks/avalonia.csv +57 -0
- package/assets/data/stacks/flutter.csv +53 -0
- package/assets/data/stacks/html-tailwind.csv +56 -0
- package/assets/data/stacks/javafx.csv +76 -0
- package/assets/data/stacks/jetpack-compose.csv +53 -0
- package/assets/data/stacks/laravel.csv +51 -0
- package/assets/data/stacks/nextjs.csv +53 -0
- package/assets/data/stacks/nuxt-ui.csv +71 -0
- package/assets/data/stacks/nuxtjs.csv +59 -0
- package/assets/data/stacks/react-native.csv +52 -0
- package/assets/data/stacks/react.csv +54 -0
- package/assets/data/stacks/shadcn.csv +61 -0
- package/assets/data/stacks/solidjs.csv +21 -0
- package/assets/data/stacks/svelte.csv +54 -0
- package/assets/data/stacks/swiftui.csv +51 -0
- package/assets/data/stacks/threejs.csv +54 -0
- package/assets/data/stacks/uno.csv +60 -0
- package/assets/data/stacks/vue.csv +50 -0
- package/assets/data/stacks/winui.csv +60 -0
- package/assets/data/styles.csv +86 -0
- package/assets/data/typography.csv +75 -0
- package/assets/data/ui-reasoning.csv +162 -0
- package/assets/data/ux-guidelines.csv +100 -0
- package/assets/scripts/core.py +463 -0
- package/assets/scripts/design_system.py +1371 -0
- package/assets/scripts/search.py +162 -0
- package/assets/scripts/tests/test_core.py +134 -0
- package/assets/scripts/validate_data.py +114 -0
- package/assets/skills/banner-design/SKILL.md +196 -0
- package/assets/skills/banner-design/references/banner-sizes-and-styles.md +118 -0
- package/assets/skills/brand/SKILL.md +97 -0
- package/assets/skills/brand/references/approval-checklist.md +169 -0
- package/assets/skills/brand/references/asset-organization.md +157 -0
- package/assets/skills/brand/references/brand-guideline-template.md +140 -0
- package/assets/skills/brand/references/color-palette-management.md +186 -0
- package/assets/skills/brand/references/consistency-checklist.md +94 -0
- package/assets/skills/brand/references/logo-usage-rules.md +185 -0
- package/assets/skills/brand/references/messaging-framework.md +85 -0
- package/assets/skills/brand/references/typography-specifications.md +214 -0
- package/assets/skills/brand/references/update.md +118 -0
- package/assets/skills/brand/references/visual-identity.md +96 -0
- package/assets/skills/brand/references/voice-framework.md +88 -0
- package/assets/skills/brand/scripts/extract-colors.cjs +341 -0
- package/assets/skills/brand/scripts/inject-brand-context.cjs +349 -0
- package/assets/skills/brand/scripts/sync-brand-to-tokens.cjs +248 -0
- package/assets/skills/brand/scripts/tests/test_sync_brand_to_tokens.py +52 -0
- package/assets/skills/brand/scripts/validate-asset.cjs +387 -0
- package/assets/skills/brand/templates/brand-guidelines-starter.md +275 -0
- package/assets/skills/design/SKILL.md +313 -0
- package/assets/skills/design/data/cip/deliverables.csv +51 -0
- package/assets/skills/design/data/cip/industries.csv +21 -0
- package/assets/skills/design/data/cip/mockup-contexts.csv +21 -0
- package/assets/skills/design/data/cip/styles.csv +21 -0
- package/assets/skills/design/data/icon/styles.csv +16 -0
- package/assets/skills/design/data/logo/colors.csv +56 -0
- package/assets/skills/design/data/logo/industries.csv +56 -0
- package/assets/skills/design/data/logo/styles.csv +56 -0
- package/assets/skills/design/references/banner-sizes-and-styles.md +118 -0
- package/assets/skills/design/references/cip-deliverable-guide.md +95 -0
- package/assets/skills/design/references/cip-design.md +121 -0
- package/assets/skills/design/references/cip-prompt-engineering.md +84 -0
- package/assets/skills/design/references/cip-style-guide.md +68 -0
- package/assets/skills/design/references/design-routing.md +207 -0
- package/assets/skills/design/references/icon-design.md +122 -0
- package/assets/skills/design/references/logo-color-psychology.md +101 -0
- package/assets/skills/design/references/logo-design.md +92 -0
- package/assets/skills/design/references/logo-prompt-engineering.md +158 -0
- package/assets/skills/design/references/logo-style-guide.md +109 -0
- package/assets/skills/design/references/slides-copywriting-formulas.md +84 -0
- package/assets/skills/design/references/slides-create.md +4 -0
- package/assets/skills/design/references/slides-html-template.md +295 -0
- package/assets/skills/design/references/slides-layout-patterns.md +137 -0
- package/assets/skills/design/references/slides-strategies.md +94 -0
- package/assets/skills/design/references/slides.md +42 -0
- package/assets/skills/design/references/social-photos-design.md +329 -0
- package/assets/skills/design/scripts/cip/core.py +215 -0
- package/assets/skills/design/scripts/cip/generate.py +484 -0
- package/assets/skills/design/scripts/cip/render-html.py +424 -0
- package/assets/skills/design/scripts/cip/search.py +127 -0
- package/assets/skills/design/scripts/icon/generate.py +487 -0
- package/assets/skills/design/scripts/logo/core.py +175 -0
- package/assets/skills/design/scripts/logo/generate.py +362 -0
- package/assets/skills/design/scripts/logo/search.py +114 -0
- package/assets/skills/design-system/SKILL.md +244 -0
- package/assets/skills/design-system/data/slide-backgrounds.csv +11 -0
- package/assets/skills/design-system/data/slide-charts.csv +26 -0
- package/assets/skills/design-system/data/slide-color-logic.csv +14 -0
- package/assets/skills/design-system/data/slide-copy.csv +26 -0
- package/assets/skills/design-system/data/slide-layout-logic.csv +16 -0
- package/assets/skills/design-system/data/slide-layouts.csv +26 -0
- package/assets/skills/design-system/data/slide-strategies.csv +16 -0
- package/assets/skills/design-system/data/slide-typography.csv +15 -0
- package/assets/skills/design-system/references/component-specs.md +236 -0
- package/assets/skills/design-system/references/component-tokens.md +214 -0
- package/assets/skills/design-system/references/primitive-tokens.md +203 -0
- package/assets/skills/design-system/references/semantic-tokens.md +215 -0
- package/assets/skills/design-system/references/states-and-variants.md +241 -0
- package/assets/skills/design-system/references/tailwind-integration.md +251 -0
- package/assets/skills/design-system/references/token-architecture.md +224 -0
- package/assets/skills/design-system/scripts/embed-tokens.cjs +99 -0
- package/assets/skills/design-system/scripts/fetch-background.py +317 -0
- package/assets/skills/design-system/scripts/generate-slide.py +770 -0
- package/assets/skills/design-system/scripts/generate-tokens.cjs +205 -0
- package/assets/skills/design-system/scripts/html-token-validator.py +327 -0
- package/assets/skills/design-system/scripts/search-slides.py +218 -0
- package/assets/skills/design-system/scripts/slide-token-validator.py +35 -0
- package/assets/skills/design-system/scripts/slide_search_core.py +453 -0
- package/assets/skills/design-system/scripts/tests/test_validate_tokens.py +48 -0
- package/assets/skills/design-system/scripts/validate-tokens.cjs +246 -0
- package/assets/skills/design-system/templates/design-tokens-starter.json +143 -0
- package/assets/skills/slides/SKILL.md +40 -0
- package/assets/skills/slides/references/copywriting-formulas.md +84 -0
- package/assets/skills/slides/references/create.md +4 -0
- package/assets/skills/slides/references/html-template.md +295 -0
- package/assets/skills/slides/references/layout-patterns.md +137 -0
- package/assets/skills/slides/references/slide-strategies.md +94 -0
- package/assets/skills/ui-styling/LICENSE.txt +202 -0
- package/assets/skills/ui-styling/SKILL.md +324 -0
- package/assets/skills/ui-styling/references/canvas-design-system.md +320 -0
- package/assets/skills/ui-styling/references/shadcn-accessibility.md +471 -0
- package/assets/skills/ui-styling/references/shadcn-components.md +424 -0
- package/assets/skills/ui-styling/references/shadcn-theming.md +373 -0
- package/assets/skills/ui-styling/references/tailwind-customization.md +483 -0
- package/assets/skills/ui-styling/references/tailwind-responsive.md +382 -0
- package/assets/skills/ui-styling/references/tailwind-utilities.md +455 -0
- package/assets/skills/ui-styling/scripts/requirements.txt +17 -0
- package/assets/skills/ui-styling/scripts/shadcn_add.py +308 -0
- package/assets/skills/ui-styling/scripts/tailwind_config_gen.py +473 -0
- package/assets/skills/ui-styling/scripts/tests/coverage-ui.json +1 -0
- package/assets/skills/ui-styling/scripts/tests/requirements.txt +3 -0
- package/assets/skills/ui-styling/scripts/tests/test_shadcn_add.py +266 -0
- package/assets/skills/ui-styling/scripts/tests/test_tailwind_config_gen.py +394 -0
- package/assets/templates/base/quick-reference.md +297 -0
- package/assets/templates/base/skill-content.md +384 -0
- package/assets/templates/platforms/agent.json +21 -0
- package/assets/templates/platforms/augment.json +18 -0
- package/assets/templates/platforms/claude.json +21 -0
- package/assets/templates/platforms/codebuddy.json +21 -0
- package/assets/templates/platforms/codewhale.json +21 -0
- package/assets/templates/platforms/codex.json +21 -0
- package/assets/templates/platforms/continue.json +21 -0
- package/assets/templates/platforms/copilot.json +21 -0
- package/assets/templates/platforms/cursor.json +21 -0
- package/assets/templates/platforms/droid.json +21 -0
- package/assets/templates/platforms/gemini.json +21 -0
- package/assets/templates/platforms/kilocode.json +21 -0
- package/assets/templates/platforms/kiro.json +21 -0
- package/assets/templates/platforms/opencode.json +21 -0
- package/assets/templates/platforms/qoder.json +21 -0
- package/assets/templates/platforms/roocode.json +21 -0
- package/assets/templates/platforms/trae.json +21 -0
- package/assets/templates/platforms/warp.json +18 -0
- package/assets/templates/platforms/windsurf.json +21 -0
- package/dist/commands/init.d.ts +11 -0
- package/dist/commands/init.js +165 -0
- package/dist/commands/uninstall.d.ts +7 -0
- package/dist/commands/uninstall.js +131 -0
- package/dist/commands/update.d.ts +7 -0
- package/dist/commands/update.js +73 -0
- package/dist/commands/versions.d.ts +5 -0
- package/dist/commands/versions.js +36 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +78 -0
- package/dist/types/index.d.ts +40 -0
- package/dist/types/index.js +25 -0
- package/dist/utils/detect.d.ts +8 -0
- package/dist/utils/detect.js +115 -0
- package/dist/utils/extract.d.ts +15 -0
- package/dist/utils/extract.js +125 -0
- package/dist/utils/github.d.ts +12 -0
- package/dist/utils/github.js +97 -0
- package/dist/utils/logger.d.ts +8 -0
- package/dist/utils/logger.js +9 -0
- package/dist/utils/template.d.ts +50 -0
- package/dist/utils/template.js +249 -0
- package/package.json +65 -0
|
@@ -0,0 +1,249 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { readFile, mkdir, writeFile, cp, access, readdir, lstat, rm } from 'node:fs/promises';
|
|
3
|
+
import { join, dirname } from 'node:path';
|
|
4
|
+
import { homedir } from 'node:os';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
6
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
7
|
+
const ASSETS_CANDIDATES = [
|
|
8
|
+
// Bun bundle: dist/index.js
|
|
9
|
+
join(__dirname, '..', 'assets'),
|
|
10
|
+
// TypeScript fallback: dist/utils/template.js
|
|
11
|
+
join(__dirname, '..', '..', 'assets'),
|
|
12
|
+
];
|
|
13
|
+
const ASSETS_DIR = ASSETS_CANDIDATES.find(path => existsSync(path)) ?? ASSETS_CANDIDATES[0];
|
|
14
|
+
// Map AIType to platform config file name
|
|
15
|
+
const AI_TO_PLATFORM = {
|
|
16
|
+
claude: 'claude',
|
|
17
|
+
cursor: 'cursor',
|
|
18
|
+
windsurf: 'windsurf',
|
|
19
|
+
antigravity: 'agent',
|
|
20
|
+
copilot: 'copilot',
|
|
21
|
+
kiro: 'kiro',
|
|
22
|
+
opencode: 'opencode',
|
|
23
|
+
roocode: 'roocode',
|
|
24
|
+
codex: 'codex',
|
|
25
|
+
qoder: 'qoder',
|
|
26
|
+
gemini: 'gemini',
|
|
27
|
+
trae: 'trae',
|
|
28
|
+
continue: 'continue',
|
|
29
|
+
codebuddy: 'codebuddy',
|
|
30
|
+
droid: 'droid',
|
|
31
|
+
kilocode: 'kilocode',
|
|
32
|
+
warp: 'warp',
|
|
33
|
+
augment: 'augment',
|
|
34
|
+
codewhale: 'codewhale',
|
|
35
|
+
};
|
|
36
|
+
async function exists(path) {
|
|
37
|
+
try {
|
|
38
|
+
await access(path);
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
catch {
|
|
42
|
+
return false;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Load platform configuration from JSON file
|
|
47
|
+
*/
|
|
48
|
+
export async function loadPlatformConfig(aiType) {
|
|
49
|
+
const platformName = AI_TO_PLATFORM[aiType];
|
|
50
|
+
if (!platformName) {
|
|
51
|
+
throw new Error(`Unknown AI type: ${aiType}`);
|
|
52
|
+
}
|
|
53
|
+
const configPath = join(ASSETS_DIR, 'templates', 'platforms', `${platformName}.json`);
|
|
54
|
+
const content = await readFile(configPath, 'utf-8');
|
|
55
|
+
return JSON.parse(content);
|
|
56
|
+
}
|
|
57
|
+
/**
|
|
58
|
+
* Load all available platform configs
|
|
59
|
+
*/
|
|
60
|
+
export async function loadAllPlatformConfigs() {
|
|
61
|
+
const configs = new Map();
|
|
62
|
+
for (const [aiType, platformName] of Object.entries(AI_TO_PLATFORM)) {
|
|
63
|
+
try {
|
|
64
|
+
const config = await loadPlatformConfig(aiType);
|
|
65
|
+
configs.set(aiType, config);
|
|
66
|
+
}
|
|
67
|
+
catch {
|
|
68
|
+
// Skip if config doesn't exist
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
return configs;
|
|
72
|
+
}
|
|
73
|
+
/**
|
|
74
|
+
* Load a template file
|
|
75
|
+
*/
|
|
76
|
+
async function loadTemplate(templateName) {
|
|
77
|
+
const templatePath = join(ASSETS_DIR, 'templates', templateName);
|
|
78
|
+
return readFile(templatePath, 'utf-8');
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Render frontmatter section
|
|
82
|
+
*/
|
|
83
|
+
function renderFrontmatter(frontmatter) {
|
|
84
|
+
if (!frontmatter)
|
|
85
|
+
return '';
|
|
86
|
+
const lines = ['---'];
|
|
87
|
+
for (const [key, value] of Object.entries(frontmatter)) {
|
|
88
|
+
// Quote values that contain special characters
|
|
89
|
+
if (value.includes(':') || value.includes('"') || value.includes('\n')) {
|
|
90
|
+
lines.push(`${key}: "${value.replace(/"/g, '\\"')}"`);
|
|
91
|
+
}
|
|
92
|
+
else {
|
|
93
|
+
lines.push(`${key}: ${value}`);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
lines.push('---', '');
|
|
97
|
+
return lines.join('\n');
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Render skill file content from template
|
|
101
|
+
* When isGlobal=true, rewrites script paths to use ~/{root}/ prefix
|
|
102
|
+
*/
|
|
103
|
+
export async function renderSkillFile(config, isGlobal = false) {
|
|
104
|
+
// Load base template
|
|
105
|
+
let content = await loadTemplate('base/skill-content.md');
|
|
106
|
+
// Load quick reference if needed
|
|
107
|
+
let quickReferenceContent = '';
|
|
108
|
+
if (config.sections.quickReference) {
|
|
109
|
+
quickReferenceContent = await loadTemplate('base/quick-reference.md');
|
|
110
|
+
}
|
|
111
|
+
// Build the final content
|
|
112
|
+
const frontmatter = renderFrontmatter(config.frontmatter);
|
|
113
|
+
// Replace placeholders
|
|
114
|
+
// Add newline before quick reference content if it exists
|
|
115
|
+
const quickRefWithNewline = quickReferenceContent ? '\n' + quickReferenceContent : '';
|
|
116
|
+
content = content
|
|
117
|
+
.replace(/\{\{TITLE\}\}/g, config.title)
|
|
118
|
+
.replace(/\{\{DESCRIPTION\}\}/g, config.description)
|
|
119
|
+
.replace(/\{\{SCRIPT_PATH\}\}/g, config.scriptPath)
|
|
120
|
+
.replace(/\{\{SKILL_OR_WORKFLOW\}\}/g, config.skillOrWorkflow)
|
|
121
|
+
.replace(/\{\{QUICK_REFERENCE\}\}/g, quickRefWithNewline);
|
|
122
|
+
// For global install, rewrite relative script paths to absolute ~/root/ paths
|
|
123
|
+
if (isGlobal) {
|
|
124
|
+
const globalPrefix = `~/${config.folderStructure.root}/`;
|
|
125
|
+
content = content.replace(/python3 skills\//g, `python3 ${globalPrefix}skills/`);
|
|
126
|
+
}
|
|
127
|
+
return frontmatter + content;
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Replace a pre-existing non-directory at `path` so a real directory can be
|
|
131
|
+
* created there. Older CLI installs (and Windows checkouts of the repo's
|
|
132
|
+
* symlinked data/scripts) can leave plain "pointer" files at these paths;
|
|
133
|
+
* mkdir then throws EEXIST and the install silently leaves stale files.
|
|
134
|
+
*/
|
|
135
|
+
async function ensureCleanDir(path) {
|
|
136
|
+
try {
|
|
137
|
+
const stat = await lstat(path);
|
|
138
|
+
if (!stat.isDirectory()) {
|
|
139
|
+
await rm(path, { recursive: true, force: true });
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
catch {
|
|
143
|
+
// Nothing exists at the path yet — mkdir will create it.
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
/**
|
|
147
|
+
* Copy data and scripts to target directory
|
|
148
|
+
*/
|
|
149
|
+
async function copyDataAndScripts(targetSkillDir) {
|
|
150
|
+
const dataSource = join(ASSETS_DIR, 'data');
|
|
151
|
+
const scriptsSource = join(ASSETS_DIR, 'scripts');
|
|
152
|
+
const dataTarget = join(targetSkillDir, 'data');
|
|
153
|
+
const scriptsTarget = join(targetSkillDir, 'scripts');
|
|
154
|
+
// Copy data
|
|
155
|
+
if (await exists(dataSource)) {
|
|
156
|
+
await ensureCleanDir(dataTarget);
|
|
157
|
+
await mkdir(dataTarget, { recursive: true });
|
|
158
|
+
await cp(dataSource, dataTarget, { recursive: true });
|
|
159
|
+
}
|
|
160
|
+
// Copy scripts
|
|
161
|
+
if (await exists(scriptsSource)) {
|
|
162
|
+
await ensureCleanDir(scriptsTarget);
|
|
163
|
+
await mkdir(scriptsTarget, { recursive: true });
|
|
164
|
+
await cp(scriptsSource, scriptsTarget, { recursive: true });
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
/**
|
|
168
|
+
* List the static sub-skills bundled under assets/skills/ (everything except
|
|
169
|
+
* the template-rendered orchestrator). Empty if the package predates bundling.
|
|
170
|
+
*/
|
|
171
|
+
export async function listBundledSubSkills() {
|
|
172
|
+
const skillsSource = join(ASSETS_DIR, 'skills');
|
|
173
|
+
if (!(await exists(skillsSource)))
|
|
174
|
+
return [];
|
|
175
|
+
const entries = await readdir(skillsSource, { withFileTypes: true });
|
|
176
|
+
return entries.filter(e => e.isDirectory()).map(e => e.name).sort();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Install the bundled sub-skills as siblings of the orchestrator skill, so a
|
|
180
|
+
* single `uipro init` delivers all 7 skills instead of only ui-pro-forge.
|
|
181
|
+
*/
|
|
182
|
+
async function copySubSkills(skillsParentDir, force) {
|
|
183
|
+
const skillsSource = join(ASSETS_DIR, 'skills');
|
|
184
|
+
if (!(await exists(skillsSource)))
|
|
185
|
+
return;
|
|
186
|
+
for (const name of await listBundledSubSkills()) {
|
|
187
|
+
const target = join(skillsParentDir, name);
|
|
188
|
+
if (await exists(target) && !force)
|
|
189
|
+
continue;
|
|
190
|
+
await mkdir(target, { recursive: true });
|
|
191
|
+
await cp(join(skillsSource, name), target, { recursive: true });
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Generate platform files for a specific AI type
|
|
196
|
+
* All platforms use self-contained installation with data and scripts
|
|
197
|
+
* When isGlobal=true, installs to ~/home directory with absolute script paths
|
|
198
|
+
*/
|
|
199
|
+
export async function generatePlatformFiles(targetDir, aiType, isGlobal = false, force = false) {
|
|
200
|
+
const config = await loadPlatformConfig(aiType);
|
|
201
|
+
const createdFolders = [];
|
|
202
|
+
// For global install, target the user's home directory
|
|
203
|
+
const effectiveDir = isGlobal ? homedir() : targetDir;
|
|
204
|
+
// Determine full skill directory path
|
|
205
|
+
const skillDir = join(effectiveDir, config.folderStructure.root, config.folderStructure.skillPath);
|
|
206
|
+
// Create directory structure
|
|
207
|
+
await mkdir(skillDir, { recursive: true });
|
|
208
|
+
// Render and write skill file (pass isGlobal to adjust paths)
|
|
209
|
+
const skillContent = await renderSkillFile(config, isGlobal);
|
|
210
|
+
const skillFilePath = join(skillDir, config.folderStructure.filename);
|
|
211
|
+
const fileAlreadyExists = await exists(skillFilePath);
|
|
212
|
+
if (fileAlreadyExists && !force) {
|
|
213
|
+
console.log(` Skipped (already exists): ${skillFilePath} — use --force to overwrite`);
|
|
214
|
+
return [];
|
|
215
|
+
}
|
|
216
|
+
await writeFile(skillFilePath, skillContent, 'utf-8');
|
|
217
|
+
createdFolders.push(config.folderStructure.root);
|
|
218
|
+
// Copy data and scripts into the skill directory (self-contained)
|
|
219
|
+
await copyDataAndScripts(skillDir);
|
|
220
|
+
// Install the sibling sub-skills (banner-design, brand, design, ...) next to
|
|
221
|
+
// the orchestrator so all 7 skills are delivered. The skills parent is the
|
|
222
|
+
// orchestrator's parent dir (skills/ for most platforms, prompts/ for
|
|
223
|
+
// copilot, steering/ for kiro) — derived, not hardcoded.
|
|
224
|
+
const skillsParentDir = join(effectiveDir, config.folderStructure.root, dirname(config.folderStructure.skillPath));
|
|
225
|
+
await copySubSkills(skillsParentDir, force);
|
|
226
|
+
return createdFolders;
|
|
227
|
+
}
|
|
228
|
+
/**
|
|
229
|
+
* Generate files for all AI types
|
|
230
|
+
*/
|
|
231
|
+
export async function generateAllPlatformFiles(targetDir, isGlobal = false, force = false) {
|
|
232
|
+
const allFolders = new Set();
|
|
233
|
+
for (const aiType of Object.keys(AI_TO_PLATFORM)) {
|
|
234
|
+
try {
|
|
235
|
+
const folders = await generatePlatformFiles(targetDir, aiType, isGlobal, force);
|
|
236
|
+
folders.forEach(f => allFolders.add(f));
|
|
237
|
+
}
|
|
238
|
+
catch {
|
|
239
|
+
// Skip if generation fails for a platform
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return Array.from(allFolders);
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Get list of supported AI types
|
|
246
|
+
*/
|
|
247
|
+
export function getSupportedAITypes() {
|
|
248
|
+
return Object.keys(AI_TO_PLATFORM);
|
|
249
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "ui-pro-forge-cli",
|
|
3
|
+
"version": "2.5.0",
|
|
4
|
+
"description": "CLI to install UI Pro Forge skill for AI coding assistants",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"uiforge": "dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"assets"
|
|
12
|
+
],
|
|
13
|
+
"scripts": {
|
|
14
|
+
"build": "node scripts/build.mjs",
|
|
15
|
+
"dev": "bun run src/index.ts",
|
|
16
|
+
"sync:assets": "node scripts/sync-assets.mjs",
|
|
17
|
+
"check:assets": "node scripts/sync-assets.mjs --check",
|
|
18
|
+
"validate:csv": "cd .. && python3 scripts/validate-csv.py",
|
|
19
|
+
"smoke:domains": "cd .. && bash scripts/smoke-domains.sh",
|
|
20
|
+
"smoke:stacks": "cd .. && bash scripts/smoke-stacks.sh",
|
|
21
|
+
"typecheck": "tsc --noEmit",
|
|
22
|
+
"prepublishOnly": "npm run sync:assets && npm run validate:csv && npm run smoke:domains && npm run smoke:stacks && npm run typecheck && npm run build"
|
|
23
|
+
},
|
|
24
|
+
"keywords": [
|
|
25
|
+
"claude-code",
|
|
26
|
+
"claude-skill",
|
|
27
|
+
"cursor",
|
|
28
|
+
"cursor-ai",
|
|
29
|
+
"ai-agent",
|
|
30
|
+
"ai-coding-assistant",
|
|
31
|
+
"ui",
|
|
32
|
+
"ux",
|
|
33
|
+
"ui-ux",
|
|
34
|
+
"design",
|
|
35
|
+
"design-system",
|
|
36
|
+
"design-intelligence",
|
|
37
|
+
"color-palette",
|
|
38
|
+
"typography",
|
|
39
|
+
"tailwind",
|
|
40
|
+
"shadcn",
|
|
41
|
+
"accessibility",
|
|
42
|
+
"wcag",
|
|
43
|
+
"windsurf",
|
|
44
|
+
"copilot",
|
|
45
|
+
"codex",
|
|
46
|
+
"ai",
|
|
47
|
+
"skill",
|
|
48
|
+
"agent-skill"
|
|
49
|
+
],
|
|
50
|
+
"author": "kterfan",
|
|
51
|
+
"license": "MIT",
|
|
52
|
+
"dependencies": {
|
|
53
|
+
"chalk": "^5.3.0",
|
|
54
|
+
"commander": "^12.1.0",
|
|
55
|
+
"ora": "^8.1.1",
|
|
56
|
+
"prompts": "^2.4.2"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"@playwright/test": "^1.61.1",
|
|
60
|
+
"@types/bun": "^1.1.14",
|
|
61
|
+
"@types/node": "^22.10.1",
|
|
62
|
+
"@types/prompts": "^2.4.9",
|
|
63
|
+
"typescript": "^5.7.2"
|
|
64
|
+
}
|
|
65
|
+
}
|