@holdyourvoice/hyv 2.9.4 → 2.9.6

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/index.js +121 -118
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  All notable CLI changes. Also mirrored to [holdyourvoice.com/changelog](https://holdyourvoice.com/changelog) for user-facing releases.
4
4
 
5
+ ## [2.9.5] — 2026-06-12
6
+
7
+ ### Fixed
8
+ - Post-signup browser opens `/app/billing` (live dashboard) instead of `/dashboard` (404)
9
+ - Worker redirects `/dashboard` → `/app` for old links
10
+
5
11
  ## [2.9.4] — 2026-06-12
6
12
 
7
13
  ### Fixed
package/dist/index.js CHANGED
@@ -4632,7 +4632,7 @@ function cliApiUrl(apiPath) {
4632
4632
  const p = apiPath.startsWith("/") ? apiPath : `/${apiPath}`;
4633
4633
  return `${API_BASE}${p}`;
4634
4634
  }
4635
- function assertSafeOpenUrl2(url) {
4635
+ function assertSafeOpenUrl(url) {
4636
4636
  let parsed;
4637
4637
  try {
4638
4638
  parsed = new URL(url);
@@ -5191,6 +5191,91 @@ var require_open = __commonJS({
5191
5191
  }
5192
5192
  });
5193
5193
 
5194
+ // src/lib/free-paid.ts
5195
+ function printFreePaidMatrix(opts = {}) {
5196
+ if (opts.compact) {
5197
+ console.log(import_chalk.default.bold("\nFree forever (local)"));
5198
+ console.log(import_chalk.default.dim(" scan, fix, check, score, diff, mcp, all web tools"));
5199
+ console.log(import_chalk.default.bold("\nPaid power"));
5200
+ console.log(import_chalk.default.dim(" profiles, learning, hybrid analysis, rich rewrites"));
5201
+ console.log(import_chalk.default.dim(` ${PRICING_URL} | hyv plan --upgrade
5202
+ `));
5203
+ return;
5204
+ }
5205
+ console.log(import_chalk.default.bold("\n\u2500\u2500 Free forever (no account) \u2500\u2500\n"));
5206
+ console.log(import_chalk.default.dim("CLI (offline):"));
5207
+ for (const line of FREE_CLI_COMMANDS) {
5208
+ console.log(import_chalk.default.dim(" \u2022 ") + line);
5209
+ }
5210
+ console.log(import_chalk.default.dim("\nTry without installing:"));
5211
+ for (const line of NPX_EXAMPLES) {
5212
+ console.log(import_chalk.default.cyan(` ${line}`));
5213
+ }
5214
+ console.log(import_chalk.default.dim("\nWeb tools (30+ free):"));
5215
+ for (const t of FREE_WEB_TOOLS.slice(0, 8)) {
5216
+ console.log(import_chalk.default.dim(` \u2022 ${t.name}`) + import_chalk.default.cyan(` \u2014 ${t.url}`));
5217
+ }
5218
+ console.log(import_chalk.default.dim(` \u2022 \u2026and more \u2014 ${FREE_WEB_TOOLS[0].url}`));
5219
+ console.log(import_chalk.default.bold("\n\u2500\u2500 Paid unlocks \u2500\u2500\n"));
5220
+ for (const line of PAID_FEATURES) {
5221
+ console.log(import_chalk.default.dim(" \u2022 ") + line);
5222
+ }
5223
+ console.log(import_chalk.default.dim(`
5224
+ First month $1 \u2192 ${PRICING_URL}`));
5225
+ console.log(import_chalk.default.dim(" hyv init | hyv plan --upgrade\n"));
5226
+ }
5227
+ var import_chalk, NPX_EXAMPLES, FREE_CLI_COMMANDS, PAID_FEATURES, FREE_WEB_TOOLS, COMMUNITY_URL, PRICING_URL, DASHBOARD_BILLING_URL;
5228
+ var init_free_paid = __esm({
5229
+ "src/lib/free-paid.ts"() {
5230
+ "use strict";
5231
+ import_chalk = __toESM(require_source());
5232
+ NPX_EXAMPLES = [
5233
+ "npx @holdyourvoice/hyv welcome",
5234
+ "npx @holdyourvoice/hyv scan draft.md",
5235
+ "npx @holdyourvoice/hyv fix draft.md",
5236
+ "npx @holdyourvoice/hyv init",
5237
+ "npx @holdyourvoice/hyv mcp"
5238
+ ];
5239
+ FREE_CLI_COMMANDS = [
5240
+ "hyv scan / fix / check / score / diff / batch / watch",
5241
+ "hyv rules / history / demo / doctor / upgrade",
5242
+ "hyv export (local profile markdown)",
5243
+ "hyv mcp \u2014 agent tools (hyv_scan, hyv_clean, hyv_analyze, \u2026)",
5244
+ "hyv welcome / hyv free \u2014 full capability tour",
5245
+ "hyv content \u2014 blog & share templates",
5246
+ "hyv plan --free \u2014 see what paid unlocks"
5247
+ ];
5248
+ PAID_FEATURES = [
5249
+ "Voice profiles synced from your account (never-list, anchors, learned patterns)",
5250
+ "Learning loop: hyv reinforce, hyv add \u2014 profile gets sharper every week",
5251
+ "Rich profile-aware rewrite prompts (hyv rewrite)",
5252
+ "Hybrid server analysis (hyv scan --server, MCP hyv_analyze)",
5253
+ "Multiple profiles + team voices (Team plan)",
5254
+ "Dashboard at holdyourvoice.com/app"
5255
+ ];
5256
+ FREE_WEB_TOOLS = [
5257
+ { name: "All free tools", url: "https://holdyourvoice.com/tools" },
5258
+ { name: "Headline Analyzer", url: "https://holdyourvoice.com/tools/headline-analyzer" },
5259
+ { name: "Brand Voice Analyzer", url: "https://holdyourvoice.com/tools/brand-voice-analyzer" },
5260
+ { name: "AI Writing Analyzer", url: "https://holdyourvoice.com/tools/ai-writing-analyzer" },
5261
+ { name: "Voice Audit (AI score)", url: "https://holdyourvoice.com/tools/voice-audit" },
5262
+ { name: "Readability Checker", url: "https://holdyourvoice.com/tools/readability-checker" },
5263
+ { name: "Email Subject Scorer", url: "https://holdyourvoice.com/tools/email-subject-scorer" },
5264
+ { name: "Customer Persona Builder", url: "https://holdyourvoice.com/tools/customer-persona-builder" },
5265
+ { name: "Brand Positioning Template", url: "https://holdyourvoice.com/tools/brand-positioning-template" },
5266
+ { name: "Value Proposition Generator", url: "https://holdyourvoice.com/tools/value-proposition-generator" },
5267
+ { name: "Grammar Checker", url: "https://holdyourvoice.com/tools/grammar-checker" },
5268
+ { name: "Paraphrasing Tool", url: "https://holdyourvoice.com/tools/paraphrasing-tool" },
5269
+ { name: "Tagline Generator", url: "https://holdyourvoice.com/tools/tagline-generator" },
5270
+ { name: "Public voice profiles", url: "https://holdyourvoice.com/profiles" },
5271
+ { name: "Blog", url: "https://holdyourvoice.com/blog" }
5272
+ ];
5273
+ COMMUNITY_URL = "https://holdyourvoice.com/community";
5274
+ PRICING_URL = "https://holdyourvoice.com/#pricing";
5275
+ DASHBOARD_BILLING_URL = "https://holdyourvoice.com/app/billing";
5276
+ }
5277
+ });
5278
+
5194
5279
  // src/lib/version.ts
5195
5280
  function pkgRoot() {
5196
5281
  const candidates = [
@@ -5414,7 +5499,7 @@ async function authenticateWithBrowser() {
5414
5499
  server.close();
5415
5500
  throw new Error("Authentication server did not return OAuth state");
5416
5501
  }
5417
- console.log(import_chalk.default.cyan("\nOpening browser for authentication..."));
5502
+ console.log(import_chalk2.default.cyan("\nOpening browser for authentication..."));
5418
5503
  await (0, import_open.default)(assertSafeOAuthUrl(auth_url));
5419
5504
  const authData = await new Promise((resolve15, reject) => {
5420
5505
  const timeout = setTimeout(() => {
@@ -5491,21 +5576,23 @@ async function authenticateWithBrowser() {
5491
5576
  return authData;
5492
5577
  }
5493
5578
  async function openAuthenticatedDashboard(opts = {}) {
5494
- const response = await authenticatedRequest(cliApiUrl("/cli/auth/web-handoff"), {
5495
- method: "POST",
5496
- body: {
5497
- next: opts.next || "/dashboard",
5498
- tab: opts.tab || "billing"
5579
+ const nextPath = opts.next || "/app/billing";
5580
+ try {
5581
+ const response = await authenticatedRequest(cliApiUrl("/cli/auth/web-handoff"), {
5582
+ method: "POST",
5583
+ body: { next: nextPath }
5584
+ });
5585
+ if (response.status === 200) {
5586
+ const { url } = response.data;
5587
+ if (url) {
5588
+ await (0, import_open.default)(assertSafeOpenUrl(url));
5589
+ return;
5590
+ }
5499
5591
  }
5500
- });
5501
- if (response.status !== 200) {
5502
- throw new Error("Could not open dashboard \u2014 try https://holdyourvoice.com/dashboard");
5503
- }
5504
- const { url } = response.data;
5505
- if (!url) {
5506
- throw new Error("Dashboard handoff URL missing");
5592
+ } catch {
5507
5593
  }
5508
- await (0, import_open.default)(assertSafeOpenUrl(url));
5594
+ const billingUrl = nextPath === "/app/billing" ? DASHBOARD_BILLING_URL : assertSafeOpenUrl(`https://holdyourvoice.com${nextPath}`);
5595
+ await (0, import_open.default)(billingUrl);
5509
5596
  }
5510
5597
  async function refreshToken(tokenOverride) {
5511
5598
  const token = tokenOverride || readAuth()?.token;
@@ -5551,105 +5638,21 @@ async function checkSession() {
5551
5638
  return { valid: false };
5552
5639
  }
5553
5640
  }
5554
- var http, https, import_chalk, import_open;
5641
+ var http, https, import_chalk2, import_open;
5555
5642
  var init_auth = __esm({
5556
5643
  "src/lib/auth.ts"() {
5557
5644
  "use strict";
5558
5645
  http = __toESM(require("http"));
5559
5646
  https = __toESM(require("https"));
5560
- import_chalk = __toESM(require_source());
5647
+ import_chalk2 = __toESM(require_source());
5561
5648
  import_open = __toESM(require_open());
5562
5649
  init_config();
5650
+ init_free_paid();
5563
5651
  init_version();
5564
5652
  init_auth_refresh();
5565
5653
  }
5566
5654
  });
5567
5655
 
5568
- // src/lib/free-paid.ts
5569
- function printFreePaidMatrix(opts = {}) {
5570
- if (opts.compact) {
5571
- console.log(import_chalk2.default.bold("\nFree forever (local)"));
5572
- console.log(import_chalk2.default.dim(" scan, fix, check, score, diff, mcp, all web tools"));
5573
- console.log(import_chalk2.default.bold("\nPaid power"));
5574
- console.log(import_chalk2.default.dim(" profiles, learning, hybrid analysis, rich rewrites"));
5575
- console.log(import_chalk2.default.dim(` ${PRICING_URL} | hyv plan --upgrade
5576
- `));
5577
- return;
5578
- }
5579
- console.log(import_chalk2.default.bold("\n\u2500\u2500 Free forever (no account) \u2500\u2500\n"));
5580
- console.log(import_chalk2.default.dim("CLI (offline):"));
5581
- for (const line of FREE_CLI_COMMANDS) {
5582
- console.log(import_chalk2.default.dim(" \u2022 ") + line);
5583
- }
5584
- console.log(import_chalk2.default.dim("\nTry without installing:"));
5585
- for (const line of NPX_EXAMPLES) {
5586
- console.log(import_chalk2.default.cyan(` ${line}`));
5587
- }
5588
- console.log(import_chalk2.default.dim("\nWeb tools (30+ free):"));
5589
- for (const t of FREE_WEB_TOOLS.slice(0, 8)) {
5590
- console.log(import_chalk2.default.dim(` \u2022 ${t.name}`) + import_chalk2.default.cyan(` \u2014 ${t.url}`));
5591
- }
5592
- console.log(import_chalk2.default.dim(` \u2022 \u2026and more \u2014 ${FREE_WEB_TOOLS[0].url}`));
5593
- console.log(import_chalk2.default.bold("\n\u2500\u2500 Paid unlocks \u2500\u2500\n"));
5594
- for (const line of PAID_FEATURES) {
5595
- console.log(import_chalk2.default.dim(" \u2022 ") + line);
5596
- }
5597
- console.log(import_chalk2.default.dim(`
5598
- First month $1 \u2192 ${PRICING_URL}`));
5599
- console.log(import_chalk2.default.dim(" hyv init | hyv plan --upgrade\n"));
5600
- }
5601
- var import_chalk2, NPX_EXAMPLES, FREE_CLI_COMMANDS, PAID_FEATURES, FREE_WEB_TOOLS, COMMUNITY_URL, PRICING_URL, DASHBOARD_BILLING_URL;
5602
- var init_free_paid = __esm({
5603
- "src/lib/free-paid.ts"() {
5604
- "use strict";
5605
- import_chalk2 = __toESM(require_source());
5606
- NPX_EXAMPLES = [
5607
- "npx @holdyourvoice/hyv welcome",
5608
- "npx @holdyourvoice/hyv scan draft.md",
5609
- "npx @holdyourvoice/hyv fix draft.md",
5610
- "npx @holdyourvoice/hyv init",
5611
- "npx @holdyourvoice/hyv mcp"
5612
- ];
5613
- FREE_CLI_COMMANDS = [
5614
- "hyv scan / fix / check / score / diff / batch / watch",
5615
- "hyv rules / history / demo / doctor / upgrade",
5616
- "hyv export (local profile markdown)",
5617
- "hyv mcp \u2014 agent tools (hyv_scan, hyv_clean, hyv_analyze, \u2026)",
5618
- "hyv welcome / hyv free \u2014 full capability tour",
5619
- "hyv content \u2014 blog & share templates",
5620
- "hyv plan --free \u2014 see what paid unlocks"
5621
- ];
5622
- PAID_FEATURES = [
5623
- "Voice profiles synced from your account (never-list, anchors, learned patterns)",
5624
- "Learning loop: hyv reinforce, hyv add \u2014 profile gets sharper every week",
5625
- "Rich profile-aware rewrite prompts (hyv rewrite)",
5626
- "Hybrid server analysis (hyv scan --server, MCP hyv_analyze)",
5627
- "Multiple profiles + team voices (Team plan)",
5628
- "Dashboard at holdyourvoice.com/dashboard"
5629
- ];
5630
- FREE_WEB_TOOLS = [
5631
- { name: "All free tools", url: "https://holdyourvoice.com/tools" },
5632
- { name: "Headline Analyzer", url: "https://holdyourvoice.com/tools/headline-analyzer" },
5633
- { name: "Brand Voice Analyzer", url: "https://holdyourvoice.com/tools/brand-voice-analyzer" },
5634
- { name: "AI Writing Analyzer", url: "https://holdyourvoice.com/tools/ai-writing-analyzer" },
5635
- { name: "Voice Audit (AI score)", url: "https://holdyourvoice.com/tools/voice-audit" },
5636
- { name: "Readability Checker", url: "https://holdyourvoice.com/tools/readability-checker" },
5637
- { name: "Email Subject Scorer", url: "https://holdyourvoice.com/tools/email-subject-scorer" },
5638
- { name: "Customer Persona Builder", url: "https://holdyourvoice.com/tools/customer-persona-builder" },
5639
- { name: "Brand Positioning Template", url: "https://holdyourvoice.com/tools/brand-positioning-template" },
5640
- { name: "Value Proposition Generator", url: "https://holdyourvoice.com/tools/value-proposition-generator" },
5641
- { name: "Grammar Checker", url: "https://holdyourvoice.com/tools/grammar-checker" },
5642
- { name: "Paraphrasing Tool", url: "https://holdyourvoice.com/tools/paraphrasing-tool" },
5643
- { name: "Tagline Generator", url: "https://holdyourvoice.com/tools/tagline-generator" },
5644
- { name: "Public voice profiles", url: "https://holdyourvoice.com/profiles" },
5645
- { name: "Blog", url: "https://holdyourvoice.com/blog" }
5646
- ];
5647
- COMMUNITY_URL = "https://holdyourvoice.com/community";
5648
- PRICING_URL = "https://holdyourvoice.com/#pricing";
5649
- DASHBOARD_BILLING_URL = "https://holdyourvoice.com/dashboard?tab=billing";
5650
- }
5651
- });
5652
-
5653
5656
  // src/lib/marketing-hints.ts
5654
5657
  var marketing_hints_exports = {};
5655
5658
  __export(marketing_hints_exports, {
@@ -11789,18 +11792,17 @@ async function stepSignup(profileName) {
11789
11792
  if (response.status === 200) {
11790
11793
  console.log(import_chalk12.default.green(" \u2713 profile synced to your account"));
11791
11794
  } else {
11792
- console.log(import_chalk12.default.yellow(" profile saved locally \u2014 sync again with `hyv sync` after upgrade"));
11795
+ const detail = response.data?.error;
11796
+ console.log(import_chalk12.default.yellow(
11797
+ ` profile saved locally \u2014 sync with \`hyv sync\`${detail ? ` (${detail})` : ` (HTTP ${response.status})`}`
11798
+ ));
11793
11799
  }
11794
- } catch {
11795
- console.log(import_chalk12.default.yellow(" profile saved locally \u2014 run `hyv sync` after you upgrade"));
11796
- }
11797
- try {
11798
- console.log(import_chalk12.default.cyan("\n opening billing in your dashboard ($1 first month)..."));
11799
- await withSpinner("opening dashboard\u2026", () => openAuthenticatedDashboard({ tab: "billing" }));
11800
- await briefPause();
11801
- } catch {
11802
- console.log(import_chalk12.default.yellow(" could not auto-open dashboard \u2014 visit holdyourvoice.com/dashboard"));
11800
+ } catch (err) {
11801
+ console.log(import_chalk12.default.yellow(` profile saved locally \u2014 run \`hyv sync\` (${err?.message || "sync failed"})`));
11803
11802
  }
11803
+ console.log(import_chalk12.default.cyan("\n opening billing in your dashboard ($1 first month)..."));
11804
+ await withSpinner("opening billing\u2026", () => openAuthenticatedDashboard({ next: "/app/billing" }));
11805
+ await briefPause();
11804
11806
  markStepComplete("signup");
11805
11807
  console.log(import_chalk12.default.dim("\n you're signed in \u2014 pick a plan in billing, no second login.\n"));
11806
11808
  }
@@ -16830,7 +16832,7 @@ async function showPlan() {
16830
16832
  async function upgradePlan() {
16831
16833
  console.log(import_chalk14.default.cyan("\nOpening billing in your dashboard ($1 first month)...\n"));
16832
16834
  try {
16833
- await openAuthenticatedDashboard({ tab: "billing" });
16835
+ await openAuthenticatedDashboard({ next: "/app/billing" });
16834
16836
  console.log(import_chalk14.default.green("\n\u2713 Dashboard opened \u2014 you're already signed in"));
16835
16837
  console.log(import_chalk14.default.dim("Pick a plan in billing. No second login."));
16836
16838
  } catch {
@@ -16850,7 +16852,7 @@ async function openBillingPortal() {
16850
16852
  const portalUrl = data.portal_url;
16851
16853
  if (portalUrl) {
16852
16854
  console.log(import_chalk14.default.dim("Opening browser..."));
16853
- await (0, import_open2.default)(assertSafeOpenUrl2(portalUrl));
16855
+ await (0, import_open2.default)(assertSafeOpenUrl(portalUrl));
16854
16856
  console.log(import_chalk14.default.green("\n\u2713 Billing portal opened"));
16855
16857
  } else {
16856
16858
  console.log(import_chalk14.default.yellow("No portal URL received."));
@@ -18412,10 +18414,11 @@ function registerDemoCommand(program3) {
18412
18414
  // src/commands/open.ts
18413
18415
  var import_chalk29 = __toESM(require_source());
18414
18416
  var PAGES = {
18415
- dashboard: "https://holdyourvoice.com/dashboard",
18416
- profiles: "https://holdyourvoice.com/dashboard",
18417
- pricing: "https://holdyourvoice.com/pricing",
18418
- settings: "https://holdyourvoice.com/dashboard"
18417
+ dashboard: "https://holdyourvoice.com/app",
18418
+ profiles: "https://holdyourvoice.com/app",
18419
+ pricing: "https://holdyourvoice.com/app/billing",
18420
+ settings: "https://holdyourvoice.com/app/settings",
18421
+ billing: "https://holdyourvoice.com/app/billing"
18419
18422
  };
18420
18423
  function registerOpenCommand(program3) {
18421
18424
  program3.command("open").description("Open the web dashboard in your browser").option("--page <path>", "Page: dashboard, profiles, pricing, settings", "dashboard").option("--profile <name>", "Deep-link to a specific profile").option("--no-browser", "Print URL only, don't open").action(async (options) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@holdyourvoice/hyv",
3
- "version": "2.9.4",
3
+ "version": "2.9.6",
4
4
  "description": "Free local AI writing scan for cursor & claude. MCP server, 220+ pattern detection, voice profiles. npx @holdyourvoice/hyv welcome",
5
5
  "main": "dist/index.js",
6
6
  "bin": {