lynxprompt 2.0.6 → 2.0.7
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 +4 -0
- package/dist/index.js +219 -107
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -2220,6 +2220,31 @@ async function ensureHierarchy(_cwd, repositoryRoot, name) {
|
|
|
2220
2220
|
return null;
|
|
2221
2221
|
}
|
|
2222
2222
|
}
|
|
2223
|
+
async function findExistingBlueprintOnServer(repositoryPath, hierarchyId) {
|
|
2224
|
+
if (!repositoryPath) return null;
|
|
2225
|
+
try {
|
|
2226
|
+
let offset = 0;
|
|
2227
|
+
const limit = 50;
|
|
2228
|
+
while (true) {
|
|
2229
|
+
const response = await api.listBlueprints({ limit, offset });
|
|
2230
|
+
for (const bp of response.blueprints) {
|
|
2231
|
+
if (bp.repository_path === repositoryPath) {
|
|
2232
|
+
if (hierarchyId) {
|
|
2233
|
+
if (bp.hierarchy_id === hierarchyId) {
|
|
2234
|
+
return { id: bp.id, name: bp.name };
|
|
2235
|
+
}
|
|
2236
|
+
} else {
|
|
2237
|
+
return { id: bp.id, name: bp.name };
|
|
2238
|
+
}
|
|
2239
|
+
}
|
|
2240
|
+
}
|
|
2241
|
+
if (!response.has_more) break;
|
|
2242
|
+
offset += limit;
|
|
2243
|
+
}
|
|
2244
|
+
} catch {
|
|
2245
|
+
}
|
|
2246
|
+
return null;
|
|
2247
|
+
}
|
|
2223
2248
|
function createRepositoryRoot(rootPath) {
|
|
2224
2249
|
try {
|
|
2225
2250
|
const gitConfigPath = path.join(rootPath, ".git", "config");
|
|
@@ -2408,6 +2433,26 @@ async function createOrLinkBlueprint(cwd, file, filename, content, options) {
|
|
|
2408
2433
|
if (hierarchyInfo.repositoryPath) {
|
|
2409
2434
|
hierarchyId = await ensureHierarchy(cwd, hierarchyInfo.repositoryRoot, path.basename(cwd));
|
|
2410
2435
|
}
|
|
2436
|
+
const existingBlueprint = await findExistingBlueprintOnServer(
|
|
2437
|
+
hierarchyInfo.repositoryPath,
|
|
2438
|
+
hierarchyId
|
|
2439
|
+
);
|
|
2440
|
+
if (existingBlueprint) {
|
|
2441
|
+
console.log(chalk6.yellow(`
|
|
2442
|
+
\u26A0 Found existing blueprint "${existingBlueprint.name}" (${existingBlueprint.id}) with the same path.`));
|
|
2443
|
+
console.log(chalk6.gray(" Updating existing blueprint instead of creating a duplicate."));
|
|
2444
|
+
await trackBlueprint(cwd, {
|
|
2445
|
+
id: existingBlueprint.id,
|
|
2446
|
+
name: existingBlueprint.name,
|
|
2447
|
+
file,
|
|
2448
|
+
content,
|
|
2449
|
+
source: "private",
|
|
2450
|
+
hierarchyId: hierarchyId || void 0,
|
|
2451
|
+
repositoryPath: hierarchyInfo.repositoryPath || void 0
|
|
2452
|
+
});
|
|
2453
|
+
await updateBlueprint(cwd, file, existingBlueprint.id, content, options);
|
|
2454
|
+
return;
|
|
2455
|
+
}
|
|
2411
2456
|
const spinner = ora5("Creating blueprint...").start();
|
|
2412
2457
|
try {
|
|
2413
2458
|
const result = await api.createBlueprint({
|
|
@@ -5482,7 +5527,7 @@ var TEST_FRAMEWORKS2 = TEST_FRAMEWORKS;
|
|
|
5482
5527
|
|
|
5483
5528
|
// src/commands/wizard.ts
|
|
5484
5529
|
var DRAFTS_DIR = ".lynxprompt/drafts";
|
|
5485
|
-
var CLI_VERSION = "2.0.
|
|
5530
|
+
var CLI_VERSION = "2.0.7";
|
|
5486
5531
|
async function saveDraftLocally(name, config2, stepReached) {
|
|
5487
5532
|
const draftsPath = join4(process.cwd(), DRAFTS_DIR);
|
|
5488
5533
|
await mkdir3(draftsPath, { recursive: true });
|
|
@@ -5575,19 +5620,18 @@ async function readMultilineInput(prompt) {
|
|
|
5575
5620
|
});
|
|
5576
5621
|
}
|
|
5577
5622
|
var WIZARD_STEPS = [
|
|
5578
|
-
{ id: "format", title: "Output Format", icon: "\u{1F4E4}"
|
|
5579
|
-
{ id: "project", title: "Project Basics", icon: "\u2728"
|
|
5580
|
-
{ id: "tech", title: "Tech Stack", icon: "\u{1F4BB}"
|
|
5581
|
-
{ id: "repo", title: "Repository Setup", icon: "\u{1F500}"
|
|
5582
|
-
{ id: "security", title: "Security", icon: "\u{1F510}"
|
|
5583
|
-
|
|
5584
|
-
{ id: "
|
|
5585
|
-
{ id: "
|
|
5586
|
-
{ id: "
|
|
5587
|
-
{ id: "
|
|
5588
|
-
{ id: "
|
|
5589
|
-
{ id: "
|
|
5590
|
-
{ id: "extra", title: "Final Details", icon: "\u{1F4AC}", tier: "basic" }
|
|
5623
|
+
{ id: "format", title: "Output Format", icon: "\u{1F4E4}" },
|
|
5624
|
+
{ id: "project", title: "Project Basics", icon: "\u2728" },
|
|
5625
|
+
{ id: "tech", title: "Tech Stack", icon: "\u{1F4BB}" },
|
|
5626
|
+
{ id: "repo", title: "Repository Setup", icon: "\u{1F500}" },
|
|
5627
|
+
{ id: "security", title: "Security", icon: "\u{1F510}" },
|
|
5628
|
+
{ id: "commands", title: "Commands", icon: "\u{1F4CB}" },
|
|
5629
|
+
{ id: "code_style", title: "Code Style", icon: "\u{1FA84}" },
|
|
5630
|
+
{ id: "ai", title: "AI Behavior", icon: "\u{1F9E0}" },
|
|
5631
|
+
{ id: "boundaries", title: "Boundaries", icon: "\u{1F6E1}\uFE0F" },
|
|
5632
|
+
{ id: "testing", title: "Testing Strategy", icon: "\u{1F9EA}" },
|
|
5633
|
+
{ id: "static", title: "Static Files", icon: "\u{1F4C4}" },
|
|
5634
|
+
{ id: "extra", title: "Final Details", icon: "\u{1F4AC}" }
|
|
5591
5635
|
];
|
|
5592
5636
|
var ALL_PLATFORMS = [
|
|
5593
5637
|
// Popular platforms
|
|
@@ -6250,9 +6294,6 @@ var ARCHITECTURE_PATTERNS3 = [
|
|
|
6250
6294
|
{ id: "modular", label: "Modular monolith" },
|
|
6251
6295
|
{ id: "other", label: "Other" }
|
|
6252
6296
|
];
|
|
6253
|
-
function canAccessTier(_userTier, _requiredTier) {
|
|
6254
|
-
return true;
|
|
6255
|
-
}
|
|
6256
6297
|
function sortSelectedFirst(choices) {
|
|
6257
6298
|
return [...choices].sort((a, b) => {
|
|
6258
6299
|
if (a.selected && !b.selected) return -1;
|
|
@@ -6260,9 +6301,6 @@ function sortSelectedFirst(choices) {
|
|
|
6260
6301
|
return 0;
|
|
6261
6302
|
});
|
|
6262
6303
|
}
|
|
6263
|
-
function canAccessAI(userTier) {
|
|
6264
|
-
return userTier === "teams";
|
|
6265
|
-
}
|
|
6266
6304
|
async function aiAssist(instruction, existingContent) {
|
|
6267
6305
|
const spinner = ora6("AI is thinking...").start();
|
|
6268
6306
|
try {
|
|
@@ -6288,12 +6326,6 @@ async function aiAssist(instruction, existingContent) {
|
|
|
6288
6326
|
return null;
|
|
6289
6327
|
}
|
|
6290
6328
|
}
|
|
6291
|
-
function getTierBadge(_tier) {
|
|
6292
|
-
return null;
|
|
6293
|
-
}
|
|
6294
|
-
function getAvailableSteps(userTier) {
|
|
6295
|
-
return WIZARD_STEPS.filter((step) => canAccessTier(userTier, step.tier));
|
|
6296
|
-
}
|
|
6297
6329
|
function printBox(lines, color = chalk7.gray) {
|
|
6298
6330
|
const maxLen = Math.max(...lines.map((l) => l.replace(/\x1b\[[0-9;]*m/g, "").length));
|
|
6299
6331
|
const top = "\u250C" + "\u2500".repeat(maxLen + 2) + "\u2510";
|
|
@@ -6306,9 +6338,8 @@ function printBox(lines, color = chalk7.gray) {
|
|
|
6306
6338
|
}
|
|
6307
6339
|
console.log(color(bottom));
|
|
6308
6340
|
}
|
|
6309
|
-
function showStep(current, step
|
|
6310
|
-
const
|
|
6311
|
-
const total = availableSteps.length;
|
|
6341
|
+
function showStep(current, step) {
|
|
6342
|
+
const total = WIZARD_STEPS.length;
|
|
6312
6343
|
let progressBar = "";
|
|
6313
6344
|
for (let i = 1; i <= total; i++) {
|
|
6314
6345
|
if (i < current) {
|
|
@@ -6319,38 +6350,18 @@ function showStep(current, step, userTier) {
|
|
|
6319
6350
|
progressBar += chalk7.gray("\u25CB");
|
|
6320
6351
|
}
|
|
6321
6352
|
}
|
|
6322
|
-
const badge = getTierBadge(step.tier);
|
|
6323
6353
|
console.log();
|
|
6324
6354
|
console.log(chalk7.gray(" \u2550".repeat(30)));
|
|
6325
|
-
|
|
6326
|
-
if (badge) {
|
|
6327
|
-
stepLine += " " + badge.color(`[${badge.label}]`);
|
|
6328
|
-
}
|
|
6329
|
-
console.log(stepLine);
|
|
6355
|
+
console.log(` ${progressBar} ${chalk7.cyan.bold(`Step ${current}/${total}`)}: ${step.icon} ${chalk7.bold(step.title)}`);
|
|
6330
6356
|
console.log(chalk7.gray(" \u2550".repeat(30)));
|
|
6331
6357
|
console.log();
|
|
6332
6358
|
}
|
|
6333
|
-
function showWizardOverview(
|
|
6359
|
+
function showWizardOverview() {
|
|
6334
6360
|
console.log(chalk7.bold(" \u{1F4CB} Wizard Steps Overview:"));
|
|
6335
6361
|
console.log();
|
|
6336
|
-
let
|
|
6337
|
-
|
|
6338
|
-
|
|
6339
|
-
const badge = getTierBadge(step.tier);
|
|
6340
|
-
if (canAccess) {
|
|
6341
|
-
let line = chalk7.green(` ${stepNum.toString().padStart(2)}. \u2713 ${step.icon} ${step.title}`);
|
|
6342
|
-
if (badge) {
|
|
6343
|
-
line += " " + badge.color(`[${badge.label}]`);
|
|
6344
|
-
}
|
|
6345
|
-
console.log(line);
|
|
6346
|
-
stepNum++;
|
|
6347
|
-
} else {
|
|
6348
|
-
let line = chalk7.gray(` \u2500 \u{1F512} ${step.icon} ${step.title}`);
|
|
6349
|
-
if (badge) {
|
|
6350
|
-
line += " " + badge.color.dim(`[${badge.label}]`);
|
|
6351
|
-
}
|
|
6352
|
-
console.log(line);
|
|
6353
|
-
}
|
|
6362
|
+
for (let i = 0; i < WIZARD_STEPS.length; i++) {
|
|
6363
|
+
const step = WIZARD_STEPS[i];
|
|
6364
|
+
console.log(chalk7.green(` ${(i + 1).toString().padStart(2)}. \u2713 ${step.icon} ${step.title}`));
|
|
6354
6365
|
}
|
|
6355
6366
|
console.log();
|
|
6356
6367
|
}
|
|
@@ -6501,8 +6512,6 @@ async function runWizardWithDraftProtection(options) {
|
|
|
6501
6512
|
}
|
|
6502
6513
|
const authenticated = isAuthenticated();
|
|
6503
6514
|
const user = getUser();
|
|
6504
|
-
const userPlanRaw = user?.plan?.toLowerCase() || "free";
|
|
6505
|
-
const userTier = userPlanRaw === "teams" ? "teams" : "users";
|
|
6506
6515
|
if (!authenticated) {
|
|
6507
6516
|
console.log(chalk7.gray(` \u{1F464} Running as guest. ${chalk7.cyan("lynxp login")} for cloud sync & sharing.`));
|
|
6508
6517
|
console.log();
|
|
@@ -6510,15 +6519,9 @@ async function runWizardWithDraftProtection(options) {
|
|
|
6510
6519
|
console.log(chalk7.green(` \u2713 Logged in as ${chalk7.bold(user?.name || user?.email)}`));
|
|
6511
6520
|
console.log();
|
|
6512
6521
|
}
|
|
6513
|
-
showWizardOverview(
|
|
6522
|
+
showWizardOverview();
|
|
6514
6523
|
console.log(chalk7.gray(` \u{1F4BE} Tip: Type 'save:draftname' anytime to save progress locally`));
|
|
6515
6524
|
console.log();
|
|
6516
|
-
const accessibleSteps = getAvailableSteps(userTier);
|
|
6517
|
-
const lockedSteps = WIZARD_STEPS.length - accessibleSteps.length;
|
|
6518
|
-
if (lockedSteps > 0) {
|
|
6519
|
-
console.log(chalk7.gray(` ${lockedSteps} step${lockedSteps > 1 ? "s" : ""} locked.`));
|
|
6520
|
-
console.log();
|
|
6521
|
-
}
|
|
6522
6525
|
let detected = await detectProject(process.cwd());
|
|
6523
6526
|
if (detected) {
|
|
6524
6527
|
const detectedInfo = [
|
|
@@ -6642,8 +6645,36 @@ async function runWizardWithDraftProtection(options) {
|
|
|
6642
6645
|
useGitWorktrees: true
|
|
6643
6646
|
// Default to true for parallel AI sessions
|
|
6644
6647
|
};
|
|
6648
|
+
console.log();
|
|
6649
|
+
console.log(chalk7.bold(" \u{1F4CA} Using auto-detected defaults:"));
|
|
6650
|
+
console.log();
|
|
6651
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Name ") + chalk7.cyan(config2.name));
|
|
6652
|
+
if (config2.description) {
|
|
6653
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Description ") + chalk7.gray(config2.description.length > 60 ? config2.description.substring(0, 57) + "..." : config2.description));
|
|
6654
|
+
}
|
|
6655
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Stack ") + chalk7.cyan(config2.stack.length > 0 ? config2.stack.join(", ") : "none detected"));
|
|
6656
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Platforms ") + chalk7.cyan(config2.platforms.join(", ")));
|
|
6657
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Persona ") + chalk7.cyan(config2.persona));
|
|
6658
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Boundaries ") + chalk7.cyan(config2.boundaries));
|
|
6659
|
+
const cmdEntries = Object.entries(config2.commands || {});
|
|
6660
|
+
if (cmdEntries.length > 0) {
|
|
6661
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Commands ") + chalk7.cyan(cmdEntries.map(([k, v]) => `${k}=${v}`).join(", ")));
|
|
6662
|
+
}
|
|
6663
|
+
if (detected?.license) {
|
|
6664
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("License ") + chalk7.cyan(detected.license.toUpperCase()));
|
|
6665
|
+
}
|
|
6666
|
+
if (detected?.repoHost) {
|
|
6667
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Repository ") + chalk7.cyan(detected.repoHost));
|
|
6668
|
+
}
|
|
6669
|
+
if (detected?.cicd) {
|
|
6670
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("CI/CD ") + chalk7.cyan(detected.cicd.replace("_", " ")));
|
|
6671
|
+
}
|
|
6672
|
+
if (detected?.hasDocker) {
|
|
6673
|
+
console.log(chalk7.green(" \u2713 ") + chalk7.white("Docker ") + chalk7.cyan("yes"));
|
|
6674
|
+
}
|
|
6675
|
+
console.log();
|
|
6645
6676
|
} else {
|
|
6646
|
-
config2 = await runInteractiveWizard(options, detected
|
|
6677
|
+
config2 = await runInteractiveWizard(options, detected);
|
|
6647
6678
|
}
|
|
6648
6679
|
const spinner = ora6("Generating configuration...").start();
|
|
6649
6680
|
try {
|
|
@@ -6855,10 +6886,10 @@ async function runWizardWithDraftProtection(options) {
|
|
|
6855
6886
|
process.exit(1);
|
|
6856
6887
|
}
|
|
6857
6888
|
}
|
|
6858
|
-
async function runInteractiveWizard(options, detected
|
|
6889
|
+
async function runInteractiveWizard(options, detected) {
|
|
6859
6890
|
const answers = options._draftAnswers ? { ...options._draftAnswers } : {};
|
|
6860
6891
|
const resumeFromStep = options._resumeFromStep || 0;
|
|
6861
|
-
const availableSteps =
|
|
6892
|
+
const availableSteps = WIZARD_STEPS;
|
|
6862
6893
|
let currentStepNum = 0;
|
|
6863
6894
|
wizardState.inProgress = true;
|
|
6864
6895
|
wizardState.answers = answers;
|
|
@@ -6891,11 +6922,11 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
6891
6922
|
platforms = answers.platforms;
|
|
6892
6923
|
console.log(chalk7.gray(` Step 1 (Output Format): Using saved platforms: ${platforms.join(", ")}`));
|
|
6893
6924
|
} else if (options.format) {
|
|
6894
|
-
showStep(currentStepNum, formatStep
|
|
6925
|
+
showStep(currentStepNum, formatStep);
|
|
6895
6926
|
platforms = options.format.split(",").map((f) => f.trim());
|
|
6896
6927
|
console.log(chalk7.gray(` Using format from flag: ${platforms.join(", ")}`));
|
|
6897
6928
|
} else {
|
|
6898
|
-
showStep(currentStepNum, formatStep
|
|
6929
|
+
showStep(currentStepNum, formatStep);
|
|
6899
6930
|
console.log(chalk7.gray(" Select the AI editors you want to generate config for:"));
|
|
6900
6931
|
console.log(chalk7.gray(" (AGENTS.md is recommended - works with most AI tools)"));
|
|
6901
6932
|
console.log(chalk7.gray(" Type to search/filter the list."));
|
|
@@ -6908,8 +6939,8 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
6908
6939
|
title: p.id === "agents" ? `${p.icon} ${p.name} ${chalk7.green.bold("\u2605 recommended")}` : `${p.icon} ${p.name}`,
|
|
6909
6940
|
value: p.id,
|
|
6910
6941
|
description: chalk7.gray(p.note),
|
|
6911
|
-
selected: p.id === "
|
|
6912
|
-
// Pre-select AGENTS.md
|
|
6942
|
+
selected: p.id === "universal"
|
|
6943
|
+
// Pre-select Universal (AGENTS.md)
|
|
6913
6944
|
})),
|
|
6914
6945
|
hint: chalk7.gray("type to filter \u2022 space select \u2022 enter confirm"),
|
|
6915
6946
|
min: 1,
|
|
@@ -6920,7 +6951,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
6920
6951
|
}
|
|
6921
6952
|
answers.platforms = platforms;
|
|
6922
6953
|
const projectStep = getCurrentStep("project");
|
|
6923
|
-
showStep(currentStepNum, projectStep
|
|
6954
|
+
showStep(currentStepNum, projectStep);
|
|
6924
6955
|
const nameResponse = await prompts3({
|
|
6925
6956
|
type: "text",
|
|
6926
6957
|
name: "name",
|
|
@@ -7011,7 +7042,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
7011
7042
|
console.log(chalk7.green(" \u2713 Blueprint mode enabled - values will use [[VARIABLE|default]] syntax"));
|
|
7012
7043
|
}
|
|
7013
7044
|
const techStep = getCurrentStep("tech");
|
|
7014
|
-
showStep(currentStepNum, techStep
|
|
7045
|
+
showStep(currentStepNum, techStep);
|
|
7015
7046
|
const letAiResponse = await prompts3({
|
|
7016
7047
|
type: "toggle",
|
|
7017
7048
|
name: "letAiDecide",
|
|
@@ -7148,7 +7179,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
7148
7179
|
answers.additionalLibraries = additionalLibsResponse.additionalLibraries || "";
|
|
7149
7180
|
answers.stack = [...selectedLanguages, ...selectedFrameworks, ...selectedDatabases];
|
|
7150
7181
|
const repoStep = getCurrentStep("repo");
|
|
7151
|
-
showStep(currentStepNum, repoStep
|
|
7182
|
+
showStep(currentStepNum, repoStep);
|
|
7152
7183
|
if (detected?.repoHost || detected?.license || detected?.cicd) {
|
|
7153
7184
|
console.log(chalk7.green(" \u2713 Auto-detected from your project:"));
|
|
7154
7185
|
if (detected.repoHost) console.log(chalk7.gray(` \u2022 Repository: ${detected.repoHost}${detected.repoUrl ? ` (${detected.repoUrl})` : ""}`));
|
|
@@ -7459,7 +7490,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
7459
7490
|
}, promptConfig);
|
|
7460
7491
|
answers.documentationUrl = docsUrlResponse.documentationUrl || "";
|
|
7461
7492
|
const securityStep = getCurrentStep("security");
|
|
7462
|
-
showStep(currentStepNum, securityStep
|
|
7493
|
+
showStep(currentStepNum, securityStep);
|
|
7463
7494
|
console.log();
|
|
7464
7495
|
console.log(chalk7.cyan(" 1\uFE0F\u20E3 Authentication Providers"));
|
|
7465
7496
|
console.log(chalk7.gray(" Which login methods should your app support?"));
|
|
@@ -7702,9 +7733,9 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
7702
7733
|
if (answers.analytics.length > 0) {
|
|
7703
7734
|
console.log(chalk7.gray(` \u2022 Analytics: ${answers.analytics.join(", ")}`));
|
|
7704
7735
|
}
|
|
7705
|
-
|
|
7736
|
+
{
|
|
7706
7737
|
const commandsStep = getCurrentStep("commands");
|
|
7707
|
-
showStep(currentStepNum, commandsStep
|
|
7738
|
+
showStep(currentStepNum, commandsStep);
|
|
7708
7739
|
console.log(chalk7.gray(" Select commands for your project. Detected commands are pre-selected."));
|
|
7709
7740
|
console.log();
|
|
7710
7741
|
const buildCommandChoices = (category, commonCmds, color) => {
|
|
@@ -7835,12 +7866,10 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
7835
7866
|
if (customCmdResponse.custom) {
|
|
7836
7867
|
answers.commands.custom = customCmdResponse.custom;
|
|
7837
7868
|
}
|
|
7838
|
-
} else {
|
|
7839
|
-
answers.commands = detected?.commands || {};
|
|
7840
7869
|
}
|
|
7841
|
-
|
|
7870
|
+
{
|
|
7842
7871
|
const styleStep = getCurrentStep("code_style");
|
|
7843
|
-
showStep(currentStepNum, styleStep
|
|
7872
|
+
showStep(currentStepNum, styleStep);
|
|
7844
7873
|
const namingResponse = await prompts3({
|
|
7845
7874
|
type: "select",
|
|
7846
7875
|
name: "naming",
|
|
@@ -8022,7 +8051,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8022
8051
|
answers.styleNotes = styleNotesResponse.styleNotes || "";
|
|
8023
8052
|
}
|
|
8024
8053
|
const aiStep = getCurrentStep("ai");
|
|
8025
|
-
showStep(currentStepNum, aiStep
|
|
8054
|
+
showStep(currentStepNum, aiStep);
|
|
8026
8055
|
const aiBehaviorResponse = await prompts3({
|
|
8027
8056
|
type: "autocompleteMultiselect",
|
|
8028
8057
|
name: "aiBehavior",
|
|
@@ -8326,9 +8355,9 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8326
8355
|
console.log(chalk7.gray(" \u{1F512} Profile inclusion requires sign-in. Run ") + chalk7.cyan("lynxp login") + chalk7.gray(" to enable."));
|
|
8327
8356
|
answers.includePersonalData = false;
|
|
8328
8357
|
}
|
|
8329
|
-
|
|
8358
|
+
{
|
|
8330
8359
|
const boundariesStep = getCurrentStep("boundaries");
|
|
8331
|
-
showStep(currentStepNum, boundariesStep
|
|
8360
|
+
showStep(currentStepNum, boundariesStep);
|
|
8332
8361
|
console.log(chalk7.gray(" Define what AI should never do, ask first, or always do."));
|
|
8333
8362
|
console.log(chalk7.gray(" Each option can only be in one category. Select 'Other' to add custom."));
|
|
8334
8363
|
console.log();
|
|
@@ -8438,12 +8467,10 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8438
8467
|
if (neverList.length > 0) {
|
|
8439
8468
|
console.log(chalk7.red(` \u2717 Never: ${neverList.join(", ")}`));
|
|
8440
8469
|
}
|
|
8441
|
-
} else {
|
|
8442
|
-
answers.boundaries = options.boundaries || "standard";
|
|
8443
8470
|
}
|
|
8444
|
-
|
|
8471
|
+
{
|
|
8445
8472
|
const testingStep = getCurrentStep("testing");
|
|
8446
|
-
showStep(currentStepNum, testingStep
|
|
8473
|
+
showStep(currentStepNum, testingStep);
|
|
8447
8474
|
const testLevelsResponse = await prompts3({
|
|
8448
8475
|
type: "autocompleteMultiselect",
|
|
8449
8476
|
name: "testLevels",
|
|
@@ -8524,9 +8551,9 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8524
8551
|
}, promptConfig);
|
|
8525
8552
|
answers.testNotes = testNotesResponse.testNotes || "";
|
|
8526
8553
|
}
|
|
8527
|
-
|
|
8554
|
+
{
|
|
8528
8555
|
const staticStep = getCurrentStep("static");
|
|
8529
|
-
showStep(currentStepNum, staticStep
|
|
8556
|
+
showStep(currentStepNum, staticStep);
|
|
8530
8557
|
let skipStaticFiles = false;
|
|
8531
8558
|
if (detected) {
|
|
8532
8559
|
console.log(chalk7.gray(" Since you're working with an existing repository, you may already have these files."));
|
|
@@ -8606,7 +8633,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8606
8633
|
console.log();
|
|
8607
8634
|
console.log(chalk7.cyan(" \u{1F4DD} Customize file contents:"));
|
|
8608
8635
|
console.log(chalk7.gray(" For each file, choose to use existing content, write new, or use defaults."));
|
|
8609
|
-
if (
|
|
8636
|
+
if (true) {
|
|
8610
8637
|
console.log(chalk7.magenta(` \u2728 Tip: Type 'ai:' followed by your request to use AI assistance`));
|
|
8611
8638
|
}
|
|
8612
8639
|
console.log();
|
|
@@ -8654,7 +8681,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8654
8681
|
}, promptConfig);
|
|
8655
8682
|
if (actionResponse.action === "new") {
|
|
8656
8683
|
console.log();
|
|
8657
|
-
if (
|
|
8684
|
+
if (true) {
|
|
8658
8685
|
const aiPromptResponse = await prompts3({
|
|
8659
8686
|
type: "text",
|
|
8660
8687
|
name: "input",
|
|
@@ -8700,9 +8727,9 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
8700
8727
|
}
|
|
8701
8728
|
}
|
|
8702
8729
|
const extraStep = getCurrentStep("extra");
|
|
8703
|
-
showStep(currentStepNum, extraStep
|
|
8730
|
+
showStep(currentStepNum, extraStep);
|
|
8704
8731
|
answers.persona = "";
|
|
8705
|
-
const hasAIAccess =
|
|
8732
|
+
const hasAIAccess = true;
|
|
8706
8733
|
if (hasAIAccess) {
|
|
8707
8734
|
console.log();
|
|
8708
8735
|
console.log(chalk7.magenta(" \u2728 AI Assistant available"));
|
|
@@ -10156,18 +10183,45 @@ var SOURCE_FILES = {
|
|
|
10156
10183
|
".aider.conf.yml": "aider"
|
|
10157
10184
|
};
|
|
10158
10185
|
var TARGET_FILES = {
|
|
10186
|
+
// Popular platforms
|
|
10187
|
+
universal: "AGENTS.md",
|
|
10159
10188
|
agents: "AGENTS.md",
|
|
10160
|
-
claude: "CLAUDE.md",
|
|
10161
10189
|
cursor: ".cursor/rules/project.mdc",
|
|
10162
10190
|
cursor_legacy: ".cursorrules",
|
|
10191
|
+
claude: "CLAUDE.md",
|
|
10163
10192
|
copilot: ".github/copilot-instructions.md",
|
|
10164
10193
|
windsurf: ".windsurfrules",
|
|
10194
|
+
// AI-powered IDEs
|
|
10195
|
+
antigravity: "GEMINI.md",
|
|
10196
|
+
zed: ".zed/instructions.md",
|
|
10197
|
+
void: ".void/config.json",
|
|
10198
|
+
trae: ".trae/rules/project.mdc",
|
|
10199
|
+
firebase: ".idx/rules/project.mdc",
|
|
10200
|
+
// Editor extensions
|
|
10165
10201
|
cline: ".clinerules",
|
|
10202
|
+
roocode: ".roo/rules/project.mdc",
|
|
10203
|
+
continue: ".continue/config.json",
|
|
10204
|
+
cody: ".cody/config.json",
|
|
10205
|
+
tabnine: ".tabnine.yaml",
|
|
10206
|
+
supermaven: ".supermaven/config.json",
|
|
10207
|
+
codegpt: ".codegpt/config.json",
|
|
10208
|
+
amazonq: ".amazonq/rules/project.md",
|
|
10209
|
+
augment: ".augment/rules/project.mdc",
|
|
10210
|
+
kilocode: ".kilocode/rules/project.mdc",
|
|
10211
|
+
junie: ".junie/guidelines.md",
|
|
10212
|
+
kiro: ".kiro/steering/project.mdc",
|
|
10213
|
+
// CLI tools
|
|
10166
10214
|
aider: ".aider.conf.yml",
|
|
10215
|
+
goose: ".goosehints",
|
|
10216
|
+
warp: "WARP.md",
|
|
10217
|
+
"gemini-cli": "GEMINI.md",
|
|
10218
|
+
opencode: "opencode.json",
|
|
10167
10219
|
codex: "codex.md",
|
|
10168
|
-
|
|
10169
|
-
|
|
10170
|
-
|
|
10220
|
+
// Other emerging tools
|
|
10221
|
+
openhands: ".openhands/microagents/repo.md",
|
|
10222
|
+
crush: "CRUSH.md",
|
|
10223
|
+
firebender: "firebender.json",
|
|
10224
|
+
// Command targets
|
|
10171
10225
|
"cursor-command": ".cursor/commands/command.md",
|
|
10172
10226
|
"claude-command": ".claude/commands/command.md",
|
|
10173
10227
|
"windsurf-workflow": ".windsurf/workflows/workflow.md",
|
|
@@ -10176,18 +10230,39 @@ var TARGET_FILES = {
|
|
|
10176
10230
|
"opencode-command": ".opencode/commands/command.md"
|
|
10177
10231
|
};
|
|
10178
10232
|
var PLATFORM_NAMES = {
|
|
10233
|
+
universal: "AGENTS.md (Universal)",
|
|
10179
10234
|
agents: "AGENTS.md (Universal)",
|
|
10180
|
-
claude: "CLAUDE.md",
|
|
10181
10235
|
cursor: "Cursor Rules (.mdc)",
|
|
10182
10236
|
cursor_legacy: "Cursor Rules (legacy)",
|
|
10237
|
+
claude: "CLAUDE.md",
|
|
10183
10238
|
copilot: "GitHub Copilot",
|
|
10184
|
-
windsurf: "Windsurf
|
|
10185
|
-
|
|
10186
|
-
|
|
10187
|
-
|
|
10239
|
+
windsurf: "Windsurf",
|
|
10240
|
+
antigravity: "Antigravity (Gemini IDE)",
|
|
10241
|
+
zed: "Zed",
|
|
10242
|
+
void: "Void",
|
|
10243
|
+
trae: "Trae AI",
|
|
10244
|
+
firebase: "Firebase Studio",
|
|
10245
|
+
cline: "Cline",
|
|
10246
|
+
roocode: "Roo Code",
|
|
10247
|
+
continue: "Continue",
|
|
10248
|
+
cody: "Sourcegraph Cody",
|
|
10249
|
+
tabnine: "Tabnine",
|
|
10188
10250
|
supermaven: "Supermaven",
|
|
10189
|
-
|
|
10190
|
-
|
|
10251
|
+
codegpt: "CodeGPT",
|
|
10252
|
+
amazonq: "Amazon Q",
|
|
10253
|
+
augment: "Augment Code",
|
|
10254
|
+
kilocode: "Kilo Code",
|
|
10255
|
+
junie: "Junie",
|
|
10256
|
+
kiro: "Kiro",
|
|
10257
|
+
aider: "Aider",
|
|
10258
|
+
goose: "Goose",
|
|
10259
|
+
warp: "Warp AI",
|
|
10260
|
+
"gemini-cli": "Gemini CLI",
|
|
10261
|
+
opencode: "OpenCode",
|
|
10262
|
+
codex: "Codex",
|
|
10263
|
+
openhands: "OpenHands",
|
|
10264
|
+
crush: "Crush",
|
|
10265
|
+
firebender: "Firebender",
|
|
10191
10266
|
"cursor-command": "Cursor Command",
|
|
10192
10267
|
"claude-command": "Claude Code Command",
|
|
10193
10268
|
"windsurf-workflow": "Windsurf Workflow",
|
|
@@ -10268,6 +10343,20 @@ ${rawContent.replace(/^#\s+.*$/m, "# AI Assistant Configuration")}
|
|
|
10268
10343
|
case "cline":
|
|
10269
10344
|
case "goose":
|
|
10270
10345
|
return rawContent.replace(/^#\s+/gm, "=== ").replace(/^##\s+/gm, "--- ").replace(/^###\s+/gm, "").replace(/\*\*/g, "").trim();
|
|
10346
|
+
case "trae":
|
|
10347
|
+
case "roocode":
|
|
10348
|
+
case "augment":
|
|
10349
|
+
case "kilocode":
|
|
10350
|
+
case "kiro":
|
|
10351
|
+
case "firebase":
|
|
10352
|
+
return `---
|
|
10353
|
+
description: "AI coding rules"
|
|
10354
|
+
globs: ["**/*"]
|
|
10355
|
+
alwaysApply: true
|
|
10356
|
+
---
|
|
10357
|
+
|
|
10358
|
+
${rawContent.replace(/^#\s+.*$/m, "# AI Assistant Configuration")}
|
|
10359
|
+
`;
|
|
10271
10360
|
case "aider":
|
|
10272
10361
|
return `# Aider configuration
|
|
10273
10362
|
# Converted from AI IDE configuration
|
|
@@ -10279,15 +10368,37 @@ read: []
|
|
|
10279
10368
|
conventions:
|
|
10280
10369
|
${rawContent.split("\n").filter((line) => line.trim() && !line.startsWith("#")).map((line) => ` - "${line.replace(/"/g, '\\"').trim()}"`).slice(0, 20).join("\n")}
|
|
10281
10370
|
`;
|
|
10371
|
+
case "tabnine":
|
|
10372
|
+
return `# Tabnine configuration
|
|
10373
|
+
# Converted from AI IDE configuration
|
|
10374
|
+
instructions: |
|
|
10375
|
+
${rawContent.split("\n").map((line) => ` ${line}`).join("\n")}
|
|
10376
|
+
`;
|
|
10377
|
+
case "void":
|
|
10378
|
+
case "continue":
|
|
10379
|
+
case "cody":
|
|
10380
|
+
case "codegpt":
|
|
10381
|
+
case "supermaven":
|
|
10382
|
+
case "opencode":
|
|
10383
|
+
case "firebender":
|
|
10384
|
+
return JSON.stringify({ instructions: rawContent }, null, 2) + "\n";
|
|
10282
10385
|
case "copilot":
|
|
10283
10386
|
return `# GitHub Copilot Instructions
|
|
10284
10387
|
|
|
10285
10388
|
${rawContent}
|
|
10286
10389
|
`;
|
|
10287
10390
|
case "agents":
|
|
10391
|
+
case "universal":
|
|
10288
10392
|
case "claude":
|
|
10289
10393
|
case "codex":
|
|
10290
|
-
case "
|
|
10394
|
+
case "antigravity":
|
|
10395
|
+
case "gemini-cli":
|
|
10396
|
+
case "zed":
|
|
10397
|
+
case "amazonq":
|
|
10398
|
+
case "junie":
|
|
10399
|
+
case "warp":
|
|
10400
|
+
case "openhands":
|
|
10401
|
+
case "crush":
|
|
10291
10402
|
default:
|
|
10292
10403
|
return rawContent;
|
|
10293
10404
|
}
|
|
@@ -10332,7 +10443,8 @@ async function convertCommand(source, target, options) {
|
|
|
10332
10443
|
sourcePath = detected.path;
|
|
10333
10444
|
sourcePlatform = detected.platform;
|
|
10334
10445
|
}
|
|
10335
|
-
const
|
|
10446
|
+
const targetLower = target.toLowerCase();
|
|
10447
|
+
const normalizedTarget = TARGET_FILES[targetLower] ? targetLower : targetLower.replace(/-/g, "_");
|
|
10336
10448
|
if (!TARGET_FILES[normalizedTarget]) {
|
|
10337
10449
|
console.log(chalk14.red(` \u2717 Unknown target format: ${target}`));
|
|
10338
10450
|
console.log();
|
|
@@ -11067,7 +11179,7 @@ async function configCommand(action, valueArg) {
|
|
|
11067
11179
|
}
|
|
11068
11180
|
|
|
11069
11181
|
// src/index.ts
|
|
11070
|
-
var CLI_VERSION2 = "2.0.
|
|
11182
|
+
var CLI_VERSION2 = "2.0.7";
|
|
11071
11183
|
var program = new Command();
|
|
11072
11184
|
program.name("lynxprompt").description("CLI for LynxPrompt - Generate AI IDE configuration files").version(CLI_VERSION2);
|
|
11073
11185
|
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);
|