@cristiancorreau/forge 2.7.0 → 2.8.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 (39) hide show
  1. package/README.md +64 -5
  2. package/dist/cli.js +44 -10
  3. package/dist/cli.js.map +1 -1
  4. package/dist/commands/aitmpl-search.d.ts +2 -0
  5. package/dist/commands/aitmpl-search.d.ts.map +1 -0
  6. package/dist/commands/aitmpl-search.js +711 -0
  7. package/dist/commands/aitmpl-search.js.map +1 -0
  8. package/dist/commands/doctor.d.ts.map +1 -1
  9. package/dist/commands/doctor.js +113 -2
  10. package/dist/commands/doctor.js.map +1 -1
  11. package/dist/commands/init.js +1 -1
  12. package/dist/commands/migrate.d.ts +2 -0
  13. package/dist/commands/migrate.d.ts.map +1 -0
  14. package/dist/commands/migrate.js +261 -0
  15. package/dist/commands/migrate.js.map +1 -0
  16. package/dist/commands/scaffold.d.ts +2 -0
  17. package/dist/commands/scaffold.d.ts.map +1 -0
  18. package/dist/commands/scaffold.js +214 -0
  19. package/dist/commands/scaffold.js.map +1 -0
  20. package/dist/commands/skills.d.ts +2 -0
  21. package/dist/commands/skills.d.ts.map +1 -0
  22. package/dist/commands/skills.js +86 -0
  23. package/dist/commands/skills.js.map +1 -0
  24. package/dist/commands/teardown.d.ts +2 -0
  25. package/dist/commands/teardown.d.ts.map +1 -0
  26. package/dist/commands/teardown.js +186 -0
  27. package/dist/commands/teardown.js.map +1 -0
  28. package/dist/commands/wiki.d.ts +2 -0
  29. package/dist/commands/wiki.d.ts.map +1 -0
  30. package/dist/commands/wiki.js +400 -0
  31. package/dist/commands/wiki.js.map +1 -0
  32. package/dist/lib/catalog.d.ts +22 -0
  33. package/dist/lib/catalog.d.ts.map +1 -0
  34. package/dist/lib/catalog.js +49 -0
  35. package/dist/lib/catalog.js.map +1 -0
  36. package/dist/lib/yaml.d.ts +4 -0
  37. package/dist/lib/yaml.d.ts.map +1 -1
  38. package/dist/lib/yaml.js.map +1 -1
  39. package/package.json +1 -1
