flutter-pro-max-cli 1.0.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/LICENSE +21 -0
- package/README.md +106 -0
- package/assets/.agent/workflows/flutter-pro-max.md +167 -0
- package/assets/.agent/workflows/scripts/core.py +341 -0
- package/assets/.agent/workflows/scripts/search.py +106 -0
- package/assets/.claude/skills/flutter-pro-max/SKILL.md +182 -0
- package/assets/.claude/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.claude/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.codebuddy/commands/flutter-pro-max.md +58 -0
- package/assets/.codebuddy/commands/scripts/core.py +341 -0
- package/assets/.codebuddy/commands/scripts/search.py +106 -0
- package/assets/.codex/skills/flutter-pro-max/SKILL.md +100 -0
- package/assets/.codex/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.codex/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.cursor/commands/flutter-pro-max.md +154 -0
- package/assets/.cursor/commands/scripts/core.py +341 -0
- package/assets/.cursor/commands/scripts/search.py +106 -0
- package/assets/.gemini/skills/flutter-pro-max/SKILL.md +100 -0
- package/assets/.gemini/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.gemini/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.github/prompts/flutter-pro-max.prompt.md +61 -0
- package/assets/.github/prompts/scripts/core.py +341 -0
- package/assets/.github/prompts/scripts/search.py +106 -0
- package/assets/.kiro/steering/flutter-pro-max.md +60 -0
- package/assets/.kiro/steering/scripts/core.py +341 -0
- package/assets/.kiro/steering/scripts/search.py +106 -0
- package/assets/.qoder/rules/flutter-pro-max.md +58 -0
- package/assets/.qoder/rules/scripts/core.py +341 -0
- package/assets/.qoder/rules/scripts/search.py +106 -0
- package/assets/.roo/commands/flutter-pro-max.md +58 -0
- package/assets/.roo/commands/scripts/core.py +341 -0
- package/assets/.roo/commands/scripts/search.py +106 -0
- package/assets/.shared/data/architect.csv +18 -0
- package/assets/.shared/data/charts.csv +26 -0
- package/assets/.shared/data/colors.csv +97 -0
- package/assets/.shared/data/icons.csv +101 -0
- package/assets/.shared/data/landing.csv +31 -0
- package/assets/.shared/data/name_convention.csv +16 -0
- package/assets/.shared/data/package.csv +101 -0
- package/assets/.shared/data/patterns.csv +109 -0
- package/assets/.shared/data/products.csv +97 -0
- package/assets/.shared/data/prompts.csv +24 -0
- package/assets/.shared/data/styles.csv +59 -0
- package/assets/.shared/data/typography.csv +58 -0
- package/assets/.shared/data/ux-guidelines.csv +100 -0
- package/assets/.shared/data/widget.csv +65 -0
- package/assets/.shared/flutter-pro-max/SKILL.md +165 -0
- package/assets/.shared/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.shared/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.trae/skills/flutter-pro-max/SKILL.md +61 -0
- package/assets/.trae/skills/flutter-pro-max/scripts/core.py +341 -0
- package/assets/.trae/skills/flutter-pro-max/scripts/search.py +106 -0
- package/assets/.windsurf/workflows/flutter-pro-max.md +154 -0
- package/assets/.windsurf/workflows/scripts/core.py +341 -0
- package/assets/.windsurf/workflows/scripts/search.py +106 -0
- package/dist/commands/init.d.ts +7 -0
- package/dist/commands/init.js +67 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +31 -0
- package/dist/types/index.d.ts +20 -0
- package/dist/types/index.js +15 -0
- package/dist/utils/detect.d.ts +8 -0
- package/dist/utils/detect.js +80 -0
- package/dist/utils/extract.d.ts +4 -0
- package/dist/utils/extract.js +83 -0
- package/dist/utils/logger.d.ts +8 -0
- package/dist/utils/logger.js +9 -0
- package/package.json +52 -0
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
import { existsSync } from 'node:fs';
|
|
2
|
+
import { join } from 'node:path';
|
|
3
|
+
export function detectAIType(cwd = process.cwd()) {
|
|
4
|
+
const detected = [];
|
|
5
|
+
if (existsSync(join(cwd, '.claude'))) {
|
|
6
|
+
detected.push('claude');
|
|
7
|
+
}
|
|
8
|
+
if (existsSync(join(cwd, '.cursor'))) {
|
|
9
|
+
detected.push('cursor');
|
|
10
|
+
}
|
|
11
|
+
if (existsSync(join(cwd, '.windsurf'))) {
|
|
12
|
+
detected.push('windsurf');
|
|
13
|
+
}
|
|
14
|
+
if (existsSync(join(cwd, '.agent'))) {
|
|
15
|
+
detected.push('antigravity');
|
|
16
|
+
}
|
|
17
|
+
if (existsSync(join(cwd, '.github'))) {
|
|
18
|
+
detected.push('copilot');
|
|
19
|
+
}
|
|
20
|
+
if (existsSync(join(cwd, '.kiro'))) {
|
|
21
|
+
detected.push('kiro');
|
|
22
|
+
}
|
|
23
|
+
if (existsSync(join(cwd, '.codex'))) {
|
|
24
|
+
detected.push('codex');
|
|
25
|
+
}
|
|
26
|
+
if (existsSync(join(cwd, '.roo'))) {
|
|
27
|
+
detected.push('roocode');
|
|
28
|
+
}
|
|
29
|
+
if (existsSync(join(cwd, '.qoder'))) {
|
|
30
|
+
detected.push('qoder');
|
|
31
|
+
}
|
|
32
|
+
if (existsSync(join(cwd, '.gemini'))) {
|
|
33
|
+
detected.push('gemini');
|
|
34
|
+
}
|
|
35
|
+
if (existsSync(join(cwd, '.codebuddy'))) {
|
|
36
|
+
detected.push('codebuddy');
|
|
37
|
+
}
|
|
38
|
+
if (existsSync(join(cwd, '.trae'))) {
|
|
39
|
+
detected.push('trae');
|
|
40
|
+
}
|
|
41
|
+
// Suggest based on what's detected
|
|
42
|
+
let suggested = null;
|
|
43
|
+
if (detected.length === 1) {
|
|
44
|
+
suggested = detected[0];
|
|
45
|
+
}
|
|
46
|
+
else if (detected.length > 1) {
|
|
47
|
+
suggested = 'all';
|
|
48
|
+
}
|
|
49
|
+
return { detected, suggested };
|
|
50
|
+
}
|
|
51
|
+
export function getAITypeDescription(aiType) {
|
|
52
|
+
switch (aiType) {
|
|
53
|
+
case 'claude':
|
|
54
|
+
return 'Claude Code (.claude/skills/)';
|
|
55
|
+
case 'cursor':
|
|
56
|
+
return 'Cursor (.cursor/commands/)';
|
|
57
|
+
case 'windsurf':
|
|
58
|
+
return 'Windsurf (.windsurf/workflows/)';
|
|
59
|
+
case 'antigravity':
|
|
60
|
+
return 'Antigravity (.agent/workflows/)';
|
|
61
|
+
case 'copilot':
|
|
62
|
+
return 'GitHub Copilot (.github/prompts/)';
|
|
63
|
+
case 'kiro':
|
|
64
|
+
return 'Kiro (.kiro/steering/)';
|
|
65
|
+
case 'codex':
|
|
66
|
+
return 'Codex (.codex/skills/)';
|
|
67
|
+
case 'roocode':
|
|
68
|
+
return 'RooCode (.roo/commands/)';
|
|
69
|
+
case 'qoder':
|
|
70
|
+
return 'Qoder (.qoder/rules/)';
|
|
71
|
+
case 'gemini':
|
|
72
|
+
return 'Gemini CLI (.gemini/skills/)';
|
|
73
|
+
case 'codebuddy':
|
|
74
|
+
return 'CodeBuddy (.codebuddy/commands/)';
|
|
75
|
+
case 'trae':
|
|
76
|
+
return 'Trae (.trae/skills/)';
|
|
77
|
+
case 'all':
|
|
78
|
+
return 'All AI assistants';
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { AIType } from '../types/index.js';
|
|
2
|
+
export declare function extractZip(zipPath: string, destDir: string): Promise<void>;
|
|
3
|
+
export declare function copyFolders(sourceDir: string, targetDir: string, aiType: AIType): Promise<string[]>;
|
|
4
|
+
export declare function cleanup(tempDir: string): Promise<void>;
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { mkdir, rm, access, cp } from 'node:fs/promises';
|
|
2
|
+
import { join, basename } from 'node:path';
|
|
3
|
+
import { exec } from 'node:child_process';
|
|
4
|
+
import { promisify } from 'node:util';
|
|
5
|
+
import { AI_FOLDERS } from '../types/index.js';
|
|
6
|
+
const execAsync = promisify(exec);
|
|
7
|
+
const EXCLUDED_FILES = ['settings.local.json'];
|
|
8
|
+
export async function extractZip(zipPath, destDir) {
|
|
9
|
+
try {
|
|
10
|
+
const isWindows = process.platform === 'win32';
|
|
11
|
+
if (isWindows) {
|
|
12
|
+
await execAsync(`powershell -Command "Expand-Archive -Path '${zipPath}' -DestinationPath '${destDir}' -Force"`);
|
|
13
|
+
}
|
|
14
|
+
else {
|
|
15
|
+
await execAsync(`unzip -o "${zipPath}" -d "${destDir}"`);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
catch (error) {
|
|
19
|
+
throw new Error(`Failed to extract zip: ${error}`);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
async function exists(path) {
|
|
23
|
+
try {
|
|
24
|
+
await access(path);
|
|
25
|
+
return true;
|
|
26
|
+
}
|
|
27
|
+
catch {
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
export async function copyFolders(sourceDir, targetDir, aiType) {
|
|
32
|
+
const copiedFolders = [];
|
|
33
|
+
const foldersToCopy = aiType === 'all'
|
|
34
|
+
? ['.claude', '.cursor', '.windsurf', '.agent', '.github', '.kiro', '.roo', '.codex', '.gemini', '.qoder', '.codebuddy', '.trae', '.shared']
|
|
35
|
+
: AI_FOLDERS[aiType];
|
|
36
|
+
// Deduplicate folders (e.g., .shared might be listed multiple times)
|
|
37
|
+
const uniqueFolders = [...new Set(foldersToCopy)];
|
|
38
|
+
for (const folder of uniqueFolders) {
|
|
39
|
+
const sourcePath = join(sourceDir, folder);
|
|
40
|
+
const targetPath = join(targetDir, folder);
|
|
41
|
+
// Check if source folder exists
|
|
42
|
+
const sourceExists = await exists(sourcePath);
|
|
43
|
+
if (!sourceExists) {
|
|
44
|
+
continue;
|
|
45
|
+
}
|
|
46
|
+
// Create target directory if needed
|
|
47
|
+
await mkdir(targetPath, { recursive: true });
|
|
48
|
+
// Filter function to exclude certain files
|
|
49
|
+
const filterFn = (src) => {
|
|
50
|
+
const fileName = basename(src);
|
|
51
|
+
return !EXCLUDED_FILES.includes(fileName);
|
|
52
|
+
};
|
|
53
|
+
// Copy recursively
|
|
54
|
+
try {
|
|
55
|
+
await cp(sourcePath, targetPath, { recursive: true, filter: filterFn });
|
|
56
|
+
copiedFolders.push(folder);
|
|
57
|
+
}
|
|
58
|
+
catch {
|
|
59
|
+
// Try shell fallback for older Node versions
|
|
60
|
+
try {
|
|
61
|
+
if (process.platform === 'win32') {
|
|
62
|
+
await execAsync(`xcopy "${sourcePath}" "${targetPath}" /E /I /Y`);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
await execAsync(`cp -r "${sourcePath}/." "${targetPath}"`);
|
|
66
|
+
}
|
|
67
|
+
copiedFolders.push(folder);
|
|
68
|
+
}
|
|
69
|
+
catch {
|
|
70
|
+
// Skip if copy fails
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
return copiedFolders;
|
|
75
|
+
}
|
|
76
|
+
export async function cleanup(tempDir) {
|
|
77
|
+
try {
|
|
78
|
+
await rm(tempDir, { recursive: true, force: true });
|
|
79
|
+
}
|
|
80
|
+
catch {
|
|
81
|
+
// Ignore cleanup errors
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import chalk from 'chalk';
|
|
2
|
+
export const logger = {
|
|
3
|
+
info: (msg) => console.log(chalk.blue('info'), msg),
|
|
4
|
+
success: (msg) => console.log(chalk.green('success'), msg),
|
|
5
|
+
warn: (msg) => console.log(chalk.yellow('warn'), msg),
|
|
6
|
+
error: (msg) => console.log(chalk.red('error'), msg),
|
|
7
|
+
title: (msg) => console.log(chalk.bold.cyan(`\n${msg}\n`)),
|
|
8
|
+
dim: (msg) => console.log(chalk.dim(msg)),
|
|
9
|
+
};
|
package/package.json
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "flutter-pro-max-cli",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "CLI to install Flutter Pro Max skill for AI coding assistants",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"bin": {
|
|
7
|
+
"flutter-pro-max": "./dist/index.js"
|
|
8
|
+
},
|
|
9
|
+
"files": [
|
|
10
|
+
"dist",
|
|
11
|
+
"assets",
|
|
12
|
+
"LICENSE"
|
|
13
|
+
],
|
|
14
|
+
"scripts": {
|
|
15
|
+
"sync:assets": "bash scripts/sync-assets.sh",
|
|
16
|
+
"build": "npm run sync:assets && tsc",
|
|
17
|
+
"build:bun": "npm run sync:assets && bun build src/index.ts --outdir dist --target node",
|
|
18
|
+
"dev": "npx ts-node --esm src/index.ts",
|
|
19
|
+
"prepublishOnly": "npm run build"
|
|
20
|
+
},
|
|
21
|
+
"keywords": [
|
|
22
|
+
"flutter",
|
|
23
|
+
"dart",
|
|
24
|
+
"clean-architecture",
|
|
25
|
+
"riverpod",
|
|
26
|
+
"bloc",
|
|
27
|
+
"claude",
|
|
28
|
+
"cursor",
|
|
29
|
+
"windsurf",
|
|
30
|
+
"copilot",
|
|
31
|
+
"kiro",
|
|
32
|
+
"roocode",
|
|
33
|
+
"codex",
|
|
34
|
+
"qoder",
|
|
35
|
+
"ai",
|
|
36
|
+
"skill"
|
|
37
|
+
],
|
|
38
|
+
"author": "",
|
|
39
|
+
"license": "MIT",
|
|
40
|
+
"dependencies": {
|
|
41
|
+
"commander": "^12.1.0",
|
|
42
|
+
"chalk": "^5.3.0",
|
|
43
|
+
"ora": "^8.1.1",
|
|
44
|
+
"prompts": "^2.4.2"
|
|
45
|
+
},
|
|
46
|
+
"devDependencies": {
|
|
47
|
+
"@types/bun": "^1.1.14",
|
|
48
|
+
"@types/node": "^22.10.1",
|
|
49
|
+
"@types/prompts": "^2.4.9",
|
|
50
|
+
"typescript": "^5.7.2"
|
|
51
|
+
}
|
|
52
|
+
}
|