content-grade 1.0.13 → 1.0.14

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/README.md CHANGED
@@ -63,7 +63,7 @@ npx content-grade 'blog/**/*.md'
63
63
 
64
64
  **JSON output for CI integration:**
65
65
  ```bash
66
- npx content-grade README.md --format json
66
+ npx content-grade README.md --json
67
67
  # Returns structured JSON with score, grade, dimensions, and improvements
68
68
  # Exit code 1 if score < 50 — useful for blocking low-quality merges
69
69
  ```
@@ -549,6 +549,7 @@ tests/
549
549
 
550
550
  **Documentation:**
551
551
  - [`docs/getting-started.md`](./docs/getting-started.md) — step-by-step first-run guide
552
+ - [`docs/cli-reference.md`](./docs/cli-reference.md) — full CLI reference: all commands, flags, output schema, exit codes
552
553
  - [`docs/examples.md`](./docs/examples.md) — real-world examples for all 6 tools, CI/CD workflows, Node.js integration
553
554
  - [`docs/api.md`](./docs/api.md) — full REST API reference
554
555
 
@@ -66,7 +66,7 @@ function incrementUsage() {
66
66
  return u.count;
67
67
  }
68
68
 
69
- const FREE_DAILY_LIMIT = 50;
69
+ const FREE_DAILY_LIMIT = 5;
70
70
 
