pipely-ai 1.4.0 → 1.4.2

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 (2) hide show
  1. package/index.js +50 -13
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -627,19 +627,43 @@ async function installLocal() {
627
627
 
628
628
  console.log(`\n ${c.green}✓${c.reset} Instalacao concluida\n`);
629
629
 
630
- // Print summary and run
630
+ printLocalSummary(setupKey, dir);
631
+ return runLocal();
632
+ }
633
+
634
+ function printLocalSummary(setupKey, dir) {
631
635
  const line = "═".repeat(56);
632
636
  console.log(` ${c.green}${line}${c.reset}`);
633
- console.log(` ${c.green}${c.bold} PIPELY AI — LOCAL MODE${c.reset}`);
637
+ console.log(` ${c.green}${c.bold} PIPELY AI — PRONTO! (Local Mode)${c.reset}`);
634
638
  console.log(` ${c.green}${line}${c.reset}`);
635
639
  console.log("");
636
- console.log(` ${c.bold}Setup Key:${c.reset} ${c.yellow}${setupKey}${c.reset}`);
640
+ console.log(` ${c.bold}Endpoints:${c.reset}`);
641
+ console.log(` Frontend + API: ${c.cyan}http://localhost:3333${c.reset}`);
642
+ console.log(` Setup: ${c.cyan}http://localhost:3333/setup${c.reset}`);
643
+ console.log(` Agent Webhook: ${c.cyan}http://localhost:3335/webhook${c.reset}`);
644
+ console.log(` Health: ${c.cyan}http://localhost:3333/health${c.reset}`);
637
645
  console.log("");
638
- console.log(` ${c.bold}Diretorio:${c.reset} ${c.dim}${dir}${c.reset}`);
639
- console.log(` ${c.bold}Banco de dados:${c.reset} ${c.dim}${join(dir, "data/pipely.db")}${c.reset}`);
646
+ console.log(` ${c.bold}Chaves:${c.reset}`);
647
+ console.log(` Setup Key: ${c.yellow}${setupKey}${c.reset}`);
648
+ console.log("");
649
+ console.log(` ${c.bold}Arquivos:${c.reset}`);
650
+ console.log(` Diretorio: ${c.dim}${dir}${c.reset}`);
651
+ console.log(` Banco de dados: ${c.dim}${join(dir, "data/pipely.db")}${c.reset}`);
652
+ console.log(` Configuracao: ${c.dim}${join(dir, ".env")}${c.reset}`);
653
+ console.log("");
654
+ console.log(` ${c.bold}Proximo passo:${c.reset}`);
655
+ console.log(` 1. Acesse ${c.cyan}http://localhost:3333/setup${c.reset}`);
656
+ console.log(` 2. Use a Setup Key acima para criar sua conta`);
657
+ console.log(` 3. Configure WhatsApp e OpenAI nas paginas do app`);
658
+ console.log("");
659
+ console.log(` ${c.bold}Comandos:${c.reset}`);
660
+ console.log(` npx pipely-ai start ${c.dim}# Iniciar${c.reset}`);
661
+ console.log(` npx pipely-ai keys ${c.dim}# Ver chaves${c.reset}`);
662
+ console.log(` npx pipely-ai update ${c.dim}# Atualizar${c.reset}`);
663
+ console.log(` npx pipely-ai --local ${c.dim}# Forcar modo local${c.reset}`);
664
+ console.log("");
665
+ console.log(` ${c.green}${line}${c.reset}`);
640
666
  console.log("");
641
-
642
- return runLocal();
643
667
  }
644
668
 
645
669
  async function runLocal() {
@@ -650,13 +674,17 @@ async function runLocal() {
650
674
 
651
675
  const bundleDir = getBundleDir();
652
676
 
653
- console.log(` ${c.magenta}── Iniciando Pipely AI ────────────────────${c.reset}\n`);
677
+ const line = "═".repeat(56);
678
+ console.log(` ${c.magenta}${line}${c.reset}`);
679
+ console.log(` ${c.magenta}${c.bold} PIPELY AI — Iniciando...${c.reset}`);
680
+ console.log(` ${c.magenta}${line}${c.reset}`);
681
+ console.log("");
654
682
 
655
683
  const envPath = getLocalEnvPath();
656
684
  const envContent = existsSync(envPath) ? readFileSync(envPath, "utf-8") : "";
657
685
  const envVars = {};
658
- for (const line of envContent.split("\n")) {
659
- const match = line.match(/^([A-Z_]+)=(.*)$/);
686
+ for (const envLine of envContent.split("\n")) {
687
+ const match = envLine.match(/^([A-Z_]+)=(.*)$/);
660
688
  if (match) envVars[match[1]] = match[2];
661
689
  }
662
690
 
@@ -679,10 +707,19 @@ async function runLocal() {
679
707
  // Wait for server to start then print endpoints
680
708
  await sleep(2000);
681
709
  console.log("");
682
- console.log(` ${c.cyan}App:${c.reset} http://localhost:3333`);
683
- console.log(` ${c.cyan}Agent:${c.reset} http://localhost:3335`);
710
+ console.log(` ${c.green}${line}${c.reset}`);
711
+ console.log(` ${c.green}${c.bold} PIPELY AI — Rodando${c.reset}`);
712
+ console.log(` ${c.green}${line}${c.reset}`);
713
+ console.log("");
714
+ console.log(` ${c.bold}Endpoints:${c.reset}`);
715
+ console.log(` Frontend + API: ${c.cyan}http://localhost:3333${c.reset}`);
716
+ console.log(` Agent Webhook: ${c.cyan}http://localhost:3335/webhook${c.reset}`);
717
+ console.log("");
718
+ console.log(` ${c.bold}Setup Key:${c.reset} ${c.yellow}${envVars.OWNER_SETUP_KEY || "ver .env"}${c.reset}`);
719
+ console.log("");
720
+ console.log(` Pressione ${c.bold}Ctrl+C${c.reset} para parar.`);
721
+ console.log(` ${c.green}${line}${c.reset}`);
684
722
  console.log("");
685
- console.log(` Pressione ${c.bold}Ctrl+C${c.reset} para parar.\n`);
686
723
 
687
724
  function shutdown() {
688
725
  console.log(`\n Parando...\n`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pipely-ai",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
4
4
  "description": "Pipely AI — Instale, gerencie e atualize com um unico comando",
5
5
  "type": "module",
6
6
  "bin": {