@@ -0,0 +1,711 @@
1
+ import { bold, dim, green, cyan, gray } from '../ui/colors.js';
2
+ import { box } from '../ui/box.js';
3
+ const HELP = `Usage: forge aitmpl-search <query> [options]
4
+
5
+ Search the curated offline catalog of frameworks, MCP servers, profiles,
6
+ tools and resources for AI agent development. Works fully offline.
7
+
8
+ Arguments:
9
+ <query> Search term (matches name, description, tags, language)
10
+
11
+ Options:
12
+ -c, --category <cat> Filter by category:
13
+ framework, mcp-server, profile, tool, resource
14
+ --limit <n> Max results (default: 20)
15
+ --json Output results as JSON
16
+ --list-categories List available categories and item counts
17
+ -h, --help Show this help
18
+
19
+ Examples:
20
+ forge aitmpl-search fastapi
21
+ forge aitmpl-search "mcp postgres"
22
+ forge aitmpl-search --category mcp-server
23
+ forge aitmpl-search --category profile
24
+ forge aitmpl-search rails --json
25
+ forge aitmpl-search --list-categories
26
+ `;
27
+ const CATALOG = [
28
+ // ── Frameworks ──────────────────────────────────────────────────────────
29
+ {
30
+ name: 'cristiancorreau/forge',
31
+ description: 'Framework de desarrollo con agentes IA para equipos. Profiles para Next.js, Astro, FastAPI, Rails, NestJS, Express, Expo y más. Wizard CLI interactivo.',
32
+ category: 'framework',
33
+ tags: ['claude-code', 'agents', 'typescript', 'python', 'ruby', 'nextjs', 'astro', 'fastapi', 'rails', 'nestjs', 'express', 'expo'],
34
+ url: 'https://github.com/cristiancorreau/forge',
35
+ language: 'Python',
36
+ },
37
+ {
38
+ name: 'paul-gauthier/aider',
39
+ description: 'Pair programming con LLMs en la terminal. Soporta Claude, GPT-4, Gemini. Edita archivos directamente y hace commits automáticos.',
40
+ category: 'framework',
41
+ tags: ['claude', 'gpt4', 'pair-programming', 'git', 'terminal'],
42
+ url: 'https://github.com/paul-gauthier/aider',
43
+ language: 'Python',
44
+ },
45
+ {
46
+ name: 'BuilderIO/micro-agent',
47
+ description: 'Agente IA que escribe código hasta que los tests pasan. TDD automático: genera código iterativamente hasta lograr green tests.',
48
+ category: 'framework',
49
+ tags: ['tdd', 'testing', 'code-generation', 'claude', 'openai'],
50
+ url: 'https://github.com/BuilderIO/micro-agent',
51
+ language: 'TypeScript',
52
+ },
53
+ {
54
+ name: 'anthropics/anthropic-quickstarts',
55
+ description: 'Quickstarts oficiales de Anthropic: customer support agent, computer use, multi-agent portfolio. Ejemplos de referencia.',
56
+ category: 'framework',
57
+ tags: ['claude', 'anthropic', 'multi-agent', 'computer-use', 'quickstart'],
58
+ url: 'https://github.com/anthropics/anthropic-quickstarts',
59
+ language: 'Python',
60
+ },
61
+ {
62
+ name: 'anthropics/claude-code-action',
63
+ description: 'GitHub Action oficial para usar Claude Code en CI/CD. Permite que Claude revise PRs, corrija bugs y responda issues automáticamente.',
64
+ category: 'framework',
65
+ tags: ['claude-code', 'github-actions', 'ci-cd', 'pr-review'],
66
+ url: 'https://github.com/anthropics/claude-code-action',
67
+ language: 'TypeScript',
68
+ },
69
+ // ── MCP Servers — oficiales ──────────────────────────────────────────────
70
+ {
71
+ name: 'MCP — filesystem',
72
+ description: 'Acceso seguro al sistema de archivos local con control de directorios permitidos. Leer, escribir, listar y buscar archivos.',
73
+ category: 'mcp-server',
74
+ tags: ['filesystem', 'files', 'read', 'write', 'mcp', 'oficial'],
75
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/filesystem',
76
+ language: 'TypeScript',
77
+ install: {
78
+ slug: 'filesystem',
79
+ command: 'npx',
80
+ args: ['-y', '@modelcontextprotocol/server-filesystem', '{ALLOWED_DIR}'],
81
+ params: [{ key: 'ALLOWED_DIR', label: 'Directorio permitido', default: '.' }],
82
+ env: [],
83
+ },
84
+ },
85
+ {
86
+ name: 'MCP — git',
87
+ description: 'Operaciones git: leer historial, diffs, commits, branches y status. Integración completa con repositorios git locales.',
88
+ category: 'mcp-server',
89
+ tags: ['git', 'version-control', 'commits', 'diff', 'mcp', 'oficial'],
90
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/git',
91
+ language: 'Python',
92
+ install: {
93
+ slug: 'git',
94
+ command: 'uvx',
95
+ args: ['mcp-server-git', '--repository', '{REPO_PATH}'],
96
+ params: [{ key: 'REPO_PATH', label: 'Ruta del repositorio git', default: '.' }],
97
+ env: [],
98
+ },
99
+ },
100
+ {
101
+ name: 'MCP — github',
102
+ description: 'Integración con la API de GitHub: repos, issues, PRs, branches, commits, búsqueda de código. Requiere GITHUB_TOKEN.',
103
+ category: 'mcp-server',
104
+ tags: ['github', 'issues', 'pull-requests', 'api', 'mcp', 'oficial'],
105
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/github',
106
+ language: 'TypeScript',
107
+ install: {
108
+ slug: 'github',
109
+ command: 'npx',
110
+ args: ['-y', '@modelcontextprotocol/server-github'],
111
+ params: [],
112
+ env: [{ key: 'GITHUB_TOKEN', label: 'GitHub personal access token (ghp_...)' }],
113
+ },
114
+ },
115
+ {
116
+ name: 'MCP — postgres',
117
+ description: 'Acceso read-only a bases de datos PostgreSQL. Ejecutar queries, explorar schemas y tablas. Ideal para análisis de datos.',
118
+ category: 'mcp-server',
119
+ tags: ['postgres', 'postgresql', 'database', 'sql', 'mcp', 'oficial'],
120
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/postgres',
121
+ language: 'TypeScript',
122
+ install: {
123
+ slug: 'postgres',
124
+ command: 'npx',
125
+ args: ['-y', '@modelcontextprotocol/server-postgres', '{CONNECTION_STRING}'],
126
+ params: [{ key: 'CONNECTION_STRING', label: 'PostgreSQL connection string', default: 'postgresql://localhost/mydb' }],
127
+ env: [],
128
+ },
129
+ },
130
+ {
131
+ name: 'MCP — sqlite',
132
+ description: 'Interacción con bases de datos SQLite: queries, introspección de schema, gestión de datos. Memo de conocimiento incorporado.',
133
+ category: 'mcp-server',
134
+ tags: ['sqlite', 'database', 'sql', 'local', 'mcp', 'oficial'],
135
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/sqlite',
136
+ language: 'Python',
137
+ install: {
138
+ slug: 'sqlite',
139
+ command: 'uvx',
140
+ args: ['mcp-server-sqlite', '--db-path', '{DB_PATH}'],
141
+ params: [{ key: 'DB_PATH', label: 'Ruta del archivo SQLite', default: './data.db' }],
142
+ env: [],
143
+ },
144
+ },
145
+ {
146
+ name: 'MCP — fetch',
147
+ description: 'Fetch de URLs y conversión a Markdown. Permite a Claude leer páginas web, documentación y APIs HTTP.',
148
+ category: 'mcp-server',
149
+ tags: ['http', 'fetch', 'web', 'scraping', 'markdown', 'mcp', 'oficial'],
150
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/fetch',
151
+ language: 'Python',
152
+ install: {
153
+ slug: 'fetch',
154
+ command: 'uvx',
155
+ args: ['mcp-server-fetch'],
156
+ params: [],
157
+ env: [],
158
+ },
159
+ },
160
+ {
161
+ name: 'MCP — brave-search',
162
+ description: 'Búsqueda web con Brave Search API. Web search y local search con privacidad. Requiere BRAVE_API_KEY.',
163
+ category: 'mcp-server',
164
+ tags: ['search', 'web-search', 'brave', 'internet', 'mcp', 'oficial'],
165
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/brave-search',
166
+ language: 'TypeScript',
167
+ install: {
168
+ slug: 'brave-search',
169
+ command: 'npx',
170
+ args: ['-y', '@modelcontextprotocol/server-brave-search'],
171
+ params: [],
172
+ env: [{ key: 'BRAVE_API_KEY', label: 'Brave Search API key' }],
173
+ },
174
+ },
175
+ {
176
+ name: 'MCP — slack',
177
+ description: 'Integración con Slack: enviar mensajes, leer canales, gestionar usuarios. Requiere Slack Bot Token.',
178
+ category: 'mcp-server',
179
+ tags: ['slack', 'messaging', 'communication', 'mcp', 'oficial'],
180
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/slack',
181
+ language: 'TypeScript',
182
+ install: {
183
+ slug: 'slack',
184
+ command: 'npx',
185
+ args: ['-y', '@modelcontextprotocol/server-slack'],
186
+ params: [],
187
+ env: [
188
+ { key: 'SLACK_BOT_TOKEN', label: 'Slack Bot Token (xoxb-...)' },
189
+ { key: 'SLACK_TEAM_ID', label: 'Slack Team ID' },
190
+ ],
191
+ },
192
+ },
193
+ {
194
+ name: 'MCP — puppeteer',
195
+ description: 'Automatización de browser con Puppeteer: navegar, hacer screenshots, rellenar formularios y ejecutar JavaScript.',
196
+ category: 'mcp-server',
197
+ tags: ['puppeteer', 'browser', 'automation', 'screenshot', 'scraping', 'mcp', 'oficial'],
198
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/puppeteer',
199
+ language: 'TypeScript',
200
+ install: {
201
+ slug: 'puppeteer',
202
+ command: 'npx',
203
+ args: ['-y', '@modelcontextprotocol/server-puppeteer'],
204
+ params: [],
205
+ env: [],
206
+ },
207
+ },
208
+ {
209
+ name: 'MCP — sequential-thinking',
210
+ description: 'Herramienta de razonamiento paso a paso con revisión y backtracking. Para problemas complejos que requieren análisis estructurado.',
211
+ category: 'mcp-server',
212
+ tags: ['reasoning', 'thinking', 'analysis', 'chain-of-thought', 'mcp', 'oficial'],
213
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/sequentialthinking',
214
+ language: 'TypeScript',
215
+ install: {
216
+ slug: 'sequential-thinking',
217
+ command: 'npx',
218
+ args: ['-y', '@modelcontextprotocol/server-sequential-thinking'],
219
+ params: [],
220
+ env: [],
221
+ },
222
+ },
223
+ {
224
+ name: 'MCP — memory',
225
+ description: 'Grafo de conocimiento persistente. Claude puede guardar y recuperar información entre conversaciones con entidades y relaciones.',
226
+ category: 'mcp-server',
227
+ tags: ['memory', 'knowledge-graph', 'persistence', 'mcp', 'oficial'],
228
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/memory',
229
+ language: 'TypeScript',
230
+ install: {
231
+ slug: 'memory',
232
+ command: 'npx',
233
+ args: ['-y', '@modelcontextprotocol/server-memory'],
234
+ params: [],
235
+ env: [],
236
+ },
237
+ },
238
+ {
239
+ name: 'MCP — everything',
240
+ description: 'Servidor MCP de referencia con prompts, tools y resources de ejemplo. Útil para probar clientes MCP y aprender el protocolo.',
241
+ category: 'mcp-server',
242
+ tags: ['reference', 'testing', 'demo', 'mcp', 'oficial'],
243
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/everything',
244
+ language: 'TypeScript',
245
+ install: {
246
+ slug: 'everything',
247
+ command: 'npx',
248
+ args: ['-y', '@modelcontextprotocol/server-everything'],
249
+ params: [],
250
+ env: [],
251
+ },
252
+ },
253
+ // ── MCP Servers — comunidad ───────────────────────────────────────────────
254
+ {
255
+ name: 'MCP — supabase (comunidad)',
256
+ description: 'Integración con Supabase: ejecutar queries SQL, gestionar tablas, auth y storage via MCP.',
257
+ category: 'mcp-server',
258
+ tags: ['supabase', 'postgres', 'database', 'auth', 'storage', 'mcp'],
259
+ url: 'https://github.com/supabase-community/supabase-mcp',
260
+ language: 'TypeScript',
261
+ install: {
262
+ slug: 'supabase',
263
+ command: 'npx',
264
+ args: ['-y', '@supabase/mcp-server-supabase', '--access-token', '{ACCESS_TOKEN}'],
265
+ params: [{ key: 'ACCESS_TOKEN', label: 'Supabase personal access token' }],
266
+ env: [],
267
+ },
268
+ },
269
+ {
270
+ name: 'MCP — Cloudflare',
271
+ description: 'Gestión de Workers, KV, R2, D1, AI Gateway y Vectorize de Cloudflare via MCP. Oficial de Cloudflare.',
272
+ category: 'mcp-server',
273
+ tags: ['cloudflare', 'workers', 'kv', 'r2', 'd1', 'edge', 'mcp'],
274
+ url: 'https://github.com/cloudflare/mcp-server-cloudflare',
275
+ language: 'TypeScript',
276
+ install: {
277
+ slug: 'cloudflare',
278
+ command: 'npx',
279
+ args: ['-y', '@cloudflare/mcp-server-cloudflare'],
280
+ params: [],
281
+ env: [{ key: 'CLOUDFLARE_API_TOKEN', label: 'Cloudflare API token' }],
282
+ },
283
+ },
284
+ {
285
+ name: 'MCP — Vercel',
286
+ description: 'Gestión de proyectos, deploys, dominios y logs de Vercel via MCP. Integración oficial.',
287
+ category: 'mcp-server',
288
+ tags: ['vercel', 'deploy', 'serverless', 'hosting', 'mcp'],
289
+ url: 'https://github.com/vercel/mcp-server',
290
+ language: 'TypeScript',
291
+ install: {
292
+ slug: 'vercel',
293
+ command: 'npx',
294
+ args: ['-y', '@vercel/mcp-adapter'],
295
+ params: [],
296
+ env: [{ key: 'VERCEL_TOKEN', label: 'Vercel API token' }],
297
+ },
298
+ },
299
+ {
300
+ name: 'MCP — Linear',
301
+ description: 'Integración con Linear: crear y consultar issues, proyectos y cycles. Para equipos que usan Linear como tracker.',
302
+ category: 'mcp-server',
303
+ tags: ['linear', 'project-management', 'issues', 'mcp'],
304
+ url: 'https://github.com/linear/linear-mcp',
305
+ language: 'TypeScript',
306
+ install: {
307
+ slug: 'linear',
308
+ command: 'npx',
309
+ args: ['-y', '@linear/mcp-server'],
310
+ params: [],
311
+ env: [{ key: 'LINEAR_API_KEY', label: 'Linear API key' }],
312
+ },
313
+ },
314
+ {
315
+ name: 'MCP — Playwright',
316
+ description: 'Automatización de browser con Playwright via MCP. Navegación, screenshots, testing E2E e interacción con páginas web.',
317
+ category: 'mcp-server',
318
+ tags: ['playwright', 'browser', 'e2e', 'testing', 'automation', 'mcp'],
319
+ url: 'https://github.com/microsoft/playwright-mcp',
320
+ language: 'TypeScript',
321
+ install: {
322
+ slug: 'playwright',
323
+ command: 'npx',
324
+ args: ['-y', '@playwright/mcp@latest'],
325
+ params: [],
326
+ env: [],
327
+ },
328
+ },
329
+ {
330
+ name: 'MCP — Sentry',
331
+ description: 'Consulta issues, eventos y trazas de Sentry. Permite a Claude diagnosticar errores de producción directamente.',
332
+ category: 'mcp-server',
333
+ tags: ['sentry', 'errors', 'monitoring', 'debugging', 'mcp'],
334
+ url: 'https://github.com/getsentry/sentry-mcp',
335
+ language: 'Python',
336
+ install: {
337
+ slug: 'sentry',
338
+ command: 'uvx',
339
+ args: ['mcp-server-sentry'],
340
+ params: [],
341
+ env: [{ key: 'SENTRY_AUTH_TOKEN', label: 'Sentry auth token' }],
342
+ },
343
+ },
344
+ {
345
+ name: 'MCP — Docker',
346
+ description: 'Gestión de contenedores, imágenes y volúmenes Docker via MCP. Ejecutar y gestionar el ciclo de vida de containers.',
347
+ category: 'mcp-server',
348
+ tags: ['docker', 'containers', 'devops', 'infrastructure', 'mcp'],
349
+ url: 'https://github.com/ckreiling/mcp-server-docker',
350
+ language: 'Python',
351
+ install: {
352
+ slug: 'docker',
353
+ command: 'uvx',
354
+ args: ['mcp-server-docker'],
355
+ params: [],
356
+ env: [],
357
+ },
358
+ },
359
+ {
360
+ name: 'MCP — AWS (aws-kb-retrieval)',
361
+ description: 'Retrieval desde AWS Knowledge Base. Para proyectos en AWS que usan Bedrock Knowledge Bases.',
362
+ category: 'mcp-server',
363
+ tags: ['aws', 'bedrock', 'knowledge-base', 'rag', 'mcp', 'oficial'],
364
+ url: 'https://github.com/modelcontextprotocol/servers/tree/main/src/aws-kb-retrieval-server',
365
+ language: 'TypeScript',
366
+ install: {
367
+ slug: 'aws-kb',
368
+ command: 'npx',
369
+ args: ['-y', '@modelcontextprotocol/server-aws-kb-retrieval'],
370
+ params: [],
371
+ env: [
372
+ { key: 'AWS_ACCESS_KEY_ID', label: 'AWS Access Key ID' },
373
+ { key: 'AWS_SECRET_ACCESS_KEY', label: 'AWS Secret Access Key' },
374
+ { key: 'AWS_REGION', label: 'AWS Region', default: 'us-east-1' },
375
+ ],
376
+ },
377
+ },
378
+ // ── Profiles de forge ─────────────────────────────────────────────────────
379
+ {
380
+ name: 'forge profile — hono-drizzle',
381
+ description: 'Agente api-engineer especializado en Hono + Drizzle ORM + TypeScript. Incluye rutas, schemas, migraciones y tests.',
382
+ category: 'profile',
383
+ tags: ['hono', 'drizzle', 'typescript', 'api', 'orm', 'edge'],
384
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/hono-drizzle',
385
+ language: 'TypeScript',
386
+ },
387
+ {
388
+ name: 'forge profile — nextjs-admin',
389
+ description: 'Agente admin-engineer para dashboards con Next.js 15 + shadcn/ui. Componentes, tablas de datos y gestión interna.',
390
+ category: 'profile',
391
+ tags: ['nextjs', 'shadcn', 'react', 'dashboard', 'admin', 'typescript'],
392
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/nextjs-admin',
393
+ language: 'TypeScript',
394
+ },
395
+ {
396
+ name: 'forge profile — astro',
397
+ description: 'Agente frontend-engineer para sitios con Astro. SSG/SSR, islands architecture, Content Collections y Tailwind.',
398
+ category: 'profile',
399
+ tags: ['astro', 'ssg', 'ssr', 'islands', 'typescript', 'tailwind', 'static'],
400
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/astro',
401
+ language: 'TypeScript',
402
+ },
403
+ {
404
+ name: 'forge profile — fastapi',
405
+ description: 'Agente api-engineer para FastAPI + Python. Endpoints async, Pydantic schemas, SQLAlchemy y pytest.',
406
+ category: 'profile',
407
+ tags: ['fastapi', 'python', 'async', 'pydantic', 'sqlalchemy', 'pytest'],
408
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/fastapi',
409
+ language: 'Python',
410
+ },
411
+ {
412
+ name: 'forge profile — rails',
413
+ description: 'Agente fullstack-engineer para Ruby on Rails. Modelos, migraciones, controllers, views y RSpec.',
414
+ category: 'profile',
415
+ tags: ['rails', 'ruby', 'activerecord', 'rspec', 'fullstack'],
416
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/rails',
417
+ language: 'Ruby',
418
+ },
419
+ {
420
+ name: 'forge profile — nestjs',
421
+ description: 'Agente api-engineer para NestJS + TypeScript. Módulos, guards, decorators y arquitectura escalable.',
422
+ category: 'profile',
423
+ tags: ['nestjs', 'typescript', 'node', 'api', 'modules', 'guards'],
424
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/nestjs',
425
+ language: 'TypeScript',
426
+ },
427
+ {
428
+ name: 'forge profile — express',
429
+ description: 'Agente api-engineer para Express + Node.js + TypeScript. Middleware, rutas, validación y Jest.',
430
+ category: 'profile',
431
+ tags: ['express', 'nodejs', 'typescript', 'middleware', 'api'],
432
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/express',
433
+ language: 'TypeScript',
434
+ },
435
+ {
436
+ name: 'forge profile — expo',
437
+ description: 'Agente mobile-engineer para React Native con Expo. Navegación, componentes nativos y EAS.',
438
+ category: 'profile',
439
+ tags: ['expo', 'react-native', 'mobile', 'ios', 'android', 'typescript'],
440
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/expo',
441
+ language: 'TypeScript',
442
+ },
443
+ {
444
+ name: 'forge profile — playwright-crawler',
445
+ description: 'Agente scanner-engineer para scraping y crawling con Playwright. Extracción de datos, screenshots y automatización.',
446
+ category: 'profile',
447
+ tags: ['playwright', 'scraping', 'crawler', 'browser', 'automation', 'typescript'],
448
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/playwright-crawler',
449
+ language: 'TypeScript',
450
+ },
451
+ {
452
+ name: 'forge profile — django',
453
+ description: 'Agente api-engineer para Django 4.x + DRF + PostgreSQL + pytest-django. Modelos, migraciones, serializers, viewsets y tests.',
454
+ category: 'profile',
455
+ tags: ['django', 'python', 'drf', 'postgresql', 'rest-api', 'pytest'],
456
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/django',
457
+ language: 'Python',
458
+ },
459
+ {
460
+ name: 'forge profile — vuenuxt',
461
+ description: 'Agente frontend-engineer para Nuxt 3 + Vue 3 + Pinia + TypeScript. Pages, componentes, composables y SSR.',
462
+ category: 'profile',
463
+ tags: ['nuxt', 'vue', 'typescript', 'pinia', 'ssr', 'tailwind'],
464
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/vuenuxt',
465
+ language: 'TypeScript',
466
+ },
467
+ {
468
+ name: 'forge profile — go-gin',
469
+ description: 'Agente api-engineer para Go + Gin/Echo + sqlc + PostgreSQL + testify. Handlers, services, repositories e migrations.',
470
+ category: 'profile',
471
+ tags: ['go', 'golang', 'gin', 'echo', 'sqlc', 'postgresql', 'rest-api'],
472
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/go-gin',
473
+ language: 'Go',
474
+ },
475
+ {
476
+ name: 'forge profile — sveltekit',
477
+ description: 'Agente frontend-engineer para SvelteKit 2 + Svelte 5 + TypeScript + Tailwind. Routes, components, load functions y form actions.',
478
+ category: 'profile',
479
+ tags: ['sveltekit', 'svelte', 'typescript', 'tailwind', 'ssr', 'vite'],
480
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/sveltekit',
481
+ language: 'TypeScript',
482
+ },
483
+ {
484
+ name: 'forge profile — laravel',
485
+ description: 'Tres agentes para proyectos Laravel: api-engineer (Sanctum + Eloquent + Form Requests), fullstack-engineer (Blade + Livewire 3 o Inertia) y migration-specialist (upgrade L6→L13 paso a paso con breaking changes por versión).',
486
+ category: 'profile',
487
+ tags: ['laravel', 'php', 'eloquent', 'sanctum', 'livewire', 'blade', 'inertia', 'migration', 'upgrade'],
488
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/laravel',
489
+ language: 'PHP',
490
+ },
491
+ {
492
+ name: 'forge profile — wordpress',
493
+ description: 'Tres agentes para proyectos WordPress: wp-engineer (FSE + bloques Gutenberg + Interactivity API + WP REST API), divi-engineer (Divi Theme Builder + módulos ET_Builder_Module + Dynamic Content) y elementor-engineer (Elementor Pro + widgets personalizados + Dynamic Tags + Loop Grid).',
494
+ category: 'profile',
495
+ tags: ['wordpress', 'php', 'gutenberg', 'fse', 'divi', 'elementor', 'page-builder', 'blocks', 'theme-builder'],
496
+ url: 'https://github.com/cristiancorreau/forge/tree/main/profiles/wordpress',
497
+ language: 'PHP',
498
+ },
499
+ // ── Tools ────────────────────────────────────────────────────────────────
500
+ {
501
+ name: 'anthropics/claude-code (CLI)',
502
+ description: 'Claude Code oficial — CLI para desarrollo con agentes IA directamente en la terminal. Instalación: npm i -g @anthropic-ai/claude-code',
503
+ category: 'tool',
504
+ tags: ['claude-code', 'cli', 'terminal', 'official'],
505
+ url: 'https://docs.anthropic.com/claude-code',
506
+ language: 'TypeScript',
507
+ },
508
+ {
509
+ name: 'modelcontextprotocol/inspector',
510
+ description: 'Inspector visual para servidores MCP. Permite probar y depurar servers MCP en una interfaz web interactiva.',
511
+ category: 'tool',
512
+ tags: ['mcp', 'debugging', 'inspector', 'testing', 'development'],
513
+ url: 'https://github.com/modelcontextprotocol/inspector',
514
+ language: 'TypeScript',
515
+ },
516
+ // ── Resources ─────────────────────────────────────────────────────────────
517
+ {
518
+ name: 'modelcontextprotocol/servers (todos)',
519
+ description: 'Repositorio oficial con todos los servers MCP de referencia: filesystem, git, github, postgres, sqlite, fetch, slack, puppeteer, memory y más.',
520
+ category: 'resource',
521
+ tags: ['mcp', 'servers', 'reference', 'official'],
522
+ url: 'https://github.com/modelcontextprotocol/servers',
523
+ language: 'TypeScript',
524
+ },
525
+ {
526
+ name: 'punkpeye/awesome-mcp-servers',
527
+ description: 'Lista curada de servidores MCP de la comunidad. Cubre bases de datos, APIs, herramientas de desarrollo, comunicación y más.',
528
+ category: 'resource',
529
+ tags: ['mcp', 'awesome', 'curated', 'list', 'community'],
530
+ url: 'https://github.com/punkpeye/awesome-mcp-servers',
531
+ language: '',
532
+ },
533
+ {
534
+ name: 'Documentación oficial MCP',
535
+ description: 'Documentación del Model Context Protocol: guías para construir servers y clients, especificación del protocolo y ejemplos.',
536
+ category: 'resource',
537
+ tags: ['mcp', 'docs', 'specification', 'protocol', 'official'],
538
+ url: 'https://modelcontextprotocol.io',
539
+ language: '',
540
+ },
541
+ {
542
+ name: 'Documentación Claude Code',
543
+ description: 'Docs oficiales de Claude Code: hooks, slash commands, configuración de agentes, CLAUDE.md, MCP y más.',
544
+ category: 'resource',
545
+ tags: ['claude-code', 'docs', 'hooks', 'agents', 'official'],
546
+ url: 'https://docs.anthropic.com/claude-code',
547
+ language: '',
548
+ },
549
+ ];
550
+ const CATEGORY_LABELS = {
551
+ framework: 'Framework',
552
+ 'mcp-server': 'MCP Server',
553
+ skill: 'Skill',
554
+ tool: 'Herramienta',
555
+ profile: 'Profile forge',
556
+ resource: 'Recurso',
557
+ };
558
+ const CATEGORIES = [...new Set(CATALOG.map(item => item.category))].sort();
559
+ function searchLocal(query, category) {
560
+ const terms = query ? query.toLowerCase().split(/\s+/).filter(Boolean) : [];
561
+ const results = [];
562
+ for (const item of CATALOG) {
563
+ if (category && item.category !== category)
564
+ continue;
565
+ if (terms.length === 0) {
566
+ results.push({ score: 0, item });
567
+ continue;
568
+ }
569
+ const haystack = [
570
+ item.name,
571
+ item.description,
572
+ item.category,
573
+ item.tags.join(' '),
574
+ item.language,
575
+ ]
576
+ .join(' ')
577
+ .toLowerCase();
578
+ const score = terms.reduce((acc, t) => (haystack.includes(t) ? acc + 1 : acc), 0);
579
+ if (score > 0)
580
+ results.push({ score, item });
581
+ }
582
+ results.sort((a, b) => b.score - a.score);
583
+ return results.map(r => r.item);
584
+ }
585
+ function wrapText(text, width, indent) {
586
+ const words = text.split(/\s+/).filter(Boolean);
587
+ const lines = [];
588
+ let current = '';
589
+ for (const word of words) {
590
+ if (current.length === 0) {
591
+ current = word;
592
+ }
593
+ else if (current.length + 1 + word.length <= width) {
594
+ current += ' ' + word;
595
+ }
596
+ else {
597
+ lines.push(indent + current);
598
+ current = word;
599
+ }
600
+ }
601
+ if (current.length > 0)
602
+ lines.push(indent + current);
603
+ return lines;
604
+ }
605
+ function printResults(results) {
606
+ if (results.length === 0) {
607
+ console.log(dim('Sin resultados. Prueba con otro término o usa --list-categories.'));
608
+ return;
609
+ }
610
+ results.forEach((item, idx) => {
611
+ const cat = CATEGORY_LABELS[item.category] ?? item.category;
612
+ const num = String(idx + 1).padStart(2, ' ');
613
+ console.log(`${gray(num + '.')} ${bold(item.name)}`);
614
+ if (item.description) {
615
+ for (const line of wrapText(item.description, 68, ' ')) {
616
+ console.log(dim(line));
617
+ }
618
+ }
619
+ if (item.tags.length > 0) {
620
+ const tagStr = item.tags
621
+ .slice(0, 8)
622
+ .map(t => cyan('#' + t))
623
+ .join(' ');
624
+ console.log(` ${tagStr}`);
625
+ }
626
+ const metaParts = [`[${cat}]`];
627
+ if (item.language)
628
+ metaParts.push(item.language);
629
+ console.log(` ${gray(metaParts.join(' '))}`);
630
+ console.log(` ${green(item.url)}`);
631
+ console.log('');
632
+ });
633
+ }
634
+ function getOptionValue(args, names) {
635
+ for (const name of names) {
636
+ const idx = args.indexOf(name);
637
+ if (idx !== -1 && idx + 1 < args.length)
638
+ return args[idx + 1];
639
+ }
640
+ return undefined;
641
+ }
642
+ export async function aitmplSearch(args) {
643
+ if (args.includes('-h') || args.includes('--help')) {
644
+ process.stdout.write(HELP);
645
+ return 0;
646
+ }
647
+ const jsonMode = args.includes('--json');
648
+ if (args.includes('--list-categories')) {
649
+ if (jsonMode) {
650
+ const data = CATEGORIES.map(cat => ({
651
+ category: cat,
652
+ label: CATEGORY_LABELS[cat] ?? cat,
653
+ count: CATALOG.filter(item => item.category === cat).length,
654
+ }));
655
+ console.log(JSON.stringify({ categories: data, total: CATALOG.length }, null, 2));
656
+ return 0;
657
+ }
658
+ console.log(cyan(bold('Categorías disponibles')) + '\n');
659
+ for (const cat of CATEGORIES) {
660
+ const count = CATALOG.filter(item => item.category === cat).length;
661
+ const label = CATEGORY_LABELS[cat] ?? cat;
662
+ console.log(` ${bold(cat.padEnd(16))} ${dim(label)} ${gray(`(${count} items)`)}`);
663
+ }
664
+ console.log('\n' + box('Total catálogo', [`${CATALOG.length} items`]));
665
+ return 0;
666
+ }
667
+ const category = getOptionValue(args, ['--category', '-c']);
668
+ if (category && !CATEGORIES.includes(category)) {
669
+ console.error(`ERROR: categoría desconocida '${category}'. Válidas: ${CATEGORIES.join(', ')}`);
670
+ return 1;
671
+ }
672
+ const limitRaw = getOptionValue(args, ['--limit']);
673
+ let limit = 20;
674
+ if (limitRaw !== undefined) {
675
+ const parsed = Number.parseInt(limitRaw, 10);
676
+ if (Number.isNaN(parsed) || parsed <= 0) {
677
+ console.error(`ERROR: --limit debe ser un entero positivo`);
678
+ return 1;
679
+ }
680
+ limit = parsed;
681
+ }
682
+ const flagsWithValue = new Set(['--category', '-c', '--limit']);
683
+ const positional = [];
684
+ for (let i = 0; i < args.length; i++) {
685
+ const arg = args[i];
686
+ if (arg === undefined)
687
+ continue;
688
+ if (flagsWithValue.has(arg)) {
689
+ i++; // skip the value
690
+ continue;
691
+ }
692
+ if (arg.startsWith('-'))
693
+ continue; // skip other flags (--json, etc.)
694
+ positional.push(arg);
695
+ }
696
+ const query = positional.join(' ');
697
+ if (!query && !category) {
698
+ process.stdout.write(HELP);
699
+ return 1;
700
+ }
701
+ let results = searchLocal(query, category);
702
+ results = results.slice(0, limit);
703
+ if (jsonMode) {
704
+ console.log(JSON.stringify(results, null, 2));
705
+ return 0;
706
+ }
707
+ console.log(cyan(bold('forge aitmpl-search')) + dim(` — ${results.length} resultado(s) (catálogo local)`) + '\n');
708
+ printResults(results);
709
+ return 0;
710
+ }
711
+ //# sourceMappingURL=aitmpl-search.js.map