clawtamer 0.5.0 → 0.8.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/clawtamer.js +12 -9
- package/package.json +1 -1
package/bin/clawtamer.js
CHANGED
|
@@ -591,7 +591,6 @@ async function cmdInit(flags) {
|
|
|
591
591
|
const configDir = path.dirname(configPath);
|
|
592
592
|
const apiBase = getApiBase(flags, config);
|
|
593
593
|
logStep(flags, `Using config: ${configPath}`);
|
|
594
|
-
logStep(flags, `Using API base: ${apiBase}`);
|
|
595
594
|
|
|
596
595
|
const existing = config.models?.providers?.clawtamer;
|
|
597
596
|
if (existing && !flags["--yes"]) {
|
|
@@ -606,7 +605,7 @@ async function cmdInit(flags) {
|
|
|
606
605
|
const accountMode = modeFromFlags || (canPromptInteractively() ? await promptAccountMode() : "new");
|
|
607
606
|
const emailPrompt =
|
|
608
607
|
accountMode === "existing"
|
|
609
|
-
? "Please enter your account email (
|
|
608
|
+
? "Please enter your account email (use same email you used to signup): "
|
|
610
609
|
: "Please enter your account email (you will use this to access your dashboard): ";
|
|
611
610
|
const emailInput = flags["--email"] || (await promptValidated(emailPrompt, (value) => {
|
|
612
611
|
try {
|
|
@@ -626,7 +625,7 @@ async function cmdInit(flags) {
|
|
|
626
625
|
let resolvedProxyKey = explicitProxyKey;
|
|
627
626
|
if (!resolvedProxyKey && accountMode === "existing" && canPromptInteractively()) {
|
|
628
627
|
resolvedProxyKey = await promptProxyKey(
|
|
629
|
-
"Please enter your existing Clawtamer API key (sk-cltm-...)
|
|
628
|
+
"Please enter your existing Clawtamer API key (sk-cltm-...) (grab it from https://www.clawtamer.ai/dashboard): "
|
|
630
629
|
);
|
|
631
630
|
}
|
|
632
631
|
if (!resolvedUpstreamKey && canPromptInteractively()) {
|
|
@@ -661,7 +660,7 @@ async function cmdInit(flags) {
|
|
|
661
660
|
if (canPromptInteractively()) {
|
|
662
661
|
console.warn(warn("This email already exists. Switching to existing-user flow."));
|
|
663
662
|
proxyKey = await promptProxyKey(
|
|
664
|
-
"Please enter your existing Clawtamer API key (sk-cltm-...)
|
|
663
|
+
"Please enter your existing Clawtamer API key (sk-cltm-...) (grab it from https://www.clawtamer.ai/dashboard): "
|
|
665
664
|
);
|
|
666
665
|
logStep(flags, "Existing account key captured.");
|
|
667
666
|
} else {
|
|
@@ -686,6 +685,7 @@ async function cmdInit(flags) {
|
|
|
686
685
|
}
|
|
687
686
|
|
|
688
687
|
const dryRun = Boolean(flags["--dry-run"]);
|
|
688
|
+
let showTrackSavingsTips = false;
|
|
689
689
|
|
|
690
690
|
if (resolvedUpstreamKey && !dryRun) {
|
|
691
691
|
const store = await storeUpstreamKey(apiBase, proxyKey, resolvedUpstreamKey);
|
|
@@ -818,10 +818,7 @@ async function cmdInit(flags) {
|
|
|
818
818
|
console.log("");
|
|
819
819
|
console.log("Clawtamer is installed and now routing your requests.");
|
|
820
820
|
console.log("Clawtamer will automatically route requests and reduce API cost.");
|
|
821
|
-
|
|
822
|
-
console.log("Track savings anytime:");
|
|
823
|
-
console.log("- npx clawtamer savings");
|
|
824
|
-
console.log("- Dashboard: https://www.clawtamer.ai/dashboard");
|
|
821
|
+
showTrackSavingsTips = true;
|
|
825
822
|
}
|
|
826
823
|
}
|
|
827
824
|
|
|
@@ -854,7 +851,13 @@ async function cmdInit(flags) {
|
|
|
854
851
|
console.warn("Update those agent configs to clawtamer/auto (or remove agent-level primary) to enforce proxy routing.");
|
|
855
852
|
}
|
|
856
853
|
console.log("");
|
|
857
|
-
console.log(success("Enjoy your savings with Clawtamer!"));
|
|
854
|
+
console.log(bold(success("Enjoy your savings with Clawtamer!")));
|
|
855
|
+
if (showTrackSavingsTips) {
|
|
856
|
+
console.log("");
|
|
857
|
+
console.log("Track savings anytime:");
|
|
858
|
+
console.log("- npx clawtamer savings");
|
|
859
|
+
console.log("- Dashboard: https://www.clawtamer.ai/dashboard");
|
|
860
|
+
}
|
|
858
861
|
}
|
|
859
862
|
|
|
860
863
|
async function resolveProxyKey(flags, configDir, config) {
|