content-grade 1.1.0 → 1.1.2
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/content-grade.js +25 -35
- package/dist/landing.html +2 -2
- package/package.json +1 -1
package/bin/content-grade.js
CHANGED
|
@@ -99,8 +99,8 @@ function incrementUsage() {
|
|
|
99
99
|
// Upgrade links — Free → Pro → Business → Team
|
|
100
100
|
const UPGRADE_LINKS = {
|
|
101
101
|
free: 'https://buy.stripe.com/4gM14p87GeCh9vn9ks8k80a', // Pro $9/mo — direct checkout
|
|
102
|
-
pro: 'https://buy.stripe.com/bJefZjafO2Tz36Z2W48k80b', // Business $
|
|
103
|
-
business: 'https://buy.stripe.com/cNiaEZfA8cu9bDv4088k80c', // Team $
|
|
102
|
+
pro: 'https://buy.stripe.com/bJefZjafO2Tz36Z2W48k80b', // Business $49/mo
|
|
103
|
+
business: 'https://buy.stripe.com/cNiaEZfA8cu9bDv4088k80c', // Team $199/mo
|
|
104
104
|
};
|
|
105
105
|
|
|
106
106
|
const TIER_NAMES = {
|
|
@@ -120,12 +120,12 @@ const TIER_LIMITS = {
|
|
|
120
120
|
function getUpgradeMessage() {
|
|
121
121
|
const tier = getLicenseTier();
|
|
122
122
|
if (tier === 'free') return `Unlimited analyses with Pro — $9/mo → ${UPGRADE_LINKS.free}`;
|
|
123
|
-
if (tier === 'pro') return `Upgrade to Business — priority support, $
|
|
124
|
-
if (tier === 'business') return `Upgrade to Team — team seats, $
|
|
123
|
+
if (tier === 'pro') return `Upgrade to Business — priority support, $49/mo → ${UPGRADE_LINKS.pro}`;
|
|
124
|
+
if (tier === 'business') return `Upgrade to Team — team seats, $199/mo → ${UPGRADE_LINKS.business}`;
|
|
125
125
|
return '';
|
|
126
126
|
}
|
|
127
127
|
|
|
128
|
-
// Show usage
|
|
128
|
+
// Show usage quota + upgrade CTA in a visually distinct box after each free run.
|
|
129
129
|
// count = daily usage AFTER this run.
|
|
130
130
|
function showFreeTierCTA(count) {
|
|
131
131
|
const limit = TIER_LIMITS.free;
|
|
@@ -135,29 +135,24 @@ function showFreeTierCTA(count) {
|
|
|
135
135
|
const ctaStrength = remaining === 0 ? 'strong' : remaining <= 1 ? 'warning' : 'nudge';
|
|
136
136
|
recordEvent({ event: 'upgrade_prompt_shown', run_count: count, cta_strength: ctaStrength, cta_context: 'post_run' });
|
|
137
137
|
|
|
138
|
+
const quotaColor = remaining === 0 ? RD : remaining <= 1 ? YL : CY;
|
|
139
|
+
const bar = '█'.repeat(count) + '░'.repeat(Math.max(0, limit - count));
|
|
140
|
+
const remainText = remaining === 0
|
|
141
|
+
? `come back tomorrow for ${limit} more`
|
|
142
|
+
: `${remaining} remaining today`;
|
|
143
|
+
const SEP = '─'.repeat(60);
|
|
144
|
+
|
|
138
145
|
blank();
|
|
139
|
-
|
|
146
|
+
console.log(` ${D}╭${SEP}${R}`);
|
|
147
|
+
console.log(` ${D}│${R} ${quotaColor}${B}${count}/${limit}${R} ${quotaColor}free runs used today${R} ${D}[${bar}] ${remainText}${R}`);
|
|
148
|
+
console.log(` ${D}│${R}`);
|
|
149
|
+
console.log(` ${D}│${R} ${WH}Pro unlocks:${R} ${D}Unlimited analyses · Priority processing${R}`);
|
|
150
|
+
console.log(` ${D}│${R} ${D}JSON/HTML export · Bulk grading · CI mode${R}`);
|
|
151
|
+
console.log(` ${D}│${R}`);
|
|
152
|
+
console.log(` ${D}│${R} ${GN}→ Get Pro${R} ${WH}$19/mo, cancel anytime${R}`);
|
|
153
|
+
console.log(` ${D}│${R} ${CY}${UPGRADE_LINKS.free}${R}`);
|
|
154
|
+
console.log(` ${D}╰${SEP}${R}`);
|
|
140
155
|
|
|
141
|
-
if (remaining === 0) {
|
|
142
|
-
// Variant D — power user, last run of the day
|
|
143
|
-
console.log(` ${YL}${B}${count}/${limit} — that's all your free runs for today.${R}`);
|
|
144
|
-
blank();
|
|
145
|
-
console.log(` ${WH}You're clearly using this. $9/month removes the cap entirely —${R}`);
|
|
146
|
-
console.log(` ${WH}unlimited analyses, JSON/HTML export, bulk mode. Cancel anytime.${R}`);
|
|
147
|
-
blank();
|
|
148
|
-
console.log(` ${CY}→ ${UPGRADE_LINKS.free}${R}`);
|
|
149
|
-
console.log(` ${D}Or come back tomorrow for ${limit} more free runs.${R}`);
|
|
150
|
-
} else {
|
|
151
|
-
// Variant C — compact post-run teaser with command-relevant Pro feature
|
|
152
|
-
const proFeatureMap = {
|
|
153
|
-
grade: 'Bulk-grade entire directories · CI exit codes · JSON output',
|
|
154
|
-
headline: 'Batch-test 50 headlines at once · CSV export',
|
|
155
|
-
analyze: 'CI integration · exit 1 on below-threshold · JSON pipeline output',
|
|
156
|
-
};
|
|
157
|
-
const feature = proFeatureMap[cmd] || 'Unlimited runs · CI mode · bulk grading';
|
|
158
|
-
console.log(` ${D}[ ${count}/${limit} free runs today · ${R}${WH}Pro: ${feature}${R}${D} · ${CY}${UPGRADE_LINKS.free}${R}${D} ]${R}`);
|
|
159
|
-
}
|
|
160
|
-
hr();
|
|
161
156
|
maybeShowFeedbackCTA(count);
|
|
162
157
|
}
|
|
163
158
|
|
|
@@ -225,20 +220,15 @@ function showCommunityNudge() {
|
|
|
225
220
|
console.log(` ${D}💬 Questions or feedback? Discussions: ${CY}${DISCUSSIONS_URL}${R}`);
|
|
226
221
|
}
|
|
227
222
|
|
|
228
|
-
//
|
|
223
|
+
// Usage quota + upgrade nudge shown after batch runs.
|
|
229
224
|
// count = daily runs used (after this run).
|
|
230
225
|
function showUsageFooter(count) {
|
|
231
226
|
if (isProUser()) return;
|
|
232
227
|
const limit = TIER_LIMITS.free;
|
|
233
228
|
const remaining = Math.max(0, limit - count);
|
|
229
|
+
const quotaColor = remaining === 0 ? RD : remaining <= 1 ? YL : D;
|
|
234
230
|
blank();
|
|
235
|
-
|
|
236
|
-
console.log(` ${RD}[ You've used ${limit}/${limit} free runs today · Pro: unlimited, JSON/HTML export, bulk mode — $9/mo → ${UPGRADE_LINKS.free} ]${R}`);
|
|
237
|
-
} else if (remaining <= 1) {
|
|
238
|
-
console.log(` ${YL}[ You've used ${count}/${limit} free runs today · ${remaining} remaining · Pro: unlimited ($9/mo) → ${UPGRADE_LINKS.free} ]${R}`);
|
|
239
|
-
} else {
|
|
240
|
-
console.log(` ${D}[ You've used ${count}/${limit} free runs today · ${remaining} remaining · Pro: unlimited ($9/mo) → ${UPGRADE_LINKS.free} ]${R}`);
|
|
241
|
-
}
|
|
231
|
+
console.log(` ${quotaColor}${B}${count}/${limit}${R} ${quotaColor}free runs used today${R} ${D}· Pro: unlimited → ${CY}${UPGRADE_LINKS.free}${R}`);
|
|
242
232
|
maybeShowEarlyAdopterCTA(count);
|
|
243
233
|
maybeShowFeedbackCTA(count);
|
|
244
234
|
}
|
|
@@ -986,7 +976,7 @@ async function cmdActivate() {
|
|
|
986
976
|
blank();
|
|
987
977
|
console.log(` ${B}Pro features:${R}`);
|
|
988
978
|
console.log(` ${D} content-grade batch ./posts/ ${R}${D}# analyze all files in a directory${R}`);
|
|
989
|
-
console.log(` ${D} Unlimited analyses (vs
|
|
979
|
+
console.log(` ${D} Unlimited analyses (vs 5/day free)${R}`);
|
|
990
980
|
blank();
|
|
991
981
|
console.log(` ${D}To activate a different key: ${CY}content-grade activate <new-key>${R}`);
|
|
992
982
|
blank();
|
package/dist/landing.html
CHANGED
|
@@ -1017,7 +1017,7 @@
|
|
|
1017
1017
|
</div>
|
|
1018
1018
|
|
|
1019
1019
|
<div class="hero-meta">
|
|
1020
|
-
<span>Free ·
|
|
1020
|
+
<span>Free · 5 runs/day</span>
|
|
1021
1021
|
<span class="hero-meta-sep">·</span>
|
|
1022
1022
|
<span>Claude CLI required · Zero data leaves your machine</span>
|
|
1023
1023
|
<span class="hero-meta-sep">·</span>
|
|
@@ -1430,7 +1430,7 @@
|
|
|
1430
1430
|
<section class="final-cta">
|
|
1431
1431
|
<div class="container">
|
|
1432
1432
|
<h2>Run your best headline.<br />See where it actually stands.</h2>
|
|
1433
|
-
<p>Free ·
|
|
1433
|
+
<p>Free · 5 runs/day · No API key · Claude CLI only</p>
|
|
1434
1434
|
<div style="display: flex; gap: 16px; justify-content: center; flex-wrap: wrap;">
|
|
1435
1435
|
<a href="https://github.com/Content-Grade/Content-Grade" class="btn-primary">
|
|
1436
1436
|
Install free — npx content-grade
|
package/package.json
CHANGED