@nimbuslab/cli 0.9.0 → 0.10.1

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 CHANGED
@@ -1,105 +1,118 @@
1
1
  # @nimbuslab/cli
2
2
 
3
- CLI para criar projetos Next.js com templates modernos e prontos para producao.
4
-
5
- ## Instalacao
3
+ CLI oficial da nimbuslab para criar, analisar e migrar projetos.
6
4
 
7
5
  ```bash
8
- # Via bun (recomendado)
9
6
  bun add -g @nimbuslab/cli
10
-
11
- # Via npm
12
- npm install -g @nimbuslab/cli
13
7
  ```
14
8
 
15
- ## Uso
16
-
17
- ```bash
18
- # Criar novo projeto (interativo)
19
- nimbus create
9
+ ---
20
10
 
21
- # Criar projeto com nome
22
- nimbus create meu-projeto
11
+ ## Comandos
23
12
 
24
- # Modo automatico
25
- nimbus create meu-projeto -y
13
+ | Comando | Descricao | Docs |
14
+ |---------|-----------|------|
15
+ | `nimbus create` | Criar novo projeto | [docs/create.md](./docs/create.md) |
16
+ | `nimbus analyze` | Analisar stack existente | [docs/analyze.md](./docs/analyze.md) |
17
+ | `nimbus upgrade` | Planejar upgrades | [docs/upgrade.md](./docs/upgrade.md) |
18
+ | `nimbus migrate` | Migrar de outras tecnologias | [docs/migrate.md](./docs/migrate.md) |
26
19
 
27
- # Ajuda
28
- nimbus help
29
- ```
30
-
31
- ## Templates
20
+ ---
32
21
 
33
- | Template | Descricao | Stack |
34
- |----------|-----------|-------|
35
- | Landing Page | Site institucional | Next.js 16 + Tailwind 4 + shadcn/ui |
36
- | Web App | Aplicacao com auth | Landing + Better Auth + Prisma |
37
- | Monorepo | Multiplos apps | Turborepo + apps/packages |
22
+ ## Quick Start
38
23
 
39
- ### Flags de template
24
+ ### Criar landing page
40
25
 
41
26
  ```bash
42
- # Landing page
43
27
  nimbus create meu-site --landing
28
+ cd meu-site
29
+ bun dev
30
+ ```
31
+
32
+ ### Criar web app
44
33
 
45
- # Web app com autenticacao
34
+ ```bash
46
35
  nimbus create meu-app --app
36
+ cd meu-app
37
+ bun setup
38
+ bun dev
39
+ ```
40
+
41
+ ### Analisar projeto existente
47
42
 
48
- # Monorepo
49
- nimbus create meu-monorepo --turborepo
43
+ ```bash
44
+ nimbus analyze
45
+ nimbus upgrade --plan
50
46
  ```
51
47
 
52
- ## Opcoes
48
+ ---
53
49
 
54
- | Flag | Descricao |
55
- |------|-----------|
56
- | `-y, --yes` | Aceitar defaults |
57
- | `--no-git` | Nao inicializar Git |
58
- | `--no-install` | Nao instalar dependencias |
59
- | `--template <url>` | Usar template customizado |
50
+ ## Templates
60
51
 
