flutter-pro-max-cli 1.0.2 → 2.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.
Files changed (89) hide show
  1. package/README.md +97 -16
  2. package/assets/data/flutter-performance.csv +36 -0
  3. package/assets/data/mobile-accessibility.csv +36 -0
  4. package/assets/data/ui-reasoning.csv +36 -0
  5. package/assets/{.claude/skills/flutter-pro-max/scripts → scripts}/core.py +20 -3
  6. package/assets/{.claude/skills/flutter-pro-max/scripts → scripts}/search.py +1 -1
  7. package/assets/templates/base/quick-reference.md +41 -0
  8. package/assets/templates/base/skill-content.md +179 -0
  9. package/assets/templates/platforms/agent.json +21 -0
  10. package/assets/templates/platforms/claude.json +21 -0
  11. package/assets/templates/platforms/codebuddy.json +18 -0
  12. package/assets/templates/platforms/codex.json +21 -0
  13. package/assets/templates/platforms/continue.json +21 -0
  14. package/assets/templates/platforms/copilot.json +18 -0
  15. package/assets/templates/platforms/cursor.json +18 -0
  16. package/assets/templates/platforms/gemini.json +21 -0
  17. package/assets/templates/platforms/kiro.json +18 -0
  18. package/assets/templates/platforms/opencode.json +21 -0
  19. package/assets/templates/platforms/qoder.json +18 -0
  20. package/assets/templates/platforms/roocode.json +18 -0
  21. package/assets/templates/platforms/trae.json +21 -0
  22. package/assets/templates/platforms/windsurf.json +18 -0
  23. package/dist/commands/init.js +13 -13
  24. package/dist/commands/update.d.ts +6 -0
  25. package/dist/commands/update.js +27 -0
  26. package/dist/commands/versions.d.ts +1 -0
  27. package/dist/commands/versions.js +36 -0
  28. package/dist/index.js +27 -1
  29. package/dist/types/index.d.ts +20 -1
  30. package/dist/types/index.js +4 -1
  31. package/dist/utils/detect.js +11 -1
  32. package/dist/utils/extract.d.ts +5 -0
  33. package/dist/utils/github.d.ts +11 -0
  34. package/dist/utils/github.js +81 -0
  35. package/dist/utils/template.d.ts +25 -0
  36. package/dist/utils/template.js +194 -0
  37. package/package.json +8 -4
  38. package/assets/.agent/workflows/flutter-pro-max.md +0 -221
  39. package/assets/.agent/workflows/scripts/core.py +0 -345
  40. package/assets/.agent/workflows/scripts/search.py +0 -106
  41. package/assets/.claude/skills/flutter-pro-max/SKILL.md +0 -339
  42. package/assets/.codebuddy/commands/flutter-pro-max.md +0 -221
  43. package/assets/.codebuddy/commands/scripts/core.py +0 -345
  44. package/assets/.codebuddy/commands/scripts/search.py +0 -106
  45. package/assets/.codex/skills/flutter-pro-max/SKILL.md +0 -221
  46. package/assets/.codex/skills/flutter-pro-max/scripts/core.py +0 -345
  47. package/assets/.codex/skills/flutter-pro-max/scripts/search.py +0 -106
  48. package/assets/.cursor/commands/flutter-pro-max.md +0 -221
  49. package/assets/.cursor/commands/scripts/core.py +0 -345
  50. package/assets/.cursor/commands/scripts/search.py +0 -106
  51. package/assets/.gemini/skills/flutter-pro-max/SKILL.md +0 -221
  52. package/assets/.gemini/skills/flutter-pro-max/scripts/core.py +0 -345
  53. package/assets/.gemini/skills/flutter-pro-max/scripts/search.py +0 -106
  54. package/assets/.github/prompts/flutter-pro-max.prompt.md +0 -221
  55. package/assets/.github/prompts/scripts/core.py +0 -345
  56. package/assets/.github/prompts/scripts/search.py +0 -106
  57. package/assets/.kiro/steering/flutter-pro-max.md +0 -220
  58. package/assets/.kiro/steering/scripts/core.py +0 -345
  59. package/assets/.kiro/steering/scripts/search.py +0 -106
  60. package/assets/.qoder/rules/flutter-pro-max.md +0 -220
  61. package/assets/.qoder/rules/scripts/core.py +0 -345
  62. package/assets/.qoder/rules/scripts/search.py +0 -106
  63. package/assets/.roo/commands/flutter-pro-max.md +0 -220
  64. package/assets/.roo/commands/scripts/core.py +0 -345
  65. package/assets/.roo/commands/scripts/search.py +0 -106
  66. package/assets/.shared/flutter-pro-max/SKILL.md +0 -221
  67. package/assets/.shared/flutter-pro-max/scripts/core.py +0 -341
  68. package/assets/.shared/flutter-pro-max/scripts/search.py +0 -106
  69. package/assets/.trae/skills/flutter-pro-max/SKILL.md +0 -221
  70. package/assets/.trae/skills/flutter-pro-max/scripts/core.py +0 -345
  71. package/assets/.trae/skills/flutter-pro-max/scripts/search.py +0 -106
  72. package/assets/.windsurf/workflows/flutter-pro-max.md +0 -221
  73. package/assets/.windsurf/workflows/scripts/core.py +0 -345
  74. package/assets/.windsurf/workflows/scripts/search.py +0 -106
  75. package/dist/utils/extract.js +0 -83
  76. /package/assets/{.shared/data → data}/architect.csv +0 -0
  77. /package/assets/{.shared/data → data}/charts.csv +0 -0
  78. /package/assets/{.shared/data → data}/colors.csv +0 -0
  79. /package/assets/{.shared/data → data}/icons.csv +0 -0
  80. /package/assets/{.shared/data → data}/landing.csv +0 -0
  81. /package/assets/{.shared/data → data}/name_convention.csv +0 -0
  82. /package/assets/{.shared/data → data}/package.csv +0 -0
  83. /package/assets/{.shared/data → data}/patterns.csv +0 -0
  84. /package/assets/{.shared/data → data}/products.csv +0 -0
  85. /package/assets/{.shared/data → data}/prompts.csv +0 -0
  86. /package/assets/{.shared/data → data}/styles.csv +0 -0
  87. /package/assets/{.shared/data → data}/typography.csv +0 -0
  88. /package/assets/{.shared/data → data}/ux-guidelines.csv +0 -0
  89. /package/assets/{.shared/data → data}/widget.csv +0 -0
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "codex",
3
+ "displayName": "Codex CLI",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".codex",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": ".codex/skills/flutter-pro-max/scripts",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3"
14
+ },
15
+ "sections": {
16
+ "quickReference": true
17
+ },
18
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
19
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "continue",
3
+ "displayName": "Continue",
4
+ "installType": "full",
5
+ "folderStructure": {
6
+ "root": ".continue",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": ".continue/skills/flutter-pro-max/scripts",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3"
14
+ },
15
+ "sections": {
16
+ "quickReference": true
17
+ },
18
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
19
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "copilot",
3
+ "displayName": "GitHub Copilot",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".github",
7
+ "skillPath": "prompts",
8
+ "filename": "flutter-pro-max.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": null,
12
+ "sections": {
13
+ "quickReference": true
14
+ },
15
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
16
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
17
+ "skillOrWorkflow": "Prompt"
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "cursor",
3
+ "displayName": "Cursor",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".cursor",
7
+ "skillPath": "commands",
8
+ "filename": "flutter-pro-max.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": null,
12
+ "sections": {
13
+ "quickReference": true
14
+ },
15
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
16
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
17
+ "skillOrWorkflow": "Command"
18
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "gemini",
3
+ "displayName": "Gemini CLI",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".gemini",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3"
14
+ },
15
+ "sections": {
16
+ "quickReference": true
17
+ },
18
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
19
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "kiro",
3
+ "displayName": "Kiro",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".kiro",
7
+ "skillPath": "steering",
8
+ "filename": "flutter-pro-max.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": null,
12
+ "sections": {
13
+ "quickReference": true
14
+ },
15
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
16
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
17
+ "skillOrWorkflow": "Steering"
18
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "opencode",
3
+ "displayName": "OpenCode",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".opencode",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3"
14
+ },
15
+ "sections": {
16
+ "quickReference": true
17
+ },
18
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
19
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "qoder",
3
+ "displayName": "Qoder",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".qoder",
7
+ "skillPath": "rules",
8
+ "filename": "flutter-pro-max.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": null,
12
+ "sections": {
13
+ "quickReference": true
14
+ },
15
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
16
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
17
+ "skillOrWorkflow": "Rule"
18
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "roocode",
3
+ "displayName": "RooCode",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".roo",
7
+ "skillPath": "commands",
8
+ "filename": "flutter-pro-max.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": null,
12
+ "sections": {
13
+ "quickReference": true
14
+ },
15
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
16
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
17
+ "skillOrWorkflow": "Command"
18
+ }
@@ -0,0 +1,21 @@
1
+ {
2
+ "platform": "trae",
3
+ "displayName": "Trae",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".trae",
7
+ "skillPath": "skills/flutter-pro-max",
8
+ "filename": "SKILL.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": {
12
+ "name": "flutter-pro-max",
13
+ "description": "Chuyên gia Flutter với kiến thức sâu về Clean Architecture, Performance và Modern Dart 3"
14
+ },
15
+ "sections": {
16
+ "quickReference": true
17
+ },
18
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
19
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
20
+ "skillOrWorkflow": "Skill"
21
+ }
@@ -0,0 +1,18 @@
1
+ {
2
+ "platform": "windsurf",
3
+ "displayName": "Windsurf",
4
+ "installType": "reference",
5
+ "folderStructure": {
6
+ "root": ".windsurf",
7
+ "skillPath": "workflows",
8
+ "filename": "flutter-pro-max.md"
9
+ },
10
+ "scriptPath": ".shared/flutter-pro-max/scripts",
11
+ "frontmatter": null,
12
+ "sections": {
13
+ "quickReference": true
14
+ },
15
+ "title": "Flutter Pro Max - Flutter Design Intelligence",
16
+ "description": "Searchable database của Flutter widgets, packages, design patterns, architecture guidelines, và best practices.",
17
+ "skillOrWorkflow": "Workflow"
18
+ }
@@ -1,15 +1,10 @@
1
- import { join, dirname } from 'node:path';
2
- import { fileURLToPath } from 'node:url';
3
1
  import chalk from 'chalk';
