lynxprompt 1.4.2 → 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 +106 -8
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -3263,7 +3263,7 @@ function generateFileContent(options, platform2) {
|
|
|
3263
3263
|
sections.push(`Project description: ${projectDesc}`);
|
|
3264
3264
|
}
|
|
3265
3265
|
sections.push("");
|
|
3266
|
-
if (options.stack.length > 0) {
|
|
3266
|
+
if (options.stack.length > 0 || options.additionalLibraries) {
|
|
3267
3267
|
if (isMarkdown || isMdc) {
|
|
3268
3268
|
sections.push("## Tech Stack");
|
|
3269
3269
|
sections.push("");
|
|
@@ -3275,8 +3275,19 @@ function generateFileContent(options, platform2) {
|
|
|
3275
3275
|
for (const tech of stackList) {
|
|
3276
3276
|
sections.push(`- ${tech}`);
|
|
3277
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
|
+
}
|
|
3278
3284
|
} else {
|
|
3279
|
-
|
|
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(", "));
|
|
3280
3291
|
}
|
|
3281
3292
|
sections.push("");
|
|
3282
3293
|
}
|
|
@@ -3297,7 +3308,24 @@ function generateFileContent(options, platform2) {
|
|
|
3297
3308
|
sections.push(`- **License:** ${license || options.license.toUpperCase()}`);
|
|
3298
3309
|
}
|
|
3299
3310
|
if (options.architecture) {
|
|
3300
|
-
|
|
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}`);
|
|
3301
3329
|
}
|
|
3302
3330
|
if (options.cicd) {
|
|
3303
3331
|
sections.push(`- **CI/CD:** ${cicd || options.cicd}`);
|
|
@@ -3358,6 +3386,15 @@ function generateFileContent(options, platform2) {
|
|
|
3358
3386
|
}
|
|
3359
3387
|
sections.push(`- **Containers:** ${containerInfo}`);
|
|
3360
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
|
+
}
|
|
3361
3398
|
if (options.exampleRepoUrl) {
|
|
3362
3399
|
sections.push(`- **Example Repo:** ${options.exampleRepoUrl} (use as reference for style/structure)`);
|
|
3363
3400
|
}
|
|
@@ -3431,6 +3468,11 @@ function generateFileContent(options, platform2) {
|
|
|
3431
3468
|
sections.push("- Do NOT commit directly to main/master branch");
|
|
3432
3469
|
sections.push("- Create a descriptive branch name (e.g., `feat/add-login`, `fix/button-styling`)");
|
|
3433
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`)");
|
|
3434
3476
|
} else if (options.commitWorkflow === "direct_main") {
|
|
3435
3477
|
sections.push("- **Workflow:** Commit directly to main/master branch");
|
|
3436
3478
|
sections.push("- Small, focused commits are preferred");
|
|
@@ -4016,7 +4058,7 @@ function generateYamlConfig(options, platform2) {
|
|
|
4016
4058
|
|
|
4017
4059
|
// src/commands/wizard.ts
|
|
4018
4060
|
var DRAFTS_DIR = ".lynxprompt/drafts";
|
|
4019
|
-
var CLI_VERSION = "1.4.
|
|
4061
|
+
var CLI_VERSION = "1.4.3";
|
|
4020
4062
|
async function saveDraftLocally(name, config2, stepReached) {
|
|
4021
4063
|
const draftsPath = join4(process.cwd(), DRAFTS_DIR);
|
|
4022
4064
|
await mkdir3(draftsPath, { recursive: true });
|
|
@@ -4915,6 +4957,7 @@ function detectCurrentOS() {
|
|
|
4915
4957
|
var ARCHITECTURE_PATTERNS = [
|
|
4916
4958
|
{ id: "monolith", label: "Monolith" },
|
|
4917
4959
|
{ id: "microservices", label: "Microservices" },
|
|
4960
|
+
{ id: "multi_image_docker", label: "Multi-Image Docker (shared codebase)" },
|
|
4918
4961
|
{ id: "serverless", label: "Serverless" },
|
|
4919
4962
|
{ id: "mvc", label: "MVC" },
|
|
4920
4963
|
{ id: "layered", label: "Layered/N-tier" },
|
|
@@ -5807,6 +5850,17 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
5807
5850
|
}, promptConfig);
|
|
5808
5851
|
answers.orm = ormResponse.orm || "";
|
|
5809
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 || "";
|
|
5810
5864
|
answers.stack = [...selectedLanguages, ...selectedFrameworks, ...selectedDatabases];
|
|
5811
5865
|
const repoStep = getCurrentStep("repo");
|
|
5812
5866
|
showStep(currentStepNum, repoStep, userTier);
|
|
@@ -5950,7 +6004,20 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
5950
6004
|
initial: 0
|
|
5951
6005
|
}, promptConfig);
|
|
5952
6006
|
answers.defaultBranch = defaultBranchResponse.defaultBranch || "main";
|
|
5953
|
-
|
|
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;
|
|
5954
6021
|
const cicdChoices = [
|
|
5955
6022
|
{ title: chalk7.gray("\u23ED Skip"), value: "" },
|
|
5956
6023
|
...CICD_OPTIONS.map((c) => ({
|
|
@@ -6051,6 +6118,15 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
6051
6118
|
}, promptConfig);
|
|
6052
6119
|
answers.customRegistryUrl = customRegistryResponse.customRegistryUrl || "";
|
|
6053
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 || "";
|
|
6054
6130
|
}
|
|
6055
6131
|
console.log();
|
|
6056
6132
|
console.log(chalk7.gray(" \u{1F4DA} Point the AI to a well-structured public repository as a reference."));
|
|
@@ -6695,11 +6771,29 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
6695
6771
|
}, promptConfig);
|
|
6696
6772
|
answers.importantFiles = importantFilesResponse.importantFiles || [];
|
|
6697
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";
|
|
6698
6792
|
const customImportantFilesResponse = await prompts3({
|
|
6699
6793
|
type: "text",
|
|
6700
6794
|
name: "importantFilesOther",
|
|
6701
6795
|
message: chalk7.white("Other important files (comma-separated, optional):"),
|
|
6702
|
-
hint: chalk7.gray(
|
|
6796
|
+
hint: chalk7.gray(hintText)
|
|
6703
6797
|
}, promptConfig);
|
|
6704
6798
|
answers.importantFilesOther = customImportantFilesResponse.importantFilesOther || "";
|
|
6705
6799
|
console.log();
|
|
@@ -7325,7 +7419,11 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
7325
7419
|
// AI Behavior
|
|
7326
7420
|
planModeFrequency: answers.planModeFrequency,
|
|
7327
7421
|
// Commit workflow
|
|
7328
|
-
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
|
|
7329
7427
|
};
|
|
7330
7428
|
}
|
|
7331
7429
|
|
|
@@ -9486,7 +9584,7 @@ function handleError2(error) {
|
|
|
9486
9584
|
}
|
|
9487
9585
|
|
|
9488
9586
|
// src/index.ts
|
|
9489
|
-
var CLI_VERSION2 = "1.4.
|
|
9587
|
+
var CLI_VERSION2 = "1.4.3";
|
|
9490
9588
|
var program = new Command();
|
|
9491
9589
|
program.name("lynxprompt").description("CLI for LynxPrompt - Generate AI IDE configuration files").version(CLI_VERSION2);
|
|
9492
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);
|