71
71
  function checkDailyLimit() {
72
72
  if (isProUser()) return { ok: true };
@@ -252,18 +252,23 @@ SCORING CALIBRATION:
252
252
 
253
253
  async function cmdAnalyze(filePath) {
254
254
  if (!filePath) {
255
+ if (_demoMode) {
256
+ return cmdDemo();
257
+ }
255
258
  blank();
256
259
  fail(`No file specified.`);
257
260
  blank();
258
- console.log(` Usage:`);
261
+ console.log(` ${B}Usage:${R}`);
259
262
  console.log(` ${CY}content-grade analyze <file>${R} ${D}(or: check <file>)${R}`);
260
263
  blank();
261
- console.log(` Examples:`);
262
- console.log(` ${D}content-grade analyze ./blog-post.md${R}`);
263
- console.log(` ${D}content-grade check ./email-draft.txt${R}`);
264
- console.log(` ${D}content-grade analyze ~/landing-page-copy.md${R}`);
264
+ console.log(` ${B}Examples:${R}`);
265
+ console.log(` ${CY}content-grade analyze ./blog-post.md${R}`);
266
+ console.log(` ${CY}content-grade check ./email-draft.txt${R}`);
267
+ console.log(` ${CY}content-grade analyze ~/landing-page-copy.md${R}`);
265
268
  blank();
266
- console.log(` ${D}No file? Try the demo: ${CY}content-grade demo${R}`);
269
+ console.log(` ${GN}Tip:${R} See it in action first — no file needed:`);
270
+ console.log(` ${CY}content-grade --demo${R} ${D}# live AI analysis on built-in sample${R}`);
271
+ console.log(` ${CY}content-grade demo${R} ${D}# same thing${R}`);
267
272
  blank();
268
273
  process.exit(1);
269
274
  }
@@ -343,9 +348,9 @@ async function cmdAnalyze(filePath) {
343
348
  blank();
344
349
  console.log(` ${B}Options:${R}`);
345
350
  console.log(` ${D}· Wait until tomorrow (limit resets at midnight)${R}`);
346
- console.log(` ${D}· Unlock 100 checks/day: ${CY}content-grade activate${R}`);
351
+ console.log(` ${D}· Unlock unlimited: ${CY}content-grade activate${R}`);
347
352
  blank();
348
- console.log(` ${MG}Upgrade to Pro ($9/mo) for 100 analyses/day →${R} ${CY}https://content-grade.github.io/Content-Grade/${R}`);
353
+ console.log(` ${MG}Upgrade to Pro ($9/mo) for unlimited analyses →${R} ${CY}https://buy.stripe.com/5kQeVfew48dT7nf2W48k801${R}`);
349
354
  blank();
350
355
  process.exit(1);
351
356
  }
@@ -524,7 +529,7 @@ async function cmdAnalyze(filePath) {
524
529
  console.log(` ${CY}content-grade analyze https://yoursite.com/post${R} ${D}# audit any live URL${R}`);
525
530
  blank();
526
531
  if (remaining <= 10) {
527
- console.log(` ${YL}${remaining} free checks left today.${R} Unlock 100/day: ${CY}content-grade activate${R}`);
532
+ console.log(` ${YL}${remaining} free checks left today.${R} Unlock unlimited: ${CY}content-grade activate${R}`);
528
533
  } else {
529
534
  console.log(` ${D}${remaining} free checks left today · Pro ($9/mo): ${CY}content-grade.github.io/Content-Grade${R}`);
530
535
  }
@@ -608,9 +613,9 @@ async function cmdHeadline(text) {
608
613
  blank();
609
614
  console.log(` ${B}Options:${R}`);
610
615
  console.log(` ${D}· Wait until tomorrow (limit resets at midnight)${R}`);
611
- console.log(` ${D}· Unlock 100 checks/day: ${CY}content-grade activate${R}`);
616
+ console.log(` ${D}· Unlock unlimited: ${CY}content-grade activate${R}`);
612
617
  blank();
613
- console.log(` ${MG}Upgrade to Pro ($9/mo) for 100 analyses/day →${R} ${CY}https://content-grade.github.io/Content-Grade/${R}`);
618
+ console.log(` ${MG}Upgrade to Pro ($9/mo) for unlimited analyses →${R} ${CY}https://buy.stripe.com/5kQeVfew48dT7nf2W48k801${R}`);
614
619
  blank();
615
620
  process.exit(1);
616
621
  }
@@ -700,7 +705,7 @@ async function cmdHeadline(text) {
700
705
  console.log(` ${D}Compare two headlines: ${CY}content-grade start${R} → HeadlineGrader compare${R}`);
701
706
  blank();
702
707
  if (!isProUser()) {
703
- console.log(` ${MG}Upgrade to Pro ($9/mo) for 100 analyses/day →${R} ${CY}https://content-grade.github.io/Content-Grade/${R}`);
708
+ console.log(` ${MG}Upgrade to Pro ($9/mo) for unlimited analyses →${R} ${CY}https://buy.stripe.com/5kQeVfew48dT7nf2W48k801${R}`);
704
709
  blank();
705
710
  }
706
711
  }
@@ -1123,7 +1128,7 @@ function cmdStart() {
1123
1128
  info(` EmailForge — ${url}/email-forge`);
1124
1129
  info(` AudienceDecoder — ${url}/audience`);
1125
1130
  blank();
1126
- info(`Free tier: 50 analyses/day. Upgrade at ${url}`);
1131
+ info(`Free tier: 5 analyses/day. Upgrade at ${url}`);
1127
1132
  info(`Press Ctrl+C to stop`);
1128
1133
  blank();
1129
1134
  openBrowser(url);
@@ -1302,10 +1307,10 @@ function cmdHelp() {
1302
1307
  blank();
1303
1308
  console.log(` ${B}QUICK START${R}`);
1304
1309
  blank();
1310
+ console.log(` ${CY}npx content-grade --demo${R} ${D}# live AI demo — no file needed, see it first${R}`);
1305
1311
  console.log(` ${CY}npx content-grade headline "Your Headline Here"${R} ${D}# grade a headline (fastest, ~5s)${R}`);
1306
1312
  console.log(` ${CY}npx content-grade analyze ./my-post.md${R} ${D}# full AI analysis of a file (~20s)${R}`);
1307
1313
  console.log(` ${CY}npx content-grade analyze https://example.com${R} ${D}# audit any live URL (~20s)${R}`);
1308
- console.log(` ${CY}npx content-grade demo${R} ${D}# live demo on sample content${R}`);
1309
1314
  console.log(` ${CY}npx content-grade start${R} ${D}# launch web dashboard (6 tools)${R}`);
1310
1315
  blank();
1311
1316
 
@@ -1348,6 +1353,7 @@ function cmdHelp() {
1348
1353
  blank();
1349
1354
  console.log(` ${B}FLAGS${R}`);
1350
1355
  blank();
1356
+ console.log(` ${CY}--demo${R} Run the live AI demo on built-in sample content`);
1351
1357
  console.log(` ${CY}--json${R} Output raw JSON (great for CI pipelines)`);
1352
1358
  console.log(` ${CY}--quiet${R} Output score number only (for scripting)`);
1353
1359
  console.log(` ${CY}--save [file]${R} Save analysis to a markdown file (default: <input>.content-grade.md)`);
@@ -1493,20 +1499,25 @@ function cmdQuickDemo() {
1493
1499
  blank();
1494
1500
  hr();
1495
1501
  if (isFirstRun()) {
1496
- console.log(` ${B}${CY}Your next step:${R}`);
1502
+ console.log(` ${B}${CY}Try it on real content — 3 ways to start:${R}`);
1503
+ blank();
1504
+ console.log(` ${B}1.${R} Grade a headline ${D}(~5 seconds, works right now)${R}`);
1505
+ console.log(` ${CY}npx content-grade headline "Your headline here"${R}`);
1497
1506
  blank();
1498
- console.log(` ${CY}npx content-grade headline "Your headline here"${R}`);
1499
- console.log(` ${D} Grade any headline in ~5 seconds — no file needed, works right now.${R}`);
1507
+ console.log(` ${B}2.${R} Run the live AI demo ${D}(full analysis on sample content)${R}`);
1508
+ console.log(` ${CY}npx content-grade --demo${R}`);
1500
1509
  blank();
1501
- console.log(` ${D}Then analyze a full post: ${CY}npx content-grade analyze ./your-post.md${R}`);
1510
+ console.log(` ${B}3.${R} Analyze your own file`);
1511
+ console.log(` ${CY}npx content-grade analyze ./your-post.md${R}`);
1502
1512
  blank();
1503
- console.log(` ${D}Requires Claude CLI (free): ${CY}claude.ai/code${R}${D} → install → ${CY}claude login${R}`);
1504
- console.log(` ${D}Setup check: ${CY}npx content-grade init${R}`);
1513
+ console.log(` ${D}All three require Claude CLI (free): ${CY}claude.ai/code${R}${D} → install → ${CY}claude login${R}`);
1514
+ console.log(` ${D}First time? Run: ${CY}npx content-grade init${R}${D} to verify setup.${R}`);
1505
1515
  } else {
1506
- console.log(` ${B}${CY}Grade a headline right now:${R}`);
1516
+ console.log(` ${B}${CY}Grade your own content:${R}`);
1507
1517
  blank();
1518
+ console.log(` ${CY}npx content-grade --demo${R} ${D}# live AI demo${R}`);
1508
1519
  console.log(` ${CY}npx content-grade headline "Your headline here"${R} ${D}# ~5 seconds${R}`);
1509
- console.log(` ${CY}npx content-grade analyze ./your-post.md${R} ${D}# full AI analysis${R}`);
1520
+ console.log(` ${CY}npx content-grade analyze ./your-post.md${R} ${D}# full analysis${R}`);
1510
1521
  }
1511
1522
  blank();
1512
1523
  }
@@ -1864,7 +1875,7 @@ function analysisToMarkdown(result, sourceName, analyzedAt) {
1864
1875
  }
1865
1876
 
1866
1877
  lines.push(`---`);
1867
- lines.push(`Generated by [ContentGrade](https://content-grade.github.io/Content-Grade/) v${_version}`);
1878
+ lines.push(`Generated by [ContentGrade](https://buy.stripe.com/5kQeVfew48dT7nf2W48k801) v${_version}`);
1868
1879
  return lines.join('\n');
1869
1880
  }
1870
1881
 
@@ -1884,8 +1895,9 @@ const _saveMode = _saveIdx !== -1;
1884
1895
  const _savePath = (_saveMode && _rawArgs[_saveIdx + 1] && !_rawArgs[_saveIdx + 1].startsWith('-'))
1885
1896
  ? _rawArgs[_saveIdx + 1]
1886
1897
  : null;
1898
+ const _demoMode = _rawArgs.includes('--demo');
1887
1899
  const args = _rawArgs.filter((a, i) => {
1888
- if (['--no-telemetry', '--json', '--quiet', '--verbose', '--ci', '--save'].includes(a)) return false;
1900
+ if (['--no-telemetry', '--json', '--quiet', '--verbose', '--ci', '--save', '--demo'].includes(a)) return false;
1889
1901
  if (a === '--threshold') return false;
1890
1902
  if (i > 0 && _rawArgs[i - 1] === '--threshold') return false;
1891
1903
  if (_saveMode && i > 0 && _rawArgs[i - 1] === '--save' && !a.startsWith('-')) return false;
@@ -1924,6 +1936,7 @@ if (_rawArgs.includes('--help') || _rawArgs.includes('-h')) {
1924
1936
  console.log(` ${CY}<file>${R} Path to a .md, .txt, or .mdx file`);
1925
1937
  blank();
1926
1938
  console.log(` ${B}Flags:${R}`);
1939
+ console.log(` ${CY}--demo${R} Run on built-in sample content (no file needed)`);
1927
1940
  console.log(` ${CY}--json${R} Output raw JSON (great for CI pipelines)`);
1928
1941
  console.log(` ${CY}--quiet${R} Output score number only (for scripting)`);
1929
1942
  console.log(` ${CY}--ci${R} Exit 0 if score passes, 1 if it fails`);
@@ -1931,6 +1944,7 @@ if (_rawArgs.includes('--help') || _rawArgs.includes('-h')) {
1931
1944
  console.log(` ${CY}--verbose${R} Show debug info: model, timing, response length`);
1932
1945
  blank();
1933
1946
  console.log(` ${B}Examples:${R}`);
1947
+ console.log(` ${CY}content-grade analyze --demo${R} ${D}# live demo on sample content${R}`);
1934
1948
  console.log(` ${CY}content-grade analyze ./blog-post.md${R}`);
1935
1949
  console.log(` ${CY}content-grade analyze ./readme.md --json${R}`);
1936
1950
  console.log(` ${CY}content-grade analyze ./copy.md --ci --threshold 70${R}`);
@@ -2009,7 +2023,15 @@ if (_rawArgs.includes('--help') || _rawArgs.includes('-h')) {
2009
2023
  }
2010
2024
  }
2011
2025
 
2012
- switch (cmd) {
2026
+ if (_demoMode) {
2027
+ recordEvent({ event: 'command', command: 'demo' });
2028
+ cmdDemo().catch(err => {
2029
+ blank();
2030
+ fail(`Demo error: ${err.message}`);
2031
+ blank();
2032
+ process.exit(1);
2033
+ });
2034
+ } else switch (cmd) {
2013
2035
  case 'analyze':
2014
2036
  case 'analyse':
2015
2037
  case 'check':
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "content-grade",
3
- "version": "1.0.13",
3
+ "version": "1.0.14",
4
4
  "description": "AI-powered content analysis CLI. Score any blog post, landing page, or ad copy in under 30 seconds — runs on Claude CLI, no API key needed.",
5
5
  "type": "module",
6
6
  "bin": {