4
2
  import ora from 'ora';
5
3
  import prompts from 'prompts';
6
4
  import { AI_TYPES } from '../types/index.js';
7
- import { copyFolders } from '../utils/extract.js';
5
+ import { generatePlatformFiles, generateAllPlatformFiles } from '../utils/template.js';
8
6
  import { detectAIType, getAITypeDescription } from '../utils/detect.js';
9
7
  import { logger } from '../utils/logger.js';
10
- const __dirname = dirname(fileURLToPath(import.meta.url));
11
- // From dist/commands/init.js -> go up 2 levels to cli/, then assets/
12
- const ASSETS_DIR = join(__dirname, '..', '..', 'assets');
13
8
  export async function initCommand(options) {
14
9
  logger.title('🚀 Flutter Pro Max Skill Installer');
15
10
  let aiType = options.ai;
@@ -36,11 +31,17 @@ export async function initCommand(options) {
36
31
  aiType = response.aiType;
37
32
  }
38
33
  logger.info(`Installing for: ${chalk.cyan(getAITypeDescription(aiType))}`);
39
- const spinner = ora('Installing files...').start();
34
+ const spinner = ora('Generating skill files from templates...').start();
35
+ const cwd = process.cwd();
40
36
  try {
41
- const cwd = process.cwd();
42
- const copiedFolders = await copyFolders(ASSETS_DIR, cwd, aiType);
43
- spinner.succeed('Installation complete!');
37
+ let copiedFolders;
38
+ if (aiType === 'all') {
39
+ copiedFolders = await generateAllPlatformFiles(cwd);
40
+ }
41
+ else {
42
+ copiedFolders = await generatePlatformFiles(cwd, aiType);
43
+ }
44
+ spinner.succeed('Generated from templates!');
44
45
  // Summary
45
46
  console.log();
46
47
  logger.info('Installed folders:');
@@ -52,9 +53,8 @@ export async function initCommand(options) {
52
53
  // Next steps
53
54
  console.log();
54
55
  console.log(chalk.bold('Next steps:'));
55
- console.log(chalk.dim(' 1. Install Python dependency: pip install rank-bm25'));
56
- console.log(chalk.dim(' 2. Restart your AI coding assistant'));
57
- console.log(chalk.dim(' 3. Try: "Tạo màn hình đăng nhập với Riverpod"'));
56
+ console.log(chalk.dim(' 1. Restart your AI coding assistant'));
57
+ console.log(chalk.dim(' 2. Try: "Tạo màn hình đăng nhập với Riverpod"'));
58
58
  console.log();
59
59
  }
60
60
  catch (error) {
@@ -0,0 +1,6 @@
1
+ import type { AIType } from '../types/index.js';
2
+ interface UpdateOptions {
3
+ ai?: AIType;
4
+ }
5
+ export declare function updateCommand(options: UpdateOptions): Promise<void>;
6
+ export {};
@@ -0,0 +1,27 @@
1
+ import chalk from 'chalk';
2
+ import ora from 'ora';
3
+ import { getLatestRelease } from '../utils/github.js';
4
+ import { logger } from '../utils/logger.js';
5
+ import { initCommand } from './init.js';
6
+ export async function updateCommand(options) {
7
+ logger.title('🔄 Flutter Pro Max Updater');
8
+ const spinner = ora('Checking for updates...').start();
9
+ try {
10
+ const release = await getLatestRelease();
11
+ spinner.succeed(`Latest version: ${chalk.cyan(release.tag_name)}`);
12
+ console.log();
13
+ logger.info('Running update (same as init with latest version)...');
14
+ console.log();
15
+ await initCommand({
16
+ ai: options.ai,
17
+ force: true,
18
+ });
19
+ }
20
+ catch (error) {
21
+ spinner.fail('Update check failed');
22
+ if (error instanceof Error) {
23
+ logger.error(error.message);
24
+ }
25
+ process.exit(1);
26
+ }
27
+ }
@@ -0,0 +1 @@
1
+ export declare function versionsCommand(): Promise<void>;
@@ -0,0 +1,36 @@
1
+ import chalk from 'chalk';
2
+ import ora from 'ora';
3
+ import { fetchReleases } from '../utils/github.js';
4
+ import { logger } from '../utils/logger.js';
5
+ export async function versionsCommand() {
6
+ const spinner = ora('Fetching available versions...').start();
7
+ try {
8
+ const releases = await fetchReleases();
9
+ if (releases.length === 0) {
10
+ spinner.warn('No releases found');
11
+ return;
12
+ }
13
+ spinner.succeed(`Found ${releases.length} version(s)\n`);
14
+ console.log(chalk.bold('Available versions:\n'));
15
+ releases.forEach((release, index) => {
16
+ const isLatest = index === 0;
17
+ const tag = release.tag_name;
18
+ const date = new Date(release.published_at).toLocaleDateString();
19
+ if (isLatest) {
20
+ console.log(` ${chalk.green('*')} ${chalk.bold(tag)} ${chalk.dim(`(${date})`)} ${chalk.green('[latest]')}`);
21
+ }
22
+ else {
23
+ console.log(` ${tag} ${chalk.dim(`(${date})`)}`);
24
+ }
25
+ });
26
+ console.log();
27
+ logger.dim('Use: flutter-pro-max init --version <tag> to install a specific version');
28
+ }
29
+ catch (error) {
30
+ spinner.fail('Failed to fetch versions');
31
+ if (error instanceof Error) {
32
+ logger.error(error.message);
33
+ }
34
+ process.exit(1);
35
+ }
36
+ }
package/dist/index.js CHANGED
@@ -1,12 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  import { Command } from 'commander';
3
+ import { readFileSync } from 'fs';
4
+ import { fileURLToPath } from 'url';
5
+ import { dirname, join } from 'path';
3
6
  import { initCommand } from './commands/init.js';
7
+ import { versionsCommand } from './commands/versions.js';
8
+ import { updateCommand } from './commands/update.js';
4
9
  import { AI_TYPES } from './types/index.js';
10
+ const __filename = fileURLToPath(import.meta.url);
11
+ const __dirname = dirname(__filename);
12
+ const pkg = JSON.parse(readFileSync(join(__dirname, '../package.json'), 'utf-8'));
5
13
  const program = new Command();
6
14
  program
7
15
  .name('flutter-pro-max')
8
16
  .description('CLI to install Flutter Pro Max skill for AI coding assistants')
9
- .version('1.0.0');
17
+ .version(pkg.version);
10
18
  program
11
19
  .command('init')
12
20
  .description('Install Flutter Pro Max skill to current project')
@@ -23,6 +31,24 @@ program
23
31
  force: options.force,
24
32
  });
25
33
  });
