create-pga-ai 0.1.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 ADDED
@@ -0,0 +1,272 @@
1
+ # create-pga-ai
2
+
3
+ **The fastest way to start building with PGA Platform** — Create a complete PGA agent project with a single command.
4
+
5
+ ```bash
6
+ npm create pga-ai@latest my-agent
7
+ ```
8
+
9
+ That's it! 🎉
10
+
11
+ ## What You Get
12
+
13
+ ✨ **Interactive Setup** — Answer a few questions, get a fully configured project
14
+ 🧬 **Evolution Boost 2.0** — 10x faster agent evolution built-in
15
+ 🔌 **Multiple LLM Support** — Anthropic Claude, OpenAI GPT, or both
16
+ 💾 **Production-Ready Storage** — PostgreSQL or in-memory for development
17
+ 📦 **Zero Configuration** — Everything works out of the box
18
+ 🚀 **Template System** — Pre-built agents for common use cases
19
+
20
+ ## Quick Start
21
+
22
+ ### 1. Create Your Project
23
+
24
+ ```bash
25
+ npm create pga-ai@latest my-agent
26
+ cd my-agent
27
+ ```
28
+
29
+ ### 2. Configure API Keys
30
+
31
+ ```bash
32
+ # Edit .env with your API keys
33
+ nano .env
34
+ ```
35
+
36
+ ### 3. Run Your Agent
37
+
38
+ ```bash
39
+ npm run dev
40
+ ```
41
+
42
+ That's it! Your agent is now running with PGA's self-evolution capabilities.
43
+
44
+ ## Usage
45
+
46
+ ### Interactive Mode (Recommended)
47
+
48
+ Simply run without arguments for an interactive setup:
49
+
50
+ ```bash
51
+ npm create pga-ai@latest
52
+ ```
53
+
54
+ You'll be asked:
55
+ - **Project name** — Your agent's folder name
56
+ - **LLM Provider** — Anthropic Claude (recommended), OpenAI GPT, or both
57
+ - **Storage** — PostgreSQL (production) or in-memory (development)
58
+ - **Evolution Boost** — Enable 10x faster evolution (recommended: Yes)
59
+ - **Template** — Choose a starter template
60
+
61
+ ### Command-Line Mode
62
+
63
+ Skip the prompts with CLI flags:
64
+
65
+ ```bash
66
+ npm create pga-ai@latest my-agent \
67
+ --template chatbot \
68
+ --llm anthropic \
69
+ --storage postgres \
70
+ --boost
71
+ ```
72
+
73
+ ### Available Options
74
+
75
+ | Option | Values | Description |
76
+ |--------|--------|-------------|
77
+ | `--template` | `chatbot`, `code-assistant`, `customer-support`, `data-analysis`, `custom` | Project template |
78
+ | `--llm` | `anthropic`, `openai`, `both` | LLM provider |
79
+ | `--storage` | `postgres`, `memory` | Storage backend |
80
+ | `--boost` | flag | Enable Evolution Boost 2.0 |
81
+ | `--skip-install` | flag | Skip npm install |
82
+
83
+ ## Templates
84
+
85
+ ### 🤖 Chatbot Agent
86
+ General-purpose conversational agent. Perfect for:
87
+ - Customer service bots
88
+ - Personal assistants
89
+ - Interactive Q&A systems
90
+
91
+ ### 💻 Code Assistant
92
+ Programming helper with code understanding. Great for:
93
+ - Code review automation
94
+ - Documentation generation
95
+ - Developer productivity tools
96
+
97
+ ### 🎧 Customer Support
98
+ Specialized support automation. Ideal for:
99
+ - Ticket triage
100
+ - FAQ automation
101
+ - Support escalation
102
+
103
+ ### 📊 Data Analysis
104
+ Analytics and insights expert. Perfect for:
105
+ - Business intelligence
106
+ - Data visualization
107
+ - Report generation
108
+
109
+ ### ⚙️ Custom
110
+ Blank starter for your own use case. Maximum flexibility.
111
+
112
+ ## Project Structure
113
+
114
+ ```
115
+ my-agent/
116
+ ├── src/
117
+ │ ├── index.ts # Main entry point
118
+ │ └── agent.ts # Agent logic
119
+ ├── .env # API keys & configuration
120
+ ├── .env.example # Example environment file
121
+ ├── .gitignore # Git ignore rules
122
+ ├── package.json # Dependencies & scripts
123
+ ├── tsconfig.json # TypeScript configuration
124
+ └── README.md # Project documentation
125
+ ```
126
+
127
+ ## Evolution Boost 2.0
128
+
129
+ All projects include Evolution Boost 2.0 — the world's first genetic algorithm for prompt evolution.
130
+
131
+ **Regular Evolution:**
132
+ - 20-30 generations for 2x improvement
133
+ - Sequential mutations
134
+ - 8-15% improvement per generation
135
+
136
+ **Evolution Boost 2.0:**
137
+ - **2-3 generations for 2x improvement** (10x faster!)
138
+ - Parallel mutations (10 branches simultaneously)
139
+ - 40-80% improvement per generation
140
+ - Meta-learning system
141
+ - Pareto optimization
142
+
143
+ Enable it during setup or in your `.env`:
144
+ ```bash
145
+ EVOLUTION_MODE=aggressive # Options: conservative, balanced, aggressive
146
+ ```
147
+
148
+ ## What Gets Installed
149
+
150
+ Depending on your configuration, the installer adds:
151
+
152
+ **Core Package:**
153
+ - `@pga-ai/core` — Main PGA framework
154
+
155
+ **LLM Adapters:**
156
+ - `@pga-ai/adapters-llm-anthropic` — Claude integration
157
+ - `@pga-ai/adapters-llm-openai` — GPT integration
158
+
159
+ **Storage Adapters:**
160
+ - `@pga-ai/adapters-storage-postgres` — PostgreSQL storage
161
+
162
+ **Dev Dependencies:**
163
+ - `typescript` — TypeScript compiler
164
+ - `tsx` — TypeScript execution
165
+ - `vitest` — Testing framework
166
+ - `@types/node` — Node.js types
167
+
168
+ ## Requirements
169
+
170
+ - **Node.js** — v18 or higher
171
+ - **npm** — v9 or higher
172
+ - **PostgreSQL** — (if using postgres storage)
173
+
174
+ ## Examples
175
+
176
+ ### Create a Chatbot with Claude
177
+
178
+ ```bash
179
+ npm create pga-ai@latest my-chatbot \
180
+ --template chatbot \
181
+ --llm anthropic \
182
+ --boost
183
+ ```
184
+
185
+ ### Create a Code Assistant with Both LLMs
186
+
187
+ ```bash
188
+ npm create pga-ai@latest code-helper \
189
+ --template code-assistant \
190
+ --llm both \
191
+ --storage postgres \
192
+ --boost
193
+ ```
194
+
195
+ ### Create Custom Agent (Development)
196
+
197
+ ```bash
198
+ npm create pga-ai@latest my-agent \
199
+ --template custom \
200
+ --llm openai \
201
+ --storage memory
202
+ ```
203
+
204
+ ## Development Scripts
205
+
206
+ Generated projects include these npm scripts:
207
+
208
+ ```bash
209
+ npm run dev # Run with hot-reload (tsx)
210
+ npm run build # Compile TypeScript
211
+ npm start # Run compiled version
212
+ npm test # Run tests
213
+ ```
214
+
215
+ ## Environment Variables
216
+
217
+ The installer creates a `.env` file with these variables:
218
+
219
+ ```bash
220
+ # Anthropic API (if selected)
221
+ ANTHROPIC_API_KEY=your-api-key-here
222
+
223
+ # OpenAI API (if selected)
224
+ OPENAI_API_KEY=your-api-key-here
225
+
226
+ # PostgreSQL (if selected)
227
+ DATABASE_URL=postgresql://user:password@localhost:5432/pga_db
228
+
229
+ # Evolution Configuration
230
+ EVOLUTION_MODE=balanced # conservative | balanced | aggressive
231
+ ```
232
+
233
+ ## Troubleshooting
234
+
235
+ ### "Permission denied" error
236
+
237
+ Make sure you're using npm 7+ which supports `npm create`:
238
+ ```bash
239
+ npm --version # Should be 7.0.0 or higher
240
+ npm update -g npm
241
+ ```
242
+
243
+ ### "Module not found" errors
244
+
245
+ Ensure dependencies installed correctly:
246
+ ```bash
247
+ cd my-agent
248
+ rm -rf node_modules package-lock.json
249
+ npm install
250
+ ```
251
+
252
+ ### TypeScript errors
253
+
254
+ Check your Node.js version:
255
+ ```bash
256
+ node --version # Should be v18 or higher
257
+ ```
258
+
259
+ ## Learn More
260
+
261
+ - **Documentation:** [https://pga.ai/docs](https://pga.ai/docs)
262
+ - **API Reference:** [https://pga.ai/api](https://pga.ai/api)
263
+ - **Discord Community:** [https://discord.gg/pga](https://discord.gg/pga)
264
+ - **GitHub:** [https://github.com/pga-platform](https://github.com/pga-platform)
265
+
266
+ ## License
267
+
268
+ MIT © PGA Platform
269
+
270
+ ---
271
+
272
+ **Built with PGA** 🧬 — The world's first genomic self-evolving AI system
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Project generator
3
+ */
4
+ import type { ProjectConfig } from './prompts.js';
5
+ export declare function generateProject(projectName: string, config: ProjectConfig): Promise<void>;
6
+ //# sourceMappingURL=generator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.d.ts","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAMH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAsB,eAAe,CACjC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,GACtB,OAAO,CAAC,IAAI,CAAC,CAuBf"}
@@ -0,0 +1,231 @@
1
+ /**
2
+ * Project generator
3
+ */
4
+ import fs from 'fs-extra';
5
+ import path from 'path';
6
+ import chalk from 'chalk';
7
+ import ora from 'ora';
8
+ export async function generateProject(projectName, config) {
9
+ const spinner = ora('Creating project structure...').start();
10
+ try {
11
+ const projectPath = path.join(process.cwd(), projectName);
12
+ // Create project directory
13
+ await fs.ensureDir(projectPath);
14
+ // Generate files
15
+ await generatePackageJson(projectPath, projectName, config);
16
+ await generateTsConfig(projectPath);
17
+ await generateEnvFile(projectPath, config);
18
+ await generateEnvExample(projectPath, config);
19
+ await generateGitignore(projectPath);
20
+ await generateReadme(projectPath, projectName, config);
21
+ await generateSourceFiles(projectPath, config);
22
+ spinner.succeed(chalk.green('Project structure created!'));
23
+ }
24
+ catch (error) {
25
+ spinner.fail(chalk.red('Failed to create project'));
26
+ throw error;
27
+ }
28
+ }
29
+ async function generatePackageJson(projectPath, projectName, config) {
30
+ const packageJson = {
31
+ name: projectName,
32
+ version: '0.1.0',
33
+ type: 'module',
34
+ scripts: {
35
+ dev: 'tsx src/index.ts',
36
+ build: 'tsc',
37
+ start: 'node dist/index.js',
38
+ test: 'vitest',
39
+ },
40
+ dependencies: {},
41
+ devDependencies: {},
42
+ };
43
+ await fs.writeJson(path.join(projectPath, 'package.json'), packageJson, { spaces: 2 });
44
+ }
45
+ async function generateTsConfig(projectPath) {
46
+ const tsconfig = {
47
+ compilerOptions: {
48
+ target: 'ES2022',
49
+ module: 'ES2022',
50
+ lib: ['ES2022'],
51
+ moduleResolution: 'node',
52
+ rootDir: './src',
53
+ outDir: './dist',
54
+ strict: true,
55
+ esModuleInterop: true,
56
+ skipLibCheck: true,
57
+ forceConsistentCasingInFileNames: true,
58
+ resolveJsonModule: true,
59
+ },
60
+ include: ['src/**/*'],
61
+ exclude: ['node_modules', 'dist'],
62
+ };
63
+ await fs.writeJson(path.join(projectPath, 'tsconfig.json'), tsconfig, { spaces: 2 });
64
+ }
65
+ async function generateEnvFile(projectPath, config) {
66
+ let envContent = '# PGA Platform Configuration\n\n';
67
+ if (config.llmProvider === 'anthropic' || config.llmProvider === 'both') {
68
+ envContent += '# Anthropic API Key\nANTHROPIC_API_KEY=your-api-key-here\n\n';
69
+ }
70
+ if (config.llmProvider === 'openai' || config.llmProvider === 'both') {
71
+ envContent += '# OpenAI API Key\nOPENAI_API_KEY=your-api-key-here\n\n';
72
+ }
73
+ if (config.storage === 'postgres') {
74
+ envContent += '# PostgreSQL Connection\nDATABASE_URL=postgresql://user:password@localhost:5432/pga_db\n\n';
75
+ }
76
+ envContent += '# Evolution Configuration\nEVOLUTION_MODE=' + (config.evolutionBoost ? 'aggressive' : 'balanced') + '\n';
77
+ await fs.writeFile(path.join(projectPath, '.env'), envContent);
78
+ }
79
+ async function generateEnvExample(projectPath, config) {
80
+ let envContent = '# PGA Platform Configuration\n\n';
81
+ if (config.llmProvider === 'anthropic' || config.llmProvider === 'both') {
82
+ envContent += '# Anthropic API Key\nANTHROPIC_API_KEY=\n\n';
83
+ }
84
+ if (config.llmProvider === 'openai' || config.llmProvider === 'both') {
85
+ envContent += '# OpenAI API Key\nOPENAI_API_KEY=\n\n';
86
+ }
87
+ if (config.storage === 'postgres') {
88
+ envContent += '# PostgreSQL Connection\nDATABASE_URL=\n\n';
89
+ }
90
+ envContent += '# Evolution Configuration\nEVOLUTION_MODE=balanced\n';
91
+ await fs.writeFile(path.join(projectPath, '.env.example'), envContent);
92
+ }
93
+ async function generateGitignore(projectPath) {
94
+ const gitignore = `node_modules/
95
+ dist/
96
+ .env
97
+ .DS_Store
98
+ *.log
99
+ `;
100
+ await fs.writeFile(path.join(projectPath, '.gitignore'), gitignore);
101
+ }
102
+ async function generateReadme(projectPath, projectName, config) {
103
+ const readme = `# ${projectName}
104
+
105
+ Created with [PGA Platform](https://pga.ai) — Genomic Self-Evolving Prompts
106
+
107
+ ## 🚀 Quick Start
108
+
109
+ 1. **Configure environment**:
110
+ \`\`\`bash
111
+ cp .env.example .env
112
+ # Edit .env with your API keys
113
+ \`\`\`
114
+
115
+ 2. **Run development server**:
116
+ \`\`\`bash
117
+ npm run dev
118
+ \`\`\`
119
+
120
+ 3. **Build for production**:
121
+ \`\`\`bash
122
+ npm run build
123
+ npm start
124
+ \`\`\`
125
+
126
+ ## 📦 Configuration
127
+
128
+ - **LLM Provider**: ${config.llmProvider}
129
+ - **Storage**: ${config.storage}
130
+ - **Evolution Boost**: ${config.evolutionBoost ? 'Enabled (10x faster!)' : 'Disabled'}
131
+ - **Template**: ${config.template}
132
+
133
+ ## 📚 Documentation
134
+
135
+ - [PGA Documentation](https://pga.ai/docs)
136
+ - [API Reference](https://pga.ai/api)
137
+ - [Discord Community](https://discord.gg/pga)
138
+
139
+ ## 🛠️ Development
140
+
141
+ \`\`\`bash
142
+ npm run dev # Run in development mode
143
+ npm run build # Build for production
144
+ npm start # Run production build
145
+ npm test # Run tests
146
+ \`\`\`
147
+
148
+ ---
149
+
150
+ **Built with PGA** 🧬
151
+ `;
152
+ await fs.writeFile(path.join(projectPath, 'README.md'), readme);
153
+ }
154
+ async function generateSourceFiles(projectPath, config) {
155
+ const srcPath = path.join(projectPath, 'src');
156
+ await fs.ensureDir(srcPath);
157
+ // Generate main index.ts based on template
158
+ const indexContent = generateIndexFile(config);
159
+ await fs.writeFile(path.join(srcPath, 'index.ts'), indexContent);
160
+ // Generate example agent file
161
+ const agentContent = generateAgentFile(config);
162
+ await fs.writeFile(path.join(srcPath, 'agent.ts'), agentContent);
163
+ }
164
+ function generateIndexFile(config) {
165
+ let imports = `import 'dotenv/config';\n`;
166
+ if (config.llmProvider === 'anthropic') {
167
+ imports += `import { ClaudeAdapter } from '@pga-ai/adapters-llm-anthropic';\n`;
168
+ }
169
+ else if (config.llmProvider === 'openai') {
170
+ imports += `import { OpenAIAdapter } from '@pga-ai/adapters-llm-openai';\n`;
171
+ }
172
+ else {
173
+ imports += `import { ClaudeAdapter } from '@pga-ai/adapters-llm-anthropic';\nimport { OpenAIAdapter } from '@pga-ai/adapters-llm-openai';\n`;
174
+ }
175
+ if (config.storage === 'postgres') {
176
+ imports += `import { PostgresAdapter } from '@pga-ai/adapters-storage-postgres';\n`;
177
+ }
178
+ imports += `\nimport { runAgent } from './agent.js';\n\n`;
179
+ const llmSetup = config.llmProvider === 'anthropic'
180
+ ? `const llm = new ClaudeAdapter({\n apiKey: process.env.ANTHROPIC_API_KEY!,\n model: 'claude-sonnet-4-20250514',\n});\n`
181
+ : `const llm = new OpenAIAdapter({\n apiKey: process.env.OPENAI_API_KEY!,\n model: 'gpt-4-turbo-preview',\n});\n`;
182
+ return `${imports}async function main() {
183
+ console.log('🧬 Starting PGA Agent...\\n');
184
+
185
+ // Initialize LLM adapter
186
+ ${llmSetup}
187
+ // Run agent
188
+ await runAgent(llm);
189
+ }
190
+
191
+ main().catch(console.error);
192
+ `;
193
+ }
194
+ function generateAgentFile(config) {
195
+ const template = config.template;
196
+ let systemPrompt = '';
197
+ switch (template) {
198
+ case 'chatbot':
199
+ systemPrompt = 'You are a helpful AI assistant powered by PGA.';
200
+ break;
201
+ case 'code-assistant':
202
+ systemPrompt = 'You are an expert programming assistant powered by PGA.';
203
+ break;
204
+ case 'customer-support':
205
+ systemPrompt = 'You are a customer support agent powered by PGA.';
206
+ break;
207
+ case 'data-analysis':
208
+ systemPrompt = 'You are a data analysis expert powered by PGA.';
209
+ break;
210
+ default:
211
+ systemPrompt = 'You are an AI agent powered by PGA.';
212
+ }
213
+ return `import type { LLMAdapter } from '@pga-ai/core';
214
+
215
+ export async function runAgent(llm: LLMAdapter) {
216
+ console.log('Agent ready! Type your message:\\n');
217
+
218
+ // Example conversation
219
+ const response = await llm.generateText({
220
+ prompt: '${systemPrompt}\\n\\nUser: Hello! What can you do?',
221
+ temperature: 0.7,
222
+ maxTokens: 500,
223
+ });
224
+
225
+ console.log('Agent:', response.content);
226
+ console.log('\\n✨ Your PGA agent is working!');
227
+ console.log('Next: Integrate with PGA for auto-evolution\\n');
228
+ }
229
+ `;
230
+ }
231
+ //# sourceMappingURL=generator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"generator.js","sourceRoot":"","sources":["../src/generator.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,MAAM,UAAU,CAAC;AAC1B,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,GAAG,MAAM,KAAK,CAAC;AAGtB,MAAM,CAAC,KAAK,UAAU,eAAe,CACjC,WAAmB,EACnB,MAAqB;IAErB,MAAM,OAAO,GAAG,GAAG,CAAC,+BAA+B,CAAC,CAAC,KAAK,EAAE,CAAC;IAE7D,IAAI,CAAC;QACD,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,WAAW,CAAC,CAAC;QAE1D,2BAA2B;QAC3B,MAAM,EAAE,CAAC,SAAS,CAAC,WAAW,CAAC,CAAC;QAEhC,iBAAiB;QACjB,MAAM,mBAAmB,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QAC5D,MAAM,gBAAgB,CAAC,WAAW,CAAC,CAAC;QACpC,MAAM,eAAe,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC3C,MAAM,kBAAkB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAC9C,MAAM,iBAAiB,CAAC,WAAW,CAAC,CAAC;QACrC,MAAM,cAAc,CAAC,WAAW,EAAE,WAAW,EAAE,MAAM,CAAC,CAAC;QACvD,MAAM,mBAAmB,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;QAE/C,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,4BAA4B,CAAC,CAAC,CAAC;IAC/D,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACb,OAAO,CAAC,IA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@@ -0,0 +1,12 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * create-pga-ai — Interactive PGA Platform Installer
4
+ *
5
+ * One command to create a complete PGA agent project:
6
+ * npm create pga-ai@latest my-agent
7
+ *
8
+ * @author Luis Alfredo Velasquez Duran
9
+ * @since 2026-02-27
10
+ */
11
+ export {};
12
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG"}
package/dist/index.js ADDED
@@ -0,0 +1,108 @@
1
+ #!/usr/bin/env node
2
+ /**
3
+ * create-pga-ai — Interactive PGA Platform Installer
4
+ *
5
+ * One command to create a complete PGA agent project:
6
+ * npm create pga-ai@latest my-agent
7
+ *
8
+ * @author Luis Alfredo Velasquez Duran
9
+ * @since 2026-02-27
10
+ */
11
+ import { Command } from 'commander';
12
+ import chalk from 'chalk';
13
+ import figlet from 'figlet';
14
+ import boxen from 'boxen';
15
+ import { promptUser } from './prompts.js';
16
+ import { installDependencies } from './installer.js';
17
+ import { generateProject } from './generator.js';
18
+ const program = new Command();
19
+ // Display welcome banner
20
+ function displayBanner() {
21
+ console.log('\n');
22
+ console.log(chalk.cyan(figlet.textSync('PGA Platform', {
23
+ font: 'Standard',
24
+ horizontalLayout: 'default',
25
+ })));
26
+ console.log(boxen(chalk.white.bold('🧬 Genomic Self-Evolving Prompts for AI Agents\n') +
27
+ chalk.gray('World\'s First Auto-Evolving AI System'), {
28
+ padding: 1,
29
+ margin: 1,
30
+ borderStyle: 'round',
31
+ borderColor: 'cyan',
32
+ }));
33
+ }
34
+ // Main CLI
35
+ program
36
+ .name('create-pga-ai')
37
+ .description('Create a new PGA agent project')
38
+ .version('0.1.0')
39
+ .argument('[project-name]', 'Project name')
40
+ .option('--template <template>', 'Project template (chatbot|code-assistant|customer-support|custom)')
41
+ .option('--llm <provider>', 'LLM provider (anthropic|openai|both)')
42
+ .option('--storage <type>', 'Storage type (postgres|memory)')
43
+ .option('--boost', 'Enable Evolution Boost 2.0')
44
+ .option('--skip-install', 'Skip dependency installation')
45
+ .action(async (projectName, options) => {
46
+ try {
47
+ displayBanner();
48
+ // Get project name
49
+ let name = projectName;
50
+ if (!name) {
51
+ const { projectName: inputName } = await import('inquirer').then(inquirer => inquirer.default.prompt([
52
+ {
53
+ type: 'input',
54
+ name: 'projectName',
55
+ message: 'Project name:',
56
+ default: 'my-pga-agent',
57
+ validate: (input) => {
58
+ if (!input)
59
+ return 'Project name is required';
60
+ if (!/^[a-z0-9-]+$/.test(input)) {
61
+ return 'Project name must be lowercase with hyphens only';
62
+ }
63
+ return true;
64
+ },
65
+ },
66
+ ]));
67
+ name = inputName;
68
+ }
69
+ console.log(chalk.cyan('\n📋 Let\'s configure your PGA agent...\n'));
70
+ // Prompt user for configuration
71
+ const config = await promptUser(options);
72
+ // Generate project
73
+ console.log(chalk.cyan('\n🏗️ Creating project structure...\n'));
74
+ await generateProject(name, config);
75
+ // Install dependencies
76
+ if (!options.skipInstall) {
77
+ console.log(chalk.cyan('\n📦 Installing dependencies...\n'));
78
+ await installDependencies(name, config);
79
+ }
80
+ // Success message
81
+ displaySuccessMessage(name, config);
82
+ }
83
+ catch (error) {
84
+ console.error(chalk.red('\n❌ Error:'), error);
85
+ process.exit(1);
86
+ }
87
+ });
88
+ function displaySuccessMessage(projectName, config) {
89
+ console.log('\n');
90
+ console.log(boxen(chalk.green.bold('🎉 Success! Your PGA agent is ready.\n\n') +
91
+ chalk.white('Next steps:\n') +
92
+ chalk.cyan(` cd ${projectName}\n`) +
93
+ chalk.cyan(' npm run dev\n\n') +
94
+ chalk.white('Features enabled:\n') +
95
+ chalk.gray(` • LLM: ${config.llmProvider}\n`) +
96
+ chalk.gray(` • Storage: ${config.storage}\n`) +
97
+ chalk.gray(` • Evolution Boost: ${config.evolutionBoost ? 'Yes (10x faster!)' : 'No'}\n`) +
98
+ chalk.gray(` • Template: ${config.template}\n\n`) +
99
+ chalk.white('Documentation: ') + chalk.cyan('https://pga.ai/docs\n') +
100
+ chalk.white('Discord: ') + chalk.cyan('https://discord.gg/pga'), {
101
+ padding: 1,
102
+ margin: 1,
103
+ borderStyle: 'round',
104
+ borderColor: 'green',
105
+ }));
106
+ }
107
+ program.parse();
108
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA;;;;;;;;GAQG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,MAAM,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAEjD,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAE9B,yBAAyB;AACzB,SAAS,aAAa;IAClB,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;IAClB,OAAO,CAAC,GAAG,CACP,KAAK,CAAC,IAAI,CACN,MAAM,CAAC,QAAQ,CAAC,cAAc,EAAE;QAC5B,IAAI,EAAE,UAAU;QAChB,gBAAgB,EAAE,SAAS;KAC9B,CAAC,CACL,CACJ,CAAC;IAEF,OAAO,CAAC,GAAG,CACP,KAAK,CACD,KAAK,CAAC,KAAK,CAAC,IAAI,CAAC,kDAAkD,CAAC;QACpE,KAAK,CAAC,IAAI,CAAC,wCAAwC,CAAC,EACpD;QACI,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;QACT,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,MAAM;KACtB,CACJ,CACJ,CAAC;AACN,CAAC;AAED,WAAW;AACX,OAAO;KACF,IAAI,CAAC,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AAC,wBAAwB,MAAM,CAAC,cAAc,CAAC,CAAC,CAAC,mBAAmB,CAAC,CAAC,CAAC,IAAI,IAAI,CAAC;QAC1F,KAAK,CAAC,IAAI,CAAC,iBAAiB,MAAM,CAAC,QAAQ,MAAM,CAAC;QAClD,KAAK,CAAC,KAAK,CAAC,iBAAiB,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC;QACpE,KAAK,CAAC,KAAK,CAAC,WAAW,CAAC,GAAG,KAAK,CAAC,IAAI,CAAC,wBAAwB,CAAC,EAC/D;QACI,OAAO,EAAE,CAAC;QACV,MAAM,EAAE,CAAC;QACT,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,OAAO;KACvB,CACJ,CACJ,CAAC;AACN,CAAC;AAED,OAAO,CAAC,KAAK,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * Dependency installer
3
+ */
4
+ import type { ProjectConfig } from './prompts.js';
5
+ export declare function installDependencies(projectName: string, config: ProjectConfig): Promise<void>;
6
+ //# sourceMappingURL=installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAElD,wBAAsB,mBAAmB,CACrC,WAAW,EAAE,MAAM,EACnB,MAAM,EAAE,aAAa,GACtB,OAAO,CAAC,IAAI,CAAC,CA8Cf"}
@@ -0,0 +1,45 @@
1
+ /**
2
+ * Dependency installer
3
+ */
4
+ import { execa } from 'execa';
5
+ import ora from 'ora';
6
+ import chalk from 'chalk';
7
+ export async function installDependencies(projectName, config) {
8
+ const spinner = ora('Installing dependencies...').start();
9
+ try {
10
+ // Determine which packages to install
11
+ const packages = ['@pga-ai/core'];
12
+ // LLM adapters
13
+ if (config.llmProvider === 'anthropic' || config.llmProvider === 'both') {
14
+ packages.push('@pga-ai/adapters-llm-anthropic');
15
+ }
16
+ if (config.llmProvider === 'openai' || config.llmProvider === 'both') {
17
+ packages.push('@pga-ai/adapters-llm-openai');
18
+ }
19
+ // Storage adapters
20
+ if (config.storage === 'postgres') {
21
+ packages.push('@pga-ai/adapters-storage-postgres');
22
+ }
23
+ // Additional dependencies
24
+ packages.push('dotenv', 'zod');
25
+ spinner.text = `Installing ${packages.length} packages...`;
26
+ // Install using npm
27
+ await execa('npm', ['install', ...packages], {
28
+ cwd: projectName,
29
+ stdio: 'ignore',
30
+ });
31
+ // Install dev dependencies
32
+ const devPackages = ['typescript', '@types/node', 'tsx', 'vitest'];
33
+ spinner.text = 'Installing dev dependencies...';
34
+ await execa('npm', ['install', '--save-dev', ...devPackages], {
35
+ cwd: projectName,
36
+ stdio: 'ignore',
37
+ });
38
+ spinner.succeed(chalk.green('Dependencies installed successfully!'));
39
+ }
40
+ catch (error) {
41
+ spinner.fail(chalk.red('Failed to install dependencies'));
42
+ throw error;
43
+ }
44
+ }
45
+ //# sourceMappingURL=installer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.js","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAC;AAC9B,OAAO,GAAG,MAAM,KAAK,CAAC;AACtB,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,MAAM,CAAC,KAAK,UAAU,mBAAmB,CACrC,WAAmB,EACnB,MAAqB;IAErB,MAAM,OAAO,GAAG,GAAG,CAAC,4BAA4B,CAAC,CAAC,KAAK,EAAE,CAAC;IAE1D,IAAI,CAAC;QACD,sCAAsC;QACtC,MAAM,QAAQ,GAAG,CAAC,cAAc,CAAC,CAAC;QAElC,eAAe;QACf,IAAI,MAAM,CAAC,WAAW,KAAK,WAAW,IAAI,MAAM,CAAC,WAAW,KAAK,MAAM,EAAE,CAAC;YACtE,QAAQ,CAAC,IAAI,CAAC,gCAAgC,CAAC,CAAC;QACpD,CAA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
+ llmProvider: 'anthropic' | 'openai' | 'both';
6
+ storage: 'postgres' | 'memory';
7
+ evolutionBoost: boolean;
8
+ template: 'chatbot' | 'code-assistant' | 'customer-support' | 'data-analysis' | 'custom';
9
+ }
10
+ export declare function promptUser(cliOptions: any): Promise<ProjectConfig>;
11
+ //# sourceMappingURL=prompts.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.d.ts","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAKH,MAAM,WAAW,aAAa;IAC1B,WAAW,EAAE,WAAW,GAAG,QAAQ,GAAG,MAAM,CAAC;IAC7C,OAAO,EAAE,UAAU,GAAG,QAAQ,CAAC;IAC/B,cAAc,EAAE,OAAO,CAAC;IACxB,QAAQ,EAAE,SAAS,GAAG,gBAAgB,GAAG,kBAAkB,GAAG,eAAe,GAAG,QAAQ,CAAC;CAC5F;AAED,wBAAsB,UAAU,CAAC,UAAU,EAAE,GAAG,GAAG,OAAO,CAAC,aAAa,CAAC,CAiGxE"}
@@ -0,0 +1,98 @@
1
+ /**
2
+ * Interactive prompts for project configuration
3
+ */
4
+ import inquirer from 'inquirer';
5
+ import chalk from 'chalk';
6
+ export async function promptUser(cliOptions) {
7
+ const questions = [];
8
+ // LLM Provider
9
+ if (!cliOptions.llm) {
10
+ questions.push({
11
+ type: 'list',
12
+ name: 'llmProvider',
13
+ message: 'Which LLM provider?',
14
+ choices: [
15
+ {
16
+ name: chalk.cyan('Anthropic Claude') + chalk.gray(' (Recommended)'),
17
+ value: 'anthropic',
18
+ },
19
+ {
20
+ name: 'OpenAI GPT',
21
+ value: 'openai',
22
+ },
23
+ {
24
+ name: 'Both (maximum flexibility)',
25
+ value: 'both',
26
+ },
27
+ ],
28
+ default: 'anthropic',
29
+ });
30
+ }
31
+ // Storage
32
+ if (!cliOptions.storage) {
33
+ questions.push({
34
+ type: 'list',
35
+ name: 'storage',
36
+ message: 'Which storage?',
37
+ choices: [
38
+ {
39
+ name: chalk.cyan('PostgreSQL') + chalk.gray(' (Production-ready)'),
40
+ value: 'postgres',
41
+ },
42
+ {
43
+ name: 'In-Memory' + chalk.gray(' (Development/Testing)'),
44
+ value: 'memory',
45
+ },
46
+ ],
47
+ default: 'postgres',
48
+ });
49
+ }
50
+ // Evolution Boost
51
+ if (!cliOptions.boost) {
52
+ questions.push({
53
+ type: 'confirm',
54
+ name: 'evolutionBoost',
55
+ message: 'Enable Evolution Boost 2.0? ' + chalk.gray('(10x faster evolution)'),
56
+ default: true,
57
+ });
58
+ }
59
+ // Template
60
+ if (!cliOptions.template) {
61
+ questions.push({
62
+ type: 'list',
63
+ name: 'template',
64
+ message: 'Project template?',
65
+ choices: [
66
+ {
67
+ name: chalk.cyan('Chatbot Agent') + chalk.gray(' (General conversation)'),
68
+ value: 'chatbot',
69
+ },
70
+ {
71
+ name: 'Code Assistant' + chalk.gray(' (Programming helper)'),
72
+ value: 'code-assistant',
73
+ },
74
+ {
75
+ name: 'Customer Support' + chalk.gray(' (Support automation)'),
76
+ value: 'customer-support',
77
+ },
78
+ {
79
+ name: 'Data Analysis' + chalk.gray(' (Analytics & insights)'),
80
+ value: 'data-analysis',
81
+ },
82
+ {
83
+ name: 'Custom' + chalk.gray(' (Blank starter)'),
84
+ value: 'custom',
85
+ },
86
+ ],
87
+ default: 'chatbot',
88
+ });
89
+ }
90
+ const answers = await inquirer.prompt(questions);
91
+ return {
92
+ llmProvider: cliOptions.llm || answers.llmProvider,
93
+ storage: cliOptions.storage || answers.storage,
94
+ evolutionBoost: cliOptions.boost || answers.evolutionBoost,
95
+ template: cliOptions.template || answers.template,
96
+ };
97
+ }
98
+ //# sourceMappingURL=prompts.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"prompts.js","sourceRoot":"","sources":["../src/prompts.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,QAAQ,MAAM,UAAU,CAAC;AAChC,OAAO,KAAK,MAAM,OAAO,CAAC;AAS1B,MAAM,CAAC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,CAAC,QAAQ;KACpD,CAAC;AACN,CAAC"}
package/package.json ADDED
@@ -0,0 +1,62 @@
1
+ {
2
+ "name": "create-pga-ai",
3
+ "version": "0.1.0",
4
+ "description": "Create PGA agents with one command - Interactive installer for PGA Platform",
5
+ "author": "Luis Alfredo Velasquez Duran <contact@pga.ai>",
6
+ "license": "MIT",
7
+ "repository": {
8
+ "type": "git",
9
+ "url": "https://github.com/pga-platform/pga.git",
10
+ "directory": "packages/create-pga-ai"
11
+ },
12
+ "homepage": "https://pga.ai",
13
+ "bugs": {
14
+ "url": "https://github.com/pga-platform/pga/issues"
15
+ },
16
+ "type": "module",
17
+ "bin": {
18
+ "create-pga-ai": "./dist/index.js"
19
+ },
20
+ "files": [
21
+ "dist",
22
+ "templates"
23
+ ],
24
+ "scripts": {
25
+ "build": "tsc",
26
+ "dev": "tsc --watch",
27
+ "clean": "rm -rf dist"
28
+ },
29
+ "keywords": [
30
+ "pga",
31
+ "create-pga-ai",
32
+ "installer",
33
+ "cli",
34
+ "generator",
35
+ "scaffold",
36
+ "ai-agents",
37
+ "prompt-evolution"
38
+ ],
39
+ "dependencies": {
40
+ "commander": "^12.0.0",
41
+ "inquirer": "^9.2.15",
42
+ "chalk": "^5.3.0",
43
+ "ora": "^8.0.1",
44
+ "boxen": "^7.1.1",
45
+ "figlet": "^1.7.0",
46
+ "execa": "^8.0.1",
47
+ "fs-extra": "^11.2.0"
48
+ },
49
+ "devDependencies": {
50
+ "@types/node": "^20.12.7",
51
+ "@types/inquirer": "^9.0.7",
52
+ "@types/figlet": "^1.5.8",
53
+ "@types/fs-extra": "^11.0.4",
54
+ "typescript": "^5.6.0"
55
+ },
56
+ "engines": {
57
+ "node": ">=20.0.0"
58
+ },
59
+ "publishConfig": {
60
+ "access": "public"
61
+ }
62
+ }