lynxprompt 0.7.1 → 1.0.0
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 +61 -43
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -353,16 +353,9 @@ function displayWelcome(user) {
|
|
|
353
353
|
console.log(chalk.green(" \u2713") + " " + chalk.white("lynxprompt link") + chalk.gray(" - Link project to blueprint"));
|
|
354
354
|
console.log(chalk.green(" \u2713") + " " + chalk.white("lynxprompt sync") + chalk.gray(" - Sync linked blueprints"));
|
|
355
355
|
console.log(chalk.green(" \u2713") + " " + chalk.white("lynxprompt diff") + chalk.gray(" - Compare local vs remote"));
|
|
356
|
-
if (plan === "PRO" || plan === "MAX" || plan === "TEAMS") {
|
|
357
|
-
console.log();
|
|
358
|
-
console.log(chalk.cyan(" \u26A1") + " " + chalk.white("Advanced wizards") + chalk.gray(" - More customization options"));
|
|
359
|
-
console.log(chalk.cyan(" \u26A1") + " " + chalk.white("Sell blueprints") + chalk.gray(" - Monetize your configurations"));
|
|
360
|
-
}
|
|
361
|
-
if (plan === "MAX" || plan === "TEAMS") {
|
|
362
|
-
console.log(chalk.magenta(" \u{1F680}") + " " + chalk.white("All paid blueprints") + chalk.gray(" - Access premium content"));
|
|
363
|
-
console.log(chalk.magenta(" \u{1F680}") + " " + chalk.white("Priority support") + chalk.gray(" - Get help faster"));
|
|
364
|
-
}
|
|
365
356
|
if (plan === "TEAMS") {
|
|
357
|
+
console.log();
|
|
358
|
+
console.log(chalk.cyan(" \u26A1") + " " + chalk.white("AI-powered editing") + chalk.gray(" - AI assistant for configs"));
|
|
366
359
|
console.log(chalk.yellow(" \u{1F465}") + " " + chalk.white("Team blueprints") + chalk.gray(" - Share with your team"));
|
|
367
360
|
console.log(chalk.yellow(" \u{1F465}") + " " + chalk.white("SSO integration") + chalk.gray(" - Enterprise authentication"));
|
|
368
361
|
}
|
|
@@ -2188,18 +2181,34 @@ function generateFileContent(options, platform2) {
|
|
|
2188
2181
|
if (options.enableAutoUpdate && options.blueprintId && (isMarkdown || isMdc)) {
|
|
2189
2182
|
const bpId = options.blueprintId.startsWith("bp_") ? options.blueprintId : `bp_${options.blueprintId}`;
|
|
2190
2183
|
const fileName = platform2 === "cursor" ? ".cursor/rules/agents.mdc" : "AGENTS.md";
|
|
2191
|
-
const
|
|
2184
|
+
const osList = Array.isArray(options.devOS) ? options.devOS : [options.devOS || "linux"];
|
|
2185
|
+
const hasWindows = osList.includes("windows");
|
|
2186
|
+
const hasUnix = osList.some((os2) => ["linux", "macos", "wsl"].includes(os2));
|
|
2187
|
+
const isMultiPlatform = hasWindows && hasUnix || osList.length > 1;
|
|
2192
2188
|
sections.push("<!--");
|
|
2193
2189
|
sections.push("This file is synced with LynxPrompt. To update it via API:");
|
|
2194
2190
|
sections.push("");
|
|
2195
|
-
if (
|
|
2191
|
+
if (isMultiPlatform) {
|
|
2192
|
+
sections.push("# Bash (Linux/macOS/WSL)");
|
|
2193
|
+
sections.push(`curl -X PUT "https://lynxprompt.com/api/v1/blueprints/${bpId}" \\`);
|
|
2194
|
+
sections.push(' -H "Authorization: Bearer $LYNXPROMPT_API_TOKEN" \\');
|
|
2195
|
+
sections.push(' -H "Content-Type: application/json" \\');
|
|
2196
|
+
sections.push(` -d "{\\"content\\": \\"$(cat ${fileName} | jq -Rs .)\\"}"`);
|
|
2197
|
+
sections.push("");
|
|
2196
2198
|
sections.push("# PowerShell (Windows)");
|
|
2197
2199
|
sections.push(`$content = (Get-Content "${fileName}" -Raw) -replace '"', '\\"'`);
|
|
2198
2200
|
sections.push(`$body = @{ content = $content } | ConvertTo-Json`);
|
|
2199
2201
|
sections.push(`Invoke-RestMethod -Uri "https://lynxprompt.com/api/v1/blueprints/${bpId}" \``);
|
|
2200
2202
|
sections.push(' -Method PUT -Headers @{ "Authorization" = "Bearer $env:LYNXPROMPT_API_TOKEN" } `');
|
|
2201
2203
|
sections.push(' -ContentType "application/json" -Body $body');
|
|
2202
|
-
} else if (
|
|
2204
|
+
} else if (hasWindows) {
|
|
2205
|
+
sections.push("# PowerShell (Windows)");
|
|
2206
|
+
sections.push(`$content = (Get-Content "${fileName}" -Raw) -replace '"', '\\"'`);
|
|
2207
|
+
sections.push(`$body = @{ content = $content } | ConvertTo-Json`);
|
|
2208
|
+
sections.push(`Invoke-RestMethod -Uri "https://lynxprompt.com/api/v1/blueprints/${bpId}" \``);
|
|
2209
|
+
sections.push(' -Method PUT -Headers @{ "Authorization" = "Bearer $env:LYNXPROMPT_API_TOKEN" } `');
|
|
2210
|
+
sections.push(' -ContentType "application/json" -Body $body');
|
|
2211
|
+
} else if (hasUnix) {
|
|
2203
2212
|
sections.push("# Bash (Linux/macOS/WSL)");
|
|
2204
2213
|
sections.push(`curl -X PUT "https://lynxprompt.com/api/v1/blueprints/${bpId}" \\`);
|
|
2205
2214
|
sections.push(' -H "Authorization: Bearer $LYNXPROMPT_API_TOKEN" \\');
|
|
@@ -2935,23 +2944,41 @@ var WIZARD_STEPS = [
|
|
|
2935
2944
|
{ id: "extra", title: "Final Details", icon: "\u{1F4AC}", tier: "basic" }
|
|
2936
2945
|
];
|
|
2937
2946
|
var ALL_PLATFORMS = [
|
|
2938
|
-
|
|
2939
|
-
{ id: "
|
|
2940
|
-
{ id: "
|
|
2941
|
-
{ id: "
|
|
2942
|
-
{ id: "
|
|
2943
|
-
{ id: "
|
|
2944
|
-
|
|
2945
|
-
{ id: "
|
|
2946
|
-
{ id: "
|
|
2947
|
-
{ id: "
|
|
2948
|
-
{ id: "
|
|
2949
|
-
{ id: "
|
|
2947
|
+
// Popular platforms
|
|
2948
|
+
{ id: "universal", name: "Universal (AGENTS.md)", file: "AGENTS.md", icon: "\u{1F310}", note: "Works with Claude Code, Copilot, Aider, and many others" },
|
|
2949
|
+
{ id: "cursor", name: "Cursor", file: ".cursor/rules/", icon: "\u26A1", note: "AI-powered code editor with native rules" },
|
|
2950
|
+
{ id: "claude", name: "Claude Code", file: "CLAUDE.md", icon: "\u{1F9E0}", note: "Anthropic's agentic coding tool" },
|
|
2951
|
+
{ id: "copilot", name: "GitHub Copilot", file: ".github/copilot-instructions.md", icon: "\u{1F419}", note: "GitHub's AI pair programmer" },
|
|
2952
|
+
{ id: "windsurf", name: "Windsurf", file: ".windsurfrules", icon: "\u{1F3C4}", note: "Codeium's AI-native IDE" },
|
|
2953
|
+
// AI IDEs
|
|
2954
|
+
{ id: "antigravity", name: "Antigravity", file: "GEMINI.md", icon: "\u{1F48E}", note: "Google's Gemini-powered IDE" },
|
|
2955
|
+
{ id: "zed", name: "Zed", file: ".zed/instructions.md", icon: "\u26A1", note: "High-performance editor with AI" },
|
|
2956
|
+
{ id: "void", name: "Void", file: ".void/config.json", icon: "\u{1F573}\uFE0F", note: "Open-source Cursor alternative" },
|
|
2957
|
+
{ id: "trae", name: "Trae AI", file: ".trae/rules/", icon: "\u{1F537}", note: "ByteDance's AI IDE" },
|
|
2958
|
+
{ id: "firebase", name: "Firebase Studio", file: ".idx/", icon: "\u{1F525}", note: "Google's cloud IDE" },
|
|
2959
|
+
// Editor extensions
|
|
2960
|
+
{ id: "cline", name: "Cline", file: ".clinerules", icon: "\u{1F527}", note: "Autonomous coding agent for VS Code" },
|
|
2961
|
+
{ id: "roocode", name: "Roo Code", file: ".roo/rules/", icon: "\u{1F998}", note: "AI coding assistant for VS Code" },
|
|
2962
|
+
{ id: "continue", name: "Continue", file: ".continue/config.json", icon: "\u27A1\uFE0F", note: "Open-source AI autopilot" },
|
|
2963
|
+
{ id: "cody", name: "Sourcegraph Cody", file: ".cody/config.json", icon: "\u{1F50D}", note: "Context-aware AI assistant" },
|
|
2950
2964
|
{ id: "tabnine", name: "Tabnine", file: ".tabnine.yaml", icon: "\u{1F4DD}", note: "AI code completion" },
|
|
2951
|
-
{ id: "supermaven", name: "Supermaven", file: ".supermaven/config.json", icon: "\u{1F9B8}", note: "Fast AI completions" },
|
|
2965
|
+
{ id: "supermaven", name: "Supermaven", file: ".supermaven/config.json", icon: "\u{1F9B8}", note: "Fast AI code completions" },
|
|
2952
2966
|
{ id: "codegpt", name: "CodeGPT", file: ".codegpt/config.json", icon: "\u{1F4AC}", note: "VS Code AI assistant" },
|
|
2953
|
-
{ id: "
|
|
2954
|
-
{ id: "
|
|
2967
|
+
{ id: "amazonq", name: "Amazon Q", file: ".amazonq/rules/", icon: "\u{1F4E6}", note: "AWS AI coding companion" },
|
|
2968
|
+
{ id: "augment", name: "Augment Code", file: ".augment/rules/", icon: "\u{1F52E}", note: "AI code augmentation" },
|
|
2969
|
+
{ id: "kilocode", name: "Kilo Code", file: ".kilocode/rules/", icon: "\u{1F4CA}", note: "AI code generation" },
|
|
2970
|
+
{ id: "junie", name: "Junie", file: ".junie/guidelines.md", icon: "\u{1F3AF}", note: "JetBrains AI assistant" },
|
|
2971
|
+
{ id: "kiro", name: "Kiro", file: ".kiro/steering/", icon: "\u{1F680}", note: "AWS spec-driven agent" },
|
|
2972
|
+
// CLI tools
|
|
2973
|
+
{ id: "aider", name: "Aider", file: "AIDER.md", icon: "\u{1F916}", note: "AI pair programming in terminal" },
|
|
2974
|
+
{ id: "goose", name: "Goose", file: ".goosehints", icon: "\u{1FABF}", note: "Block's AI coding agent" },
|
|
2975
|
+
{ id: "warp", name: "Warp AI", file: "WARP.md", icon: "\u{1F680}", note: "AI-powered terminal" },
|
|
2976
|
+
{ id: "gemini-cli", name: "Gemini CLI", file: "GEMINI.md", icon: "\u{1F48E}", note: "Google's Gemini in terminal" },
|
|
2977
|
+
{ id: "opencode", name: "Open Code", file: "opencode.json", icon: "\u{1F513}", note: "Open-source AI coding" },
|
|
2978
|
+
// Other
|
|
2979
|
+
{ id: "openhands", name: "OpenHands", file: ".openhands/microagents/repo.md", icon: "\u{1F932}", note: "Open-source AI agent" },
|
|
2980
|
+
{ id: "crush", name: "Crush", file: "CRUSH.md", icon: "\u{1F4A5}", note: "AI coding assistant" },
|
|
2981
|
+
{ id: "firebender", name: "Firebender", file: "firebender.json", icon: "\u{1F525}", note: "AI code transformation" }
|
|
2955
2982
|
];
|
|
2956
2983
|
var LANGUAGES = [
|
|
2957
2984
|
{ title: "\u{1F537} TypeScript", value: "typescript" },
|
|
@@ -3562,10 +3589,8 @@ var ARCHITECTURE_PATTERNS = [
|
|
|
3562
3589
|
{ id: "modular", label: "Modular monolith" },
|
|
3563
3590
|
{ id: "other", label: "Other" }
|
|
3564
3591
|
];
|
|
3565
|
-
function canAccessTier(
|
|
3566
|
-
|
|
3567
|
-
const requiredLevels = { basic: 0, intermediate: 1, advanced: 2 };
|
|
3568
|
-
return tierLevels[userTier] >= requiredLevels[requiredTier];
|
|
3592
|
+
function canAccessTier(_userTier, _requiredTier) {
|
|
3593
|
+
return true;
|
|
3569
3594
|
}
|
|
3570
3595
|
function sortSelectedFirst(choices) {
|
|
3571
3596
|
return [...choices].sort((a, b) => {
|
|
@@ -3575,7 +3600,7 @@ function sortSelectedFirst(choices) {
|
|
|
3575
3600
|
});
|
|
3576
3601
|
}
|
|
3577
3602
|
function canAccessAI(userTier) {
|
|
3578
|
-
return userTier === "
|
|
3603
|
+
return userTier === "teams";
|
|
3579
3604
|
}
|
|
3580
3605
|
async function aiAssist(instruction, existingContent) {
|
|
3581
3606
|
const spinner = ora6("AI is thinking...").start();
|
|
@@ -3590,7 +3615,7 @@ async function aiAssist(instruction, existingContent) {
|
|
|
3590
3615
|
} catch (error) {
|
|
3591
3616
|
if (error instanceof ApiRequestError) {
|
|
3592
3617
|
if (error.statusCode === 403) {
|
|
3593
|
-
spinner.fail("AI editing requires
|
|
3618
|
+
spinner.fail("AI editing requires Teams subscription");
|
|
3594
3619
|
} else if (error.statusCode === 429) {
|
|
3595
3620
|
spinner.fail("Rate limit reached. Please wait a moment.");
|
|
3596
3621
|
} else {
|
|
@@ -3602,15 +3627,8 @@ async function aiAssist(instruction, existingContent) {
|
|
|
3602
3627
|
return null;
|
|
3603
3628
|
}
|
|
3604
3629
|
}
|
|
3605
|
-
function getTierBadge(
|
|
3606
|
-
|
|
3607
|
-
case "intermediate":
|
|
3608
|
-
return { label: "PRO", color: chalk7.cyan };
|
|
3609
|
-
case "advanced":
|
|
3610
|
-
return { label: "MAX", color: chalk7.magenta };
|
|
3611
|
-
default:
|
|
3612
|
-
return null;
|
|
3613
|
-
}
|
|
3630
|
+
function getTierBadge(_tier) {
|
|
3631
|
+
return null;
|
|
3614
3632
|
}
|
|
3615
3633
|
function getAvailableSteps(userTier) {
|
|
3616
3634
|
return WIZARD_STEPS.filter((step) => canAccessTier(userTier, step.tier));
|
|
@@ -5141,7 +5159,7 @@ async function runInteractiveWizard(options, detected, userTier) {
|
|
|
5141
5159
|
commands: typeof answers.commands === "object" ? answers.commands : detected?.commands || {},
|
|
5142
5160
|
// Blueprint mode
|
|
5143
5161
|
blueprintMode: answers.blueprintMode,
|
|
5144
|
-
// Extended config for
|
|
5162
|
+
// Extended config for all users
|
|
5145
5163
|
projectType: answers.projectType,
|
|
5146
5164
|
devOS: answers.devOS,
|
|
5147
5165
|
architecture: answers.architecture,
|