lynxprompt 1.4.1 → 1.4.3

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/dist/index.js CHANGED
@@ -2293,18 +2293,6 @@ async function updateBlueprint(cwd, file, blueprintId, content, options, expecte
2293
2293
  console.log(chalk6.cyan(`
2294
2294
  \u{1F4E4} Updating blueprint ${chalk6.bold(blueprintId)}...`));
2295
2295
  console.log(chalk6.gray(` File: ${file}`));
2296
- if (!options.yes) {
2297
- const confirm = await prompts2({
2298
- type: "confirm",
2299
- name: "value",
2300
- message: `Push changes to ${blueprintId}?`,
2301
- initial: true
2302
- });
2303
- if (!confirm.value) {
2304
- console.log(chalk6.yellow("Push cancelled."));
2305
- return;
2306
- }
2307
- }
2308
2296
  const spinner = ora5("Pushing changes...").start();
2309
2297
  try {
2310
2298
  const updateData = { content };
@@ -2386,11 +2374,12 @@ async function createOrLinkBlueprint(cwd, file, filename, content, options) {
2386
2374
  "CONTINUE_PROMPT": "Continue",
2387
2375
  "OPENCODE_COMMAND": "OpenCode"
2388
2376
  };
2389
- const typeLabel = isCommandFile ? chalk6.magenta(`[${commandNames[inferredType] || "Command"} Command]`) : "";
2390
2377
  console.log(chalk6.cyan("\n\u{1F4E4} Push new blueprint"));
2391
2378
  console.log(chalk6.gray(` File: ${file}`));
2392
2379
  if (isCommandFile) {
2393
- console.log(chalk6.gray(` Type: ${typeLabel}`));
2380
+ console.log(chalk6.magenta(` Type: ${commandNames[inferredType] || "Command"} Command`));
2381
+ } else {
2382
+ console.log(chalk6.gray(` Type: ${inferredType.replace(/_/g, " ")}`));
2394
2383
  }
2395
2384
  let name = options.name;
2396
2385
  let description = options.description;
@@ -2472,8 +2461,10 @@ async function createOrLinkBlueprint(cwd, file, filename, content, options) {
2472
2461
  repositoryPath: hierarchyInfo.repositoryPath || void 0
2473
2462
  });
2474
2463
  console.log();
2475
- console.log(chalk6.green(`\u2705 Created blueprint ${chalk6.bold(result.blueprint.name)}`));
2464
+ const typeDesc = isCommandFile ? `${commandNames[inferredType]} Command` : "Blueprint";
2465
+ console.log(chalk6.green(`\u2705 Created ${typeDesc} ${chalk6.bold(result.blueprint.name)}`));
2476
2466
  console.log(chalk6.gray(` ID: ${result.blueprint.id}`));
2467
+ console.log(chalk6.gray(` Type: ${inferredType}`));
2477
2468
  console.log(chalk6.gray(` Visibility: ${visibility}`));
2478
2469
  if (hierarchyInfo.repositoryPath) {
2479
2470
  console.log(chalk6.gray(` Path: ${hierarchyInfo.repositoryPath}`));
@@ -3272,7 +3263,7 @@ function generateFileContent(options, platform2) {
3272
3263
  sections.push(`Project description: ${projectDesc}`);
3273
3264
  }
3274
3265
  sections.push("");
3275
- if (options.stack.length > 0) {
3266
+ if (options.stack.length > 0 || options.additionalLibraries) {
3276
3267
  if (isMarkdown || isMdc) {
3277
3268
  sections.push("## Tech Stack");
3278
3269
  sections.push("");
@@ -3284,8 +3275,19 @@ function generateFileContent(options, platform2) {
3284
3275
  for (const tech of stackList) {
3285
3276
  sections.push(`- ${tech}`);
3286
3277
  }
3278
+ if (options.additionalLibraries) {
3279
+ const libs = options.additionalLibraries.split(",").map((l) => l.trim()).filter(Boolean);
3280
+ for (const lib of libs) {
3281
+ sections.push(`- ${lib}`);
3282
+ }
3283
+ }
3287
3284
  } else {
3288
- sections.push(stackList.join(", "));
3285
+ const allTech = [...stackList];
3286
+ if (options.additionalLibraries) {
3287
+ const libs = options.additionalLibraries.split(",").map((l) => l.trim()).filter(Boolean);
3288
+ allTech.push(...libs);
3289
+ }
3290
+ sections.push(allTech.join(", "));
3289
3291
  }
3290
3292
  sections.push("");
3291
3293
  }
@@ -3306,7 +3308,24 @@ function generateFileContent(options, platform2) {
3306
3308
  sections.push(`- **License:** ${license || options.license.toUpperCase()}`);
3307
3309
  }
3308
3310
  if (options.architecture) {
3309
- sections.push(`- **Architecture:** ${architecture || options.architecture}`);
3311
+ const archNames = {
3312
+ monolith: "Monolith",
3313
+ modular_monolith: "Modular Monolith",
3314
+ microservices: "Microservices",
3315
+ multi_image_docker: "Multi-Image Docker (shared codebase, separate entrypoints)",
3316
+ serverless: "Serverless",
3317
+ event_driven: "Event-Driven",
3318
+ layered: "Layered / N-Tier",
3319
+ hexagonal: "Hexagonal / Ports & Adapters",
3320
+ clean: "Clean Architecture",
3321
+ cqrs: "CQRS",
3322
+ mvc: "MVC / MVVM",
3323
+ ddd: "Domain-Driven Design",
3324
+ component_based: "Component-Based",
3325
+ plugin: "Plugin Architecture"
3326
+ };
3327
+ const archDisplay = archNames[options.architecture] || architecture || options.architecture;
3328
+ sections.push(`- **Architecture:** ${archDisplay}`);
3310
3329
  }
3311
3330
  if (options.cicd) {
3312
3331
  sections.push(`- **CI/CD:** ${cicd || options.cicd}`);
@@ -3367,6 +3386,15 @@ function generateFileContent(options, platform2) {
3367
3386
  }
3368
3387
  sections.push(`- **Containers:** ${containerInfo}`);
3369
3388
  }
3389
+ if (options.dockerImageNames) {
3390
+ const images = options.dockerImageNames.split(",").map((i) => i.trim()).filter(Boolean);
3391
+ if (images.length > 0) {
3392
+ sections.push("- **Docker Images:**");
3393
+ for (const img of images) {
3394
+ sections.push(` - \`${img}\``);
3395
+ }
3396
+ }
3397
+ }
3370
3398
  if (options.exampleRepoUrl) {
3371
3399
  sections.push(`- **Example Repo:** ${options.exampleRepoUrl} (use as reference for style/structure)`);
3372
3400
  }
@@ -3440,6 +3468,11 @@ function generateFileContent(options, platform2) {
3440
3468
  sections.push("- Do NOT commit directly to main/master branch");
3441
3469
  sections.push("- Create a descriptive branch name (e.g., `feat/add-login`, `fix/button-styling`)");
3442
3470
  sections.push("- Open a PR for review before merging");
3471
+ } else if (options.commitWorkflow === "hybrid") {
3472
+ sections.push("- **Workflow:** Hybrid - feature branches for larger changes");
3473
+ sections.push("- Direct commits to main are acceptable for small fixes and documentation");
3474
+ sections.push("- For larger features or breaking changes, create a feature branch and open a PR");
3475
+ sections.push("- Create descriptive branch names when needed (e.g., `feat/add-login`, `fix/button-styling`)");
3443
3476
  } else if (options.commitWorkflow === "direct_main") {
3444
3477
  sections.push("- **Workflow:** Commit directly to main/master branch");
3445
3478
  sections.push("- Small, focused commits are preferred");
@@ -4025,7 +4058,7 @@ function generateYamlConfig(options, platform2) {
4025
4058
 
4026
4059
  // src/commands/wizard.ts
4027
4060
  var DRAFTS_DIR = ".lynxprompt/drafts";
4028
- var CLI_VERSION = "1.4.1";
4061
+ var CLI_VERSION = "1.4.3";
4029
4062
  async function saveDraftLocally(name, config2, stepReached) {
4030
4063
  const draftsPath = join4(process.cwd(), DRAFTS_DIR);
4031
4064
  await mkdir3(draftsPath, { recursive: true });
@@ -4924,6 +4957,7 @@ function detectCurrentOS() {
4924
4957
  var ARCHITECTURE_PATTERNS = [
4925
4958
  { id: "monolith", label: "Monolith" },
4926
4959
  { id: "microservices", label: "Microservices" },
4960
+ { id: "multi_image_docker", label: "Multi-Image Docker (shared codebase)" },
4927
4961
  { id: "serverless", label: "Serverless" },
4928
4962
  { id: "mvc", label: "MVC" },
4929
4963
  { id: "layered", label: "Layered/N-tier" },
@@ -5816,6 +5850,17 @@ async function runInteractiveWizard(options, detected, userTier) {
5816
5850
  }, promptConfig);
5817
5851
  answers.orm = ormResponse.orm || "";
5818
5852
  }
5853
+ console.log();
5854
+ console.log(chalk7.cyan(" \u{1F4E6} Additional Libraries"));
5855
+ console.log(chalk7.gray(" Add key libraries not listed above (e.g., Telethon, APScheduler, boto3)"));
5856
+ console.log();
5857
+ const additionalLibsResponse = await prompts3({
5858
+ type: "text",
5859
+ name: "additionalLibraries",
5860
+ message: chalk7.white("Additional libraries (comma-separated, optional):"),
5861
+ hint: chalk7.gray("e.g., Telethon, APScheduler, uvicorn, alembic")
5862
+ }, promptConfig);
5863
+ answers.additionalLibraries = additionalLibsResponse.additionalLibraries || "";
5819
5864
  answers.stack = [...selectedLanguages, ...selectedFrameworks, ...selectedDatabases];
5820
5865
  const repoStep = getCurrentStep("repo");
5821
5866
  showStep(currentStepNum, repoStep, userTier);
@@ -5959,7 +6004,20 @@ async function runInteractiveWizard(options, detected, userTier) {
5959
6004
  initial: 0
5960
6005
  }, promptConfig);
5961
6006
  answers.defaultBranch = defaultBranchResponse.defaultBranch || "main";
5962
- answers.commitWorkflow = answers.branchStrategy === "none" ? "direct_main" : "branch_pr";
6007
+ const defaultWorkflow = answers.branchStrategy === "none" ? "direct_main" : "hybrid";
6008
+ const commitWorkflowResponse = await prompts3({
6009
+ type: "select",
6010
+ name: "commitWorkflow",
6011
+ message: chalk7.white("Commit workflow:"),
6012
+ choices: [
6013
+ { title: "\u{1F33F} Feature Branches + PRs - All changes via pull requests", value: "branch_pr" },
6014
+ { title: "\u{1F500} Hybrid - PRs for features, direct commits for small fixes", value: "hybrid" },
6015
+ { title: "\u26A1 Direct to Main - Commit directly, no branches", value: "direct_main" }
6016
+ ],
6017
+ initial: defaultWorkflow === "direct_main" ? 2 : 1
6018
+ // Default to hybrid for most projects
6019
+ }, promptConfig);
6020
+ answers.commitWorkflow = commitWorkflowResponse.commitWorkflow || defaultWorkflow;
5963
6021
  const cicdChoices = [
5964
6022
  { title: chalk7.gray("\u23ED Skip"), value: "" },
5965
6023
  ...CICD_OPTIONS.map((c) => ({
@@ -6060,6 +6118,15 @@ async function runInteractiveWizard(options, detected, userTier) {
6060
6118
  }, promptConfig);
6061
6119
  answers.customRegistryUrl = customRegistryResponse.customRegistryUrl || "";
6062
6120
  }
6121
+ console.log();
6122
+ console.log(chalk7.gray(" \u{1F4E6} Specify published Docker image names (helps AI understand deployment)"));
6123
+ const dockerImagesResponse = await prompts3({
6124
+ type: "text",
6125
+ name: "dockerImageNames",
6126
+ message: chalk7.white("Docker image names (comma-separated, optional):"),
6127
+ hint: chalk7.gray("e.g., myuser/myapp, myuser/myapp-viewer")
6128
+ }, promptConfig);
6129
+ answers.dockerImageNames = dockerImagesResponse.dockerImageNames || "";
6063
6130
  }
6064
6131
  console.log();
6065
6132
  console.log(chalk7.gray(" \u{1F4DA} Point the AI to a well-structured public repository as a reference."));
@@ -6704,11 +6771,29 @@ async function runInteractiveWizard(options, detected, userTier) {
6704
6771
  }, promptConfig);
6705
6772
  answers.importantFiles = importantFilesResponse.importantFiles || [];
6706
6773
  console.log();
6774
+ const stackLanguages = answers.stack || [];
6775
+ const importantFileHints = [];
6776
+ if (stackLanguages.includes("python")) {
6777
+ importantFileHints.push("src/config.py", "requirements.txt", ".env.example");
6778
+ }
6779
+ if (stackLanguages.includes("typescript") || stackLanguages.includes("javascript")) {
6780
+ importantFileHints.push("src/config/index.ts", "tsconfig.json", ".env.example");
6781
+ }
6782
+ if (stackLanguages.includes("go")) {
6783
+ importantFileHints.push("cmd/main.go", "internal/config/config.go", "go.mod");
6784
+ }
6785
+ if (stackLanguages.includes("rust")) {
6786
+ importantFileHints.push("src/main.rs", "src/config.rs", "Cargo.toml");
6787
+ }
6788
+ if (stackLanguages.includes("java") || stackLanguages.includes("kotlin")) {
6789
+ importantFileHints.push("src/main/resources/application.yml", "pom.xml");
6790
+ }
6791
+ const hintText = importantFileHints.length > 0 ? `e.g., ${importantFileHints.slice(0, 3).join(", ")}` : "e.g., src/config/index.ts, docs/api.md, prisma/schema.prisma";
6707
6792
  const customImportantFilesResponse = await prompts3({
6708
6793
  type: "text",
6709
6794
  name: "importantFilesOther",
6710
6795
  message: chalk7.white("Other important files (comma-separated, optional):"),
6711
- hint: chalk7.gray("e.g., src/config/index.ts, docs/api.md, prisma/schema.prisma")
6796
+ hint: chalk7.gray(hintText)
6712
6797
  }, promptConfig);
6713
6798
  answers.importantFilesOther = customImportantFilesResponse.importantFilesOther || "";
6714
6799
  console.log();
@@ -7334,7 +7419,11 @@ async function runInteractiveWizard(options, detected, userTier) {
7334
7419
  // AI Behavior
7335
7420
  planModeFrequency: answers.planModeFrequency,
7336
7421
  // Commit workflow
7337
- commitWorkflow: answers.commitWorkflow
7422
+ commitWorkflow: answers.commitWorkflow,
7423
+ // Additional libraries (not in predefined lists)
7424
+ additionalLibraries: answers.additionalLibraries,
7425
+ // Docker image names
7426
+ dockerImageNames: answers.dockerImageNames
7338
7427
  };
7339
7428
  }
7340
7429
 
@@ -9495,7 +9584,7 @@ function handleError2(error) {
9495
9584
  }
9496
9585
 
9497
9586
  // src/index.ts
9498
- var CLI_VERSION2 = "1.4.1";
9587
+ var CLI_VERSION2 = "1.4.3";
9499
9588
  var program = new Command();
9500
9589
  program.name("lynxprompt").description("CLI for LynxPrompt - Generate AI IDE configuration files").version(CLI_VERSION2);
9501
9590
  program.command("wizard").description("Generate AI IDE configuration (recommended for most users)").option("-n, --name <name>", "Project name").option("-d, --description <description>", "Project description").option("-s, --stack <stack>", "Tech stack (comma-separated)").option("-f, --format <format>", "Output format: agents, cursor, or comma-separated for multiple").option("-p, --platforms <platforms>", "Alias for --format (deprecated)").option("--persona <persona>", "AI persona (fullstack, backend, frontend, devops, data, security)").option("--boundaries <level>", "Boundary preset (conservative, standard, permissive)").option("-y, --yes", "Skip prompts, use defaults (generates AGENTS.md)").option("-o, --output <dir>", "Output directory (default: current directory)").option("--repo-url <url>", "Analyze remote repository URL (GitHub/GitLab supported)").option("--blueprint", "Generate with [[VARIABLE|default]] placeholders for templates").option("--license <type>", "License type (mit, apache-2.0, gpl-3.0, etc.)").option("--ci-cd <platform>", "CI/CD platform (github_actions, gitlab_ci, jenkins, etc.)").option("--project-type <type>", "Project type (work, leisure, opensource, learning)").option("--detect-only", "Only detect project info, don't generate files").option("--load-draft <name>", "Load a saved wizard draft").option("--save-draft <name>", "Save wizard state as a draft (auto-saves at end)").option("--vars <values>", "Fill variables: VAR1=value1,VAR2=value2").action(wizardCommand);