34
+ program
35
+ .command('versions')
36
+ .description('List available versions')
37
+ .action(versionsCommand);
38
+ program
39
+ .command('update')
40
+ .description('Update Flutter Pro Max to latest version')
41
+ .option('-a, --ai <type>', `AI assistant type (${AI_TYPES.join(', ')})`)
42
+ .action(async (options) => {
43
+ if (options.ai && !AI_TYPES.includes(options.ai)) {
44
+ console.error(`Invalid AI type: ${options.ai}`);
45
+ console.error(`Valid types: ${AI_TYPES.join(', ')}`);
46
+ process.exit(1);
47
+ }
48
+ await updateCommand({
49
+ ai: options.ai,
50
+ });
51
+ });
26
52
  // Default command (when run without subcommand)
27
53
  program
28
54
  .action(async () => {
@@ -1,4 +1,5 @@
1
- export type AIType = 'claude' | 'cursor' | 'windsurf' | 'antigravity' | 'copilot' | 'kiro' | 'roocode' | 'codex' | 'qoder' | 'gemini' | 'codebuddy' | 'trae' | 'all';
1
+ export type AIType = 'claude' | 'cursor' | 'windsurf' | 'antigravity' | 'copilot' | 'kiro' | 'roocode' | 'codex' | 'qoder' | 'gemini' | 'codebuddy' | 'trae' | 'opencode' | 'continue' | 'all';
2
+ export type InstallType = 'full' | 'reference';
2
3
  export interface Release {
3
4
  tag_name: string;
4
5
  name: string;
@@ -16,5 +17,23 @@ export interface InstallConfig {
16
17
  version?: string;
17
18
  force?: boolean;
18
19
  }
20
+ export interface PlatformConfig {
21
+ platform: string;
22
+ displayName: string;
23
+ installType: InstallType;
24
+ folderStructure: {
25
+ root: string;
26
+ skillPath: string;
27
+ filename: string;
28
+ };
29
+ scriptPath: string;
30
+ frontmatter: Record<string, string> | null;
31
+ sections: {
32
+ quickReference: boolean;
33
+ };
34
+ title: string;
35
+ description: string;
36
+ skillOrWorkflow: string;
37
+ }
19
38
  export declare const AI_TYPES: AIType[];
20
39
  export declare const AI_FOLDERS: Record<Exclude<AIType, 'all'>, string[]>;
@@ -1,4 +1,5 @@
1
- export const AI_TYPES = ['claude', 'cursor', 'windsurf', 'antigravity', 'copilot', 'roocode', 'kiro', 'codex', 'qoder', 'gemini', 'codebuddy', 'trae', 'all'];
1
+ export const AI_TYPES = ['claude', 'cursor', 'windsurf', 'antigravity', 'copilot', 'roocode', 'kiro', 'codex', 'qoder', 'gemini', 'codebuddy', 'trae', 'opencode', 'continue', 'all'];
2
+ // Legacy folder mapping for backward compatibility with ZIP-based installs
2
3
  export const AI_FOLDERS = {
3
4
  claude: ['.claude', '.shared'],
4
5
  cursor: ['.cursor', '.shared'],
@@ -12,4 +13,6 @@ export const AI_FOLDERS = {
12
13
  gemini: ['.gemini', '.shared'],
13
14
  codebuddy: ['.codebuddy', '.shared'],
14
15
  trae: ['.trae', '.shared'],
16
+ opencode: ['.opencode', '.shared'],
17
+ continue: ['.continue', '.shared'],
15
18
  };
@@ -38,6 +38,12 @@ export function detectAIType(cwd = process.cwd()) {
38
38
  if (existsSync(join(cwd, '.trae'))) {
39
39
  detected.push('trae');
40
40
  }
41
+ if (existsSync(join(cwd, '.opencode'))) {
42
+ detected.push('opencode');
43
+ }
44
+ if (existsSync(join(cwd, '.continue'))) {
45
+ detected.push('continue');
46
+ }
41
47
  // Suggest based on what's detected
42
48
  let suggested = null;
43
49
  if (detected.length === 1) {
@@ -57,7 +63,7 @@ export function getAITypeDescription(aiType) {
57
63
  case 'windsurf':
58
64
  return 'Windsurf (.windsurf/workflows/)';
59
65
  case 'antigravity':
60
- return 'Antigravity (.agent/workflows/)';
66
+ return 'Antigravity / Generic Agent (.agent/skills/)';
61
67
  case 'copilot':
62
68
  return 'GitHub Copilot (.github/prompts/)';
63
69
  case 'kiro':
@@ -74,6 +80,10 @@ export function getAITypeDescription(aiType) {
74
80
  return 'CodeBuddy (.codebuddy/commands/)';
75
81
  case 'trae':
76
82
  return 'Trae (.trae/skills/)';
83
+ case 'opencode':
84
+ return 'OpenCode (.opencode/skills/)';
85
+ case 'continue':
86
+ return 'Continue (.continue/skills/)';
77
87
  case 'all':
78
88
  return 'All AI assistants';
79
89
  }
@@ -1,4 +1,9 @@
1
1
  import type { AIType } from '../types/index.js';
2
2
  export declare function extractZip(zipPath: string, destDir: string): Promise<void>;
3
+ export declare function createTempDir(): Promise<string>;
4
+ export declare function installFromZip(zipPath: string, targetDir: string, aiType: AIType): Promise<{
5
+ copiedFolders: string[];
6
+ tempDir: string;
7
+ }>;
3
8
  export declare function copyFolders(sourceDir: string, targetDir: string, aiType: AIType): Promise<string[]>;
4
9
  export declare function cleanup(tempDir: string): Promise<void>;
@@ -0,0 +1,11 @@
1
+ import type { Release } from '../types/index.js';
2
+ export declare class GitHubRateLimitError extends Error {
3
+ constructor(message: string);
4
+ }
5
+ export declare class GitHubDownloadError extends Error {
6
+ constructor(message: string);
7
+ }
8
+ export declare function fetchReleases(): Promise<Release[]>;
9
+ export declare function getLatestRelease(): Promise<Release>;
10
+ export declare function downloadRelease(url: string, dest: string): Promise<void>;
11
+ export declare function getAssetUrl(release: Release): string | null;
@@ -0,0 +1,81 @@
1
+ import { writeFile } from 'node:fs/promises';
2
+ const REPO_OWNER = 'nextlevelbuilder';
3
+ const REPO_NAME = 'flutter-pro-max-skill';
4
+ const API_BASE = 'https://api.github.com';
5
+ export class GitHubRateLimitError extends Error {
6
+ constructor(message) {
7
+ super(message);
8
+ this.name = 'GitHubRateLimitError';
9
+ }
10
+ }
11
+ export class GitHubDownloadError extends Error {
12
+ constructor(message) {
13
+ super(message);
14
+ this.name = 'GitHubDownloadError';
15
+ }
16
+ }
17
+ function checkRateLimit(response) {
18
+ const remaining = response.headers.get('x-ratelimit-remaining');
19
+ if (response.status === 403 && remaining === '0') {
20
+ const resetTime = response.headers.get('x-ratelimit-reset');
21
+ const resetDate = resetTime ? new Date(parseInt(resetTime) * 1000).toLocaleTimeString() : 'unknown';
22
+ throw new GitHubRateLimitError(`GitHub API rate limit exceeded. Resets at ${resetDate}`);
23
+ }
24
+ if (response.status === 429) {
25
+ throw new GitHubRateLimitError('GitHub API rate limit exceeded (429 Too Many Requests)');
26
+ }
27
+ }
28
+ export async function fetchReleases() {
29
+ const url = `${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/releases`;
30
+ const response = await fetch(url, {
31
+ headers: {
32
+ 'Accept': 'application/vnd.github.v3+json',
33
+ 'User-Agent': 'flutter-pro-max-cli',
34
+ },
35
+ });
36
+ checkRateLimit(response);
37
+ if (!response.ok) {
38
+ throw new GitHubDownloadError(`Failed to fetch releases: ${response.status} ${response.statusText}`);
39
+ }
40
+ return response.json();
41
+ }
42
+ export async function getLatestRelease() {
43
+ const url = `${API_BASE}/repos/${REPO_OWNER}/${REPO_NAME}/releases/latest`;
44
+ const response = await fetch(url, {
45
+ headers: {
46
+ 'Accept': 'application/vnd.github.v3+json',
47
+ 'User-Agent': 'flutter-pro-max-cli',
48
+ },
49
+ });
50
+ checkRateLimit(response);
51
+ if (!response.ok) {
52
+ throw new GitHubDownloadError(`Failed to fetch latest release: ${response.status} ${response.statusText}`);
53
+ }
54
+ return response.json();
55
+ }
56
+ export async function downloadRelease(url, dest) {
57
+ const response = await fetch(url, {
58
+ headers: {
59
+ 'User-Agent': 'flutter-pro-max-cli',
60
+ 'Accept': 'application/octet-stream',
61
+ },
62
+ });
63
+ checkRateLimit(response);
64
+ if (!response.ok) {
65
+ throw new GitHubDownloadError(`Failed to download: ${response.status} ${response.statusText}`);
66
+ }
67
+ const buffer = await response.arrayBuffer();
68
+ await writeFile(dest, Buffer.from(buffer));
69
+ }
70
+ export function getAssetUrl(release) {
71
+ // First try to find an uploaded ZIP asset
72
+ const asset = release.assets.find(a => a.name.endsWith('.zip'));
73
+ if (asset?.browser_download_url) {
74
+ return asset.browser_download_url;
75
+ }
76
+ // Fall back to GitHub's auto-generated archive
77
+ if (release.tag_name) {
78
+ return `https://github.com/${REPO_OWNER}/${REPO_NAME}/archive/refs/tags/${release.tag_name}.zip`;
79
+ }
80
+ return null;
81
+ }
@@ -0,0 +1,25 @@
1
+ import type { PlatformConfig } from '../types/index.js';
2
+ /**
3
+ * Load platform configuration from JSON file
4
+ */
5
+ export declare function loadPlatformConfig(aiType: string): Promise<PlatformConfig>;
6
+ /**
7
+ * Load all available platform configs
8
+ */
9
+ export declare function loadAllPlatformConfigs(): Promise<Map<string, PlatformConfig>>;
10
+ /**
11
+ * Render skill file content from template
12
+ */
13
+ export declare function renderSkillFile(config: PlatformConfig): Promise<string>;
14
+ /**
15
+ * Generate platform files for a specific AI type
16
+ */
17
+ export declare function generatePlatformFiles(targetDir: string, aiType: string): Promise<string[]>;
18
+ /**
19
+ * Generate files for all AI types
20
+ */
21
+ export declare function generateAllPlatformFiles(targetDir: string): Promise<string[]>;
22
+ /**
23
+ * Get list of supported AI types
24
+ */
25
+ export declare function getSupportedAITypes(): string[];