@howlil/ez-agents 3.0.0 → 3.1.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/bin/install.js +62 -19
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -299,7 +299,7 @@ if (hasUninstall) {
|
|
|
299
299
|
|
|
300
300
|
// Show help if requested
|
|
301
301
|
if (hasHelp) {
|
|
302
|
-
console.log(` ${yellow}Usage:${reset} npx ez-agents [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--copilot${reset} Install for Copilot only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}-u, --uninstall${reset} Uninstall EZ_Agents (remove all EZ_Agents files)\n ${cyan}-c, --config-dir <path>${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx ez-agents\n\n ${dim}# Install for Claude Code globally${reset}\n npx ez-agents --claude --global\n\n ${dim}# Install for all runtimes globally${reset}\n npx ez-agents --all --global\n\n ${dim}# Uninstall EZ_Agents globally${reset}\n npx ez-agents --all --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR / CODEX_HOME / COPILOT_CONFIG_DIR environment variables.\n`);
|
|
302
|
+
console.log(` ${yellow}Usage:${reset} npx ez-agents [options]\n\n ${yellow}Options:${reset}\n ${cyan}-g, --global${reset} Install globally (to config directory)\n ${cyan}-l, --local${reset} Install locally (to current directory)\n ${cyan}--claude${reset} Install for Claude Code only\n ${cyan}--opencode${reset} Install for OpenCode only\n ${cyan}--gemini${reset} Install for Gemini only\n ${cyan}--codex${reset} Install for Codex only\n ${cyan}--copilot${reset} Install for Copilot only\n ${cyan}--all${reset} Install for all runtimes\n ${cyan}-u, --uninstall${reset} Uninstall EZ_Agents (remove all EZ_Agents files)\n ${cyan}-c, --config-dir <path>${reset} Specify custom config directory\n ${cyan}-h, --help${reset} Show this help message\n ${cyan}--force-statusline${reset} Replace existing statusline config\n\n ${yellow}Examples:${reset}\n ${dim}# Interactive install (prompts for runtime and location)${reset}\n npx ez-agents\n\n ${dim}# Install for Claude Code globally${reset}\n npx ez-agents --claude --global\n\n ${dim}# Install for all runtimes globally${reset}\n npx ez-agents --all --global\n\n ${dim}# Uninstall EZ_Agents globally${reset}\n npx ez-agents --all --global --uninstall\n\n ${yellow}Notes:${reset}\n The --config-dir option is useful when you have multiple configurations.\n It takes priority over CLAUDE_CONFIG_DIR / GEMINI_CONFIG_DIR / CODEX_HOME / COPILOT_CONFIG_DIR environment variables.\n\n ${yellow}Model Providers:${reset}\n Qwen, Kimi, OpenAI, and Anthropic are model providers configured in settings.json,\n not separate CLI runtimes. See README.md for model configuration.\n`);
|
|
303
303
|
process.exit(0);
|
|
304
304
|
}
|
|
305
305
|
|
|
@@ -2687,7 +2687,10 @@ function promptRuntime(callback) {
|
|
|
2687
2687
|
${cyan}3${reset}) Gemini ${dim}(~/.gemini)${reset}
|
|
2688
2688
|
${cyan}4${reset}) Codex ${dim}(~/.codex)${reset}
|
|
2689
2689
|
${cyan}5${reset}) Copilot ${dim}(~/.copilot)${reset}
|
|
2690
|
-
${cyan}6${reset}) All
|
|
2690
|
+
${cyan}6${reset}) All ${dim}(all 5 runtimes above)${reset}
|
|
2691
|
+
|
|
2692
|
+
${dim}Note: Qwen, Kimi, and OpenAI are model providers configured within each runtime's settings,
|
|
2693
|
+
not separate CLI runtimes. See README.md for model configuration.${reset}
|
|
2691
2694
|
`);
|
|
2692
2695
|
|
|
2693
2696
|
rl.question(` Choice ${dim}[1]${reset}: `, (answer) => {
|
|
@@ -2767,26 +2770,66 @@ function installAllRuntimes(runtimes, isGlobal, isInteractive) {
|
|
|
2767
2770
|
}
|
|
2768
2771
|
|
|
2769
2772
|
const statuslineRuntimes = ['claude', 'gemini'];
|
|
2770
|
-
const
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2773
|
+
const statuslineResults = results.filter(r => statuslineRuntimes.includes(r.runtime));
|
|
2774
|
+
|
|
2775
|
+
// Handle statusline per-runtime to avoid conflicts
|
|
2776
|
+
// Each runtime with settings.json gets its own statusline prompt
|
|
2777
|
+
const finalizePerRuntime = (runtimeResult, shouldInstallStatusline) => {
|
|
2778
|
+
const useStatusline = statuslineRuntimes.includes(runtimeResult.runtime) && shouldInstallStatusline;
|
|
2779
|
+
finishInstall(
|
|
2780
|
+
runtimeResult.settingsPath,
|
|
2781
|
+
runtimeResult.settings,
|
|
2782
|
+
runtimeResult.statuslineCommand,
|
|
2783
|
+
useStatusline,
|
|
2784
|
+
runtimeResult.runtime,
|
|
2785
|
+
isGlobal
|
|
2786
|
+
);
|
|
2784
2787
|
};
|
|
2785
2788
|
|
|
2786
|
-
if (
|
|
2787
|
-
|
|
2789
|
+
if (statuslineResults.length === 0) {
|
|
2790
|
+
// No runtimes support statusline - finalize all without statusline
|
|
2791
|
+
for (const result of results) {
|
|
2792
|
+
finalizePerRuntime(result, false);
|
|
2793
|
+
}
|
|
2794
|
+
} else if (statuslineResults.length === 1) {
|
|
2795
|
+
// Single runtime with statusline support - prompt once
|
|
2796
|
+
const singleResult = statuslineResults[0];
|
|
2797
|
+
handleStatusline(singleResult.settings, isInteractive, (shouldInstall) => {
|
|
2798
|
+
finalizePerRuntime(singleResult, shouldInstall);
|
|
2799
|
+
// Finalize other runtimes without statusline
|
|
2800
|
+
for (const result of results) {
|
|
2801
|
+
if (!statuslineRuntimes.includes(result.runtime)) {
|
|
2802
|
+
finalizePerRuntime(result, false);
|
|
2803
|
+
}
|
|
2804
|
+
}
|
|
2805
|
+
});
|
|
2788
2806
|
} else {
|
|
2789
|
-
|
|
2807
|
+
// Multiple runtimes with statusline support - prompt for each
|
|
2808
|
+
let currentIndex = 0;
|
|
2809
|
+
const statuslineChoices = new Array(statuslineResults.length).fill(false);
|
|
2810
|
+
|
|
2811
|
+
const promptNextStatusline = () => {
|
|
2812
|
+
if (currentIndex >= statuslineResults.length) {
|
|
2813
|
+
// All statusline prompts done - finalize all runtimes
|
|
2814
|
+
for (let i = 0; i < results.length; i++) {
|
|
2815
|
+
const result = results[i];
|
|
2816
|
+
const statuslineIndex = statuslineResults.findIndex(r => r.runtime === result.runtime);
|
|
2817
|
+
const shouldInstall = statuslineIndex !== -1 ? statuslineChoices[statuslineIndex] : false;
|
|
2818
|
+
finalizePerRuntime(result, shouldInstall);
|
|
2819
|
+
}
|
|
2820
|
+
return;
|
|
2821
|
+
}
|
|
2822
|
+
|
|
2823
|
+
const currentResult = statuslineResults[currentIndex];
|
|
2824
|
+
const currentRuntimeIndex = currentIndex;
|
|
2825
|
+
handleStatusline(currentResult.settings, isInteractive, (shouldInstall) => {
|
|
2826
|
+
statuslineChoices[currentRuntimeIndex] = shouldInstall;
|
|
2827
|
+
currentIndex++;
|
|
2828
|
+
promptNextStatusline();
|
|
2829
|
+
});
|
|
2830
|
+
};
|
|
2831
|
+
|
|
2832
|
+
promptNextStatusline();
|
|
2790
2833
|
}
|
|
2791
2834
|
}
|
|
2792
2835
|
|