61
- ## Exemplos
52
+ | Template | Descricao | Docs |
53
+ |----------|-----------|------|
54
+ | `--landing` | Next.js 16 + Tailwind 4 + shadcn/ui | [docs/create.md#landing](./docs/create.md#landing-page---landing) |
55
+ | `--app` | Landing + Better Auth + Drizzle | [docs/create.md#app](./docs/create.md#web-app---app) |
56
+ | `--turborepo` | Monorepo com apps e packages | [docs/create.md#turborepo](./docs/create.md#turborepo---turborepo) |
57
+ | `--package` | Pacote npm com tsup + CI/CD | [docs/package.md](./docs/package.md) |
62
58
 
63
- ```bash
64
- # Landing page rapida
65
- nimbus create meu-site --landing -y
59
+ **Repos Open Source:**
60
+ - [create-next-landing](https://github.com/nimbuslab/create-next-landing)
61
+ - [create-next-app](https://github.com/nimbuslab/create-next-app)
62
+ - [create-turborepo](https://github.com/nimbuslab/create-turborepo)
66
63
 
67
- # Web app sem instalar deps
68
- nimbus create meu-app --app --no-install
64
+ ---
69
65
 
70
- # Template customizado
71
- nimbus create projeto --template usuario/repositorio
72
- ```
66
+ ## Stack Alvo
67
+
68
+ | Categoria | Tecnologia |
69
+ |-----------|------------|
70
+ | Framework | Next.js 16+ |
71
+ | Runtime | React 19+ |
72
+ | Styling | Tailwind CSS 4+ |
73
+ | Components | shadcn/ui |
74
+ | Package Manager | Bun |
75
+ | Auth | Better Auth |
76
+ | Database | Drizzle ORM |
77
+ | Monorepo | Turborepo |
78
+
79
+ ---
80
+
81
+ ## Documentacao
82
+
83
+ | Arquivo | Conteudo |
84
+ |---------|----------|
85
+ | [docs/create.md](./docs/create.md) | Templates, opcoes, fluxo interativo |
86
+ | [docs/package.md](./docs/package.md) | Criar pacotes npm |
87
+ | [docs/analyze.md](./docs/analyze.md) | Deteccao de stack, recomendacoes |
88
+ | [docs/upgrade.md](./docs/upgrade.md) | Breaking changes, codemods |
89
+ | [docs/migrate.md](./docs/migrate.md) | Strangler Fig, estrategias |
90
+ | [MIGRATION-ROADMAP.md](./MIGRATION-ROADMAP.md) | Roadmap de migracao |
91
+
92
+ ---
73
93
 
74
94
  ## Requisitos
75
95
 
76
96
  - [Bun](https://bun.sh) - Runtime e package manager
77
97
  - [Git](https://git-scm.com) - Controle de versao
78
98
 
79
- ### Instalando Bun
80
-
81
99
  ```bash
82
- # Linux/Mac
83
100
  curl -fsSL https://bun.sh/install | bash
84
-
85
- # Windows (PowerShell)
86
- powershell -c "irm bun.sh/install.ps1 | iex"
87
101
  ```
88
102
 
89
- ## Templates Open Source
103
+ ---
90
104
 
91
- Os templates publicos estao disponiveis em:
105
+ ## Desenvolvimento
92
106
 
93
- - [create-next-landing](https://github.com/nimbuslab/create-next-landing) - Landing page
94
- - [create-next-app](https://github.com/nimbuslab/create-next-app) - Web app com auth
95
- - [create-turborepo](https://github.com/nimbuslab/create-turborepo) - Monorepo
96
-
97
- ## Stack
107
+ ```bash
108
+ gh repo clone nimbuslab/cli
109
+ cd cli
110
+ bun install
111
+ bun run dev
112
+ ```
98
113
 
99
- - **Runtime:** Bun
100
- - **Prompts:** @clack/prompts
101
- - **Cores:** picocolors
114
+ ---
102
115
 
103
116
  ## Licenca
104
117
 
105
- MIT - [nimbuslab](https://nimbuslab.com.br)
118
+ UNLICENSED - [nimbuslab](https://nimbuslab.com.br) 2026
package/dist/index.js CHANGED
@@ -146,8 +146,53 @@ var require_src = __commonJS((exports, module) => {
146
146
  module.exports = { cursor, scroll, erase, beep };
147
147
  });
148
148
 
149
+ // package.json
150
+ var require_package = __commonJS((exports, module) => {
151
+ module.exports = {
152
+ name: "@nimbuslab/cli",
153
+ version: "0.10.1",
154
+ description: "CLI para criar projetos nimbuslab",
155
+ type: "module",
156
+ bin: {
157
+ nimbus: "./dist/index.js"
158
+ },
159
+ scripts: {
160
+ dev: "bun run src/index.ts",
161
+ build: "bun build src/index.ts --outdir dist --target bun",
162
+ typecheck: "tsc --noEmit"
163
+ },
164
+ keywords: ["nimbuslab", "cli", "nextjs", "fast", "landing-page", "saas"],
165
+ author: {
166
+ name: "nimbuslab",
167
+ email: "contato@nimbuslab.com.br",
168
+ url: "https://nimbuslab.com.br"
169
+ },
170
+ license: "UNLICENSED",
171
+ private: false,
172
+ repository: {
173
+ type: "git",
174
+ url: "git+https://github.com/nimbuslab/cli.git"
175
+ },
176
+ homepage: "https://nimbuslab.com.br",
177
+ bugs: {
178
+ url: "https://github.com/nimbuslab/cli/issues"
179
+ },
180
+ engines: {
181
+ node: ">=18"
182
+ },
183
+ devDependencies: {
184
+ "@types/bun": "latest",
185
+ typescript: "^5"
186
+ },
187
+ dependencies: {
188
+ "@clack/prompts": "^0.11.0",
189
+ picocolors: "^1.1.1"
190
+ }
191
+ };
192
+ });
193
+
149
194
  // src/index.ts
150
- var import_picocolors6 = __toESM(require_picocolors(), 1);
195
+ var import_picocolors7 = __toESM(require_picocolors(), 1);
151
196
 
152
197
  // node_modules/@clack/core/dist/index.mjs
153
198
  var import_sisteransi = __toESM(require_src(), 1);
@@ -2283,9 +2328,186 @@ function printUpgradePlan(name, plan) {
2283
2328
  console.log();
2284
2329
  }
2285
2330
 
2331
+ // src/commands/lola.ts
2332
+ var import_picocolors6 = __toESM(require_picocolors(), 1);
2333
+ import { existsSync as existsSync2 } from "fs";
2334
+ import { join as join3 } from "path";
2335
+ var LOLA_DIR = join3(process.env.HOME || "~", ".lola");
2336
+ var LOLA_REPO = "git@github.com:nimbuslab/lola.git";
2337
+ var USER_MEMORY = join3(process.env.HOME || "~", ".claude", "USER_MEMORY.md");
2338
+ async function installLola() {
2339
+ console.log();
2340
+ console.log(import_picocolors6.default.cyan(" Lola - Code Agent da nimbuslab"));
2341
+ console.log(import_picocolors6.default.dim(" ==============================="));
2342
+ console.log();
2343
+ const isUpdate = existsSync2(LOLA_DIR);
2344
+ if (isUpdate) {
2345
+ console.log(import_picocolors6.default.dim(` Lola ja instalada em ${LOLA_DIR}`));
2346
+ console.log(import_picocolors6.default.cyan(" Atualizando..."));
2347
+ const result = Bun.spawnSync(["git", "pull", "--quiet"], {
2348
+ cwd: LOLA_DIR,
2349
+ stdout: "inherit",
2350
+ stderr: "inherit"
2351
+ });
2352
+ if (result.exitCode !== 0) {
2353
+ console.log(import_picocolors6.default.red(" Erro ao atualizar Lola"));
2354
+ process.exit(1);
2355
+ }
2356
+ console.log(import_picocolors6.default.green(" Atualizado!"));
2357
+ } else {
2358
+ console.log(import_picocolors6.default.cyan(` Instalando Lola em ${LOLA_DIR}...`));
2359
+ const result = Bun.spawnSync(["git", "clone", "--quiet", LOLA_REPO, LOLA_DIR], {
2360
+ stdout: "inherit",
2361
+ stderr: "inherit"
2362
+ });
2363
+ if (result.exitCode !== 0) {
2364
+ console.log(import_picocolors6.default.red(" Erro ao clonar repositorio"));
2365
+ console.log(import_picocolors6.default.dim(" Verifique se tem acesso ao repo nimbuslab/lola"));
2366
+ process.exit(1);
2367
+ }
2368
+ console.log(import_picocolors6.default.green(" Instalado!"));
2369
+ }
2370
+ const claudeDir = join3(process.env.HOME || "~", ".claude");
2371
+ if (!existsSync2(USER_MEMORY)) {
2372
+ console.log();
2373
+ console.log(import_picocolors6.default.cyan(" Criando USER_MEMORY.md..."));
2374
+ await Bun.$`mkdir -p ${claudeDir}`;
2375
+ const content = `# User Memory
2376
+
2377
+ Memoria persistente para sessoes Claude Code
2378
+
2379
+ ---
2380
+
2381
+ ## Configuracoes da Lola
2382
+
2383
+ \`\`\`
2384
+ lola_profile: millennial
2385
+ \`\`\`
2386
+
2387
+ ---
2388
+
2389
+ ## Ultima Sessao
2390
+
2391
+ (sera preenchido automaticamente)
2392
+
2393
+ ---
2394
+ `;
2395
+ await Bun.write(USER_MEMORY, content);
2396
+ console.log(import_picocolors6.default.green(" USER_MEMORY.md criado!"));
2397
+ }
2398
+ console.log();
2399
+ console.log(import_picocolors6.default.green(" Instalacao concluida!"));
2400
+ console.log();
2401
+ console.log(import_picocolors6.default.bold(" Para usar a Lola:"));
2402
+ console.log(import_picocolors6.default.dim(" lola ") + import_picocolors6.default.white("# Iniciar sessao"));
2403
+ console.log(import_picocolors6.default.dim(' lola suggest "x" ') + import_picocolors6.default.white("# Sugerir melhoria"));
2404
+ console.log();
2405
+ console.log(import_picocolors6.default.bold(" Para mudar perfil, edite ~/.claude/USER_MEMORY.md:"));
2406
+ console.log(import_picocolors6.default.dim(" lola_profile: millennial|genz|profissional|nerd|chill"));
2407
+ console.log();
2408
+ }
2409
+ async function suggestImprovement(message) {
2410
+ if (!message) {
2411
+ console.log(import_picocolors6.default.red(" Erro: forne\xE7a uma mensagem"));
2412
+ console.log(import_picocolors6.default.dim(' Uso: nimbus lola suggest "sua sugestao aqui"'));
2413
+ process.exit(1);
2414
+ }
2415
+ const ghCheck = Bun.spawnSync(["which", "gh"]);
2416
+ if (ghCheck.exitCode !== 0) {
2417
+ console.log(import_picocolors6.default.red(" Erro: GitHub CLI (gh) nao encontrado"));
2418
+ console.log(import_picocolors6.default.dim(" Instale: https://cli.github.com"));
2419
+ process.exit(1);
2420
+ }
2421
+ const authCheck = Bun.spawnSync(["gh", "auth", "status"], {
2422
+ stdout: "pipe",
2423
+ stderr: "pipe"
2424
+ });
2425
+ if (authCheck.exitCode !== 0) {
2426
+ console.log(import_picocolors6.default.red(" Erro: GitHub CLI nao autenticado"));
2427
+ console.log(import_picocolors6.default.dim(" Execute: gh auth login"));
2428
+ process.exit(1);
2429
+ }
2430
+ const gitUser = Bun.spawnSync(["git", "config", "user.name"], { stdout: "pipe" });
2431
+ const gitEmail = Bun.spawnSync(["git", "config", "user.email"], { stdout: "pipe" });
2432
+ const userName = gitUser.stdout.toString().trim() || "Dev";
2433
+ const userEmail = gitEmail.stdout.toString().trim() || "";
2434
+ console.log();
2435
+ console.log(import_picocolors6.default.cyan(" Criando sugestao..."));
2436
+ const date = new Date().toISOString().split("T")[0];
2437
+ const body = `## Sugestao
2438
+
2439
+ ${message}
2440
+
2441
+ ---
2442
+
2443
+ **Enviado por:** ${userName}
2444
+ **Email:** ${userEmail}
2445
+ **Data:** ${date}
2446
+
2447
+ ---
2448
+ *Criado via \`nimbus lola suggest\`*`;
2449
+ const title = `Sugestao: ${message.slice(0, 50)}${message.length > 50 ? "..." : ""}`;
2450
+ const result = Bun.spawnSync([
2451
+ "gh",
2452
+ "issue",
2453
+ "create",
2454
+ "--repo",
2455
+ "nimbuslab/lola",
2456
+ "--title",
2457
+ title,
2458
+ "--body",
2459
+ body,
2460
+ "--label",
2461
+ "sugestao"
2462
+ ], {
2463
+ stdout: "inherit",
2464
+ stderr: "inherit"
2465
+ });
2466
+ if (result.exitCode !== 0) {
2467
+ console.log(import_picocolors6.default.red(" Erro ao criar issue"));
2468
+ process.exit(1);
2469
+ }
2470
+ console.log();
2471
+ console.log(import_picocolors6.default.green(" Sugestao enviada! Hugo vai revisar."));
2472
+ console.log();
2473
+ }
2474
+ async function lola(args) {
2475
+ const subcommand = args[0];
2476
+ if (!subcommand || subcommand === "install" || subcommand === "sync") {
2477
+ await installLola();
2478
+ } else if (subcommand === "suggest") {
2479
+ const message = args.slice(1).join(" ");
2480
+ await suggestImprovement(message);
2481
+ } else if (subcommand === "help" || subcommand === "--help" || subcommand === "-h") {
2482
+ showLolaHelp();
2483
+ } else {
2484
+ console.log(import_picocolors6.default.red(` Subcomando desconhecido: ${subcommand}`));
2485
+ showLolaHelp();
2486
+ process.exit(1);
2487
+ }
2488
+ }
2489
+ function showLolaHelp() {
2490
+ console.log();
2491
+ console.log(import_picocolors6.default.bold(" Lola - Code Agent da nimbuslab"));
2492
+ console.log();
2493
+ console.log(import_picocolors6.default.bold(" Uso:") + " nimbus lola [subcomando]");
2494
+ console.log();
2495
+ console.log(import_picocolors6.default.bold(" Subcomandos:"));
2496
+ console.log(import_picocolors6.default.dim(" install ") + import_picocolors6.default.white("Instalar/atualizar Lola"));
2497
+ console.log(import_picocolors6.default.dim(" sync ") + import_picocolors6.default.white("Alias para install"));
2498
+ console.log(import_picocolors6.default.dim(' suggest "msg" ') + import_picocolors6.default.white("Sugerir melhoria (cria issue)"));
2499
+ console.log(import_picocolors6.default.dim(" help ") + import_picocolors6.default.white("Mostrar esta ajuda"));
2500
+ console.log();
2501
+ console.log(import_picocolors6.default.bold(" Exemplos:"));
2502
+ console.log(import_picocolors6.default.dim(" $ nimbus lola install"));
2503
+ console.log(import_picocolors6.default.dim(' $ nimbus lola suggest "adicionar suporte a X"'));
2504
+ console.log();
2505
+ }
2506
+
2286
2507
  // src/index.ts
2287
2508
  var PACKAGE_NAME = "@nimbuslab/cli";
2288
- var CURRENT_VERSION = "0.9.0";
2509
+ var pkg = await Promise.resolve().then(() => __toESM(require_package(), 1));
2510
+ var CURRENT_VERSION = pkg.version;
2289
2511
  var LOGO = `
2290
2512
  \u2588\u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2557\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2557 \u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557
2291
2513
  \u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2551\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u2588\u2588\u2551 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255D
@@ -2321,18 +2543,18 @@ function showUpdateNotice(latestVersion) {
2321
2543
  const line2 = ` Update with: ${command}`;
2322
2544
  const maxLen = Math.max(line1.length, line2.length);
2323
2545
  const border = "\u2500".repeat(maxLen + 2);
2324
- console.log(import_picocolors6.default.yellow(` \u250C${border}\u2510`));
2325
- console.log(import_picocolors6.default.yellow(` \u2502`) + import_picocolors6.default.white(line1.padEnd(maxLen + 1)) + import_picocolors6.default.yellow(`\u2502`));
2326
- console.log(import_picocolors6.default.yellow(` \u2502`) + import_picocolors6.default.cyan(line2.padEnd(maxLen + 1)) + import_picocolors6.default.yellow(`\u2502`));
2327
- console.log(import_picocolors6.default.yellow(` \u2514${border}\u2518`));
2546
+ console.log(import_picocolors7.default.yellow(` \u250C${border}\u2510`));
2547
+ console.log(import_picocolors7.default.yellow(` \u2502`) + import_picocolors7.default.white(line1.padEnd(maxLen + 1)) + import_picocolors7.default.yellow(`\u2502`));
2548
+ console.log(import_picocolors7.default.yellow(` \u2502`) + import_picocolors7.default.cyan(line2.padEnd(maxLen + 1)) + import_picocolors7.default.yellow(`\u2502`));
2549
+ console.log(import_picocolors7.default.yellow(` \u2514${border}\u2518`));
2328
2550
  console.log();
2329
2551
  }
2330
2552
  async function main() {
2331
2553
  const args = process.argv.slice(2);
2332
2554
  const command = args[0];
2333
- console.log(import_picocolors6.default.cyan(LOGO));
2334
- console.log(import_picocolors6.default.white(" nimbuslab CLI"));
2335
- console.log(import_picocolors6.default.dim(" Create awesome projects"));
2555
+ console.log(import_picocolors7.default.cyan(LOGO));
2556
+ console.log(import_picocolors7.default.white(" nimbuslab CLI"));
2557
+ console.log(import_picocolors7.default.dim(" Create awesome projects"));
2336
2558
  console.log();
2337
2559
  const latestVersion = await checkForUpdates();
2338
2560
  if (latestVersion) {
@@ -2344,56 +2566,65 @@ async function main() {
2344
2566
  await analyze(args.slice(1));
2345
2567
  } else if (command === "upgrade") {
2346
2568
  await upgrade(args.slice(1));
2569
+ } else if (command === "lola") {
2570
+ await lola(args.slice(1));
2347
2571
  } else if (command === "help" || command === "--help" || command === "-h") {
2348
2572
  showHelp();
2349
2573
  } else if (command === "version" || command === "--version" || command === "-v") {
2350
2574
  showVersion();
2351
2575
  } else {
2352
- console.log(import_picocolors6.default.red(`Unknown command: ${command}`));
2576
+ console.log(import_picocolors7.default.red(`Unknown command: ${command}`));
2353
2577
  showHelp();
2354
2578
  process.exit(1);
2355
2579
  }
2356
2580
  }
2357
2581
  function showHelp() {
2358
2582
  console.log(`
2359
- ${import_picocolors6.default.bold("Usage:")} nimbus [command] [options]
2583
+ ${import_picocolors7.default.bold("Usage:")} nimbus [command] [options]
2360
2584
 
2361
- ${import_picocolors6.default.bold("Commands:")}
2585
+ ${import_picocolors7.default.bold("Commands:")}
2362
2586
  create [name] Create a new project
2363
2587
  analyze [dir] Analyze project stack
2364
2588
  upgrade [target] Upgrade dependencies
2589
+ lola [action] Lola - Code Agent
2365
2590
  help Show this help
2366
2591
  version Show version
2367
2592
 
2368
- ${import_picocolors6.default.bold("Templates:")}
2593
+ ${import_picocolors7.default.bold("Templates:")}
2369
2594
  --landing Landing page (Next.js 16 + Tailwind 4 + shadcn)
2370
2595
  --app Web app (Landing + Better Auth + Drizzle)
2371
2596
  --turborepo Monorepo (Turborepo + apps/packages)
2372
2597
 
2373
- ${import_picocolors6.default.bold("Analyze & Upgrade:")}
2598
+ ${import_picocolors7.default.bold("Analyze & Upgrade:")}
2374
2599
  analyze . Detect stack and show recommendations
2375
2600
  analyze --json Output as JSON
2376
2601
  upgrade --plan Show upgrade plan
2377
2602
  upgrade next Upgrade Next.js
2378
2603
  upgrade tailwind Upgrade Tailwind CSS
2379
2604
 
2380
- ${import_picocolors6.default.bold("Options:")}
2605
+ ${import_picocolors7.default.bold("Options:")}
2381
2606
  -y, --yes Accept defaults
2382
2607
  --no-git Don't initialize Git
2383
2608
  --no-install Don't install dependencies
2384
2609
  --template <url> Use custom template
2385
2610
 
2386
- ${import_picocolors6.default.bold("Examples:")}
2387
- ${import_picocolors6.default.dim("$")} nimbus create my-landing --landing
2388
- ${import_picocolors6.default.dim("$")} nimbus create my-app --app
2389
- ${import_picocolors6.default.dim("$")} nimbus analyze ./my-project
2390
- ${import_picocolors6.default.dim("$")} nimbus upgrade --plan
2611
+ ${import_picocolors7.default.bold("Lola (Code Agent):")}
2612
+ lola install Install/update Lola
2613
+ lola suggest Suggest improvement (creates issue)
2614
+
2615
+ ${import_picocolors7.default.bold("Examples:")}
2616
+ ${import_picocolors7.default.dim("$")} nimbus create my-landing --landing
2617
+ ${import_picocolors7.default.dim("$")} nimbus create my-app --app
2618
+ ${import_picocolors7.default.dim("$")} nimbus analyze ./my-project
2619
+ ${import_picocolors7.default.dim("$")} nimbus upgrade --plan
2620
+ ${import_picocolors7.default.dim("$")} nimbus lola install
2621
+ ${import_picocolors7.default.dim("$")} nimbus lola suggest "add support for X"
2391
2622
  `);
2392
2623
  }
2393
2624
  function showVersion() {
2394
2625
  console.log(`${PACKAGE_NAME} v${CURRENT_VERSION}`);
2395
2626
  }
2396
2627
  main().catch((err) => {
2397
- console.error(import_picocolors6.default.red("Erro:"), err.message);
2628
+ console.error(import_picocolors7.default.red("Erro:"), err.message);
2398
2629
  process.exit(1);
2399
2630
  });
@@ -0,0 +1,148 @@
1
+ # nimbus analyze
2
+
3
+ Analisa a stack de um projeto existente e sugere melhorias baseadas na stack nimbuslab.
4
+
5
+ ## Uso
6
+
7
+ ```bash
8
+ # Analisar diretorio atual
9
+ nimbus analyze
10
+
11
+ # Analisar diretorio especifico
12
+ nimbus analyze ./meu-projeto
13
+ nimbus analyze ~/www/nimbuslab/projeto
14
+
15
+ # Output em JSON (para automacao)
16
+ nimbus analyze --json
17
+ ```
18
+
19
+ ## O que Detecta
20
+
21
+ ### Framework
22
+ - Next.js (com versao)
23
+ - React (standalone)
24
+ - Angular
25
+ - Vue
26
+ - Svelte
27
+
28
+ ### Styling
29
+ - Tailwind CSS (com versao)
30
+ - styled-components
31
+ - Emotion
32
+ - Sass/SCSS
33
+ - Less
34
+ - CSS puro
35
+
36
+ ### Package Manager
37
+ - bun (recomendado)
38
+ - pnpm
39
+ - npm
40
+ - yarn
41
+
42
+ ### Monorepo
43
+ - Turborepo
44
+ - Nx
45
+ - Lerna
46
+ - Workspaces nativo
47
+
48
+ ### Autenticacao
49
+ - Better Auth (recomendado)
50
+ - NextAuth / Auth.js
51
+ - Clerk
52
+ - Auth0
53
+ - Supabase Auth
54
+
55
+ ### Banco de Dados
56
+ - Drizzle ORM (recomendado)
57
+ - Prisma
58
+ - TypeORM
59
+ - Mongoose
60
+ - pg / mysql2 direto
61
+
62
+ ### Outros
63
+ - TypeScript (tsconfig.json)
64
+ - ESLint
65
+ - Prettier
66
+
67
+ ## Recomendacoes Automaticas
68
+
69
+ O comando gera recomendacoes baseadas na stack nimbuslab:
70
+
71
+ | Detectado | Recomendacao |
72
+ |-----------|--------------|
73
+ | pnpm/npm/yarn | Migrar para bun |
74
+ | Next.js < 16 | Atualizar para Next.js 16 |
75
+ | React < 19 | Atualizar para React 19 |
76
+ | Tailwind < 4 | Atualizar para Tailwind 4 |
77
+ | Prisma | Considerar Drizzle ORM |
78
+ | NextAuth | Considerar Better Auth |
79
+ | Sem auth | Adicionar autenticacao |
80
+ | Sem DB | Adicionar banco de dados |
81
+
82
+ ## Exemplo de Output
83
+
84
+ ```
85
+ Analisando projeto...
86
+
87
+ Projeto: meu-app v1.0.0
88
+
89
+ Stack Detectada:
90
+ Framework: nextjs@15.0.2
91
+ Styling: tailwind@3.4.1
92
+ Package Manager: pnpm
93
+ TypeScript: sim
94
+ Monorepo: turborepo
95
+ Auth: next-auth
96
+ Database: prisma
97
+
98
+ Recomendacoes:
99
+ 1. Migrar pnpm -> bun (nimbus codemod bun)
100
+ 2. Atualizar Next.js 15 -> 16 (nimbus upgrade next)
101
+ 3. Atualizar React 18 -> 19 (nimbus upgrade react)
102
+ 4. Atualizar Tailwind 3 -> 4 (nimbus upgrade tailwind)
103
+ 5. Considerar migrar Prisma -> Drizzle (nimbus codemod drizzle)
104
+ ```
105
+
106
+ ## Output JSON
107
+
108
+ Com `--json`, retorna estrutura para automacao:
109
+
110
+ ```json
111
+ {
112
+ "name": "meu-app",
113
+ "version": "1.0.0",
114
+ "framework": "nextjs",
115
+ "frameworkVersion": "15.0.2",
116
+ "styling": ["tailwind@3.4.1"],
117
+ "packageManager": "pnpm",
118
+ "monorepo": "turborepo",
119
+ "auth": "next-auth",
120
+ "database": "prisma",
121
+ "typescript": true,
122
+ "recommendations": [
123
+ "Migrar pnpm -> bun",
124
+ "Atualizar Next.js 15 -> 16"
125
+ ]
126
+ }
127
+ ```
128
+
129
+ ## Integracao com Outros Comandos
130
+
131
+ ```bash
132
+ # Analisar e depois ver plano de upgrade
133
+ nimbus analyze
134
+ nimbus upgrade --plan
135
+
136
+ # Pipeline completo
137
+ nimbus analyze ./projeto && nimbus upgrade --plan
138
+ ```
139
+
140
+ ## Limitacoes
141
+
142
+ - Analisa apenas `package.json` e arquivos de config
143
+ - Nao analisa codigo-fonte
144
+ - Requer projeto Node.js (package.json)
145
+
146
+ ---
147
+
148
+ [Voltar ao README](../README.md) | [create](./create.md) | [upgrade](./upgrade.md) | [migrate](./migrate.md)