contentbit 1.0.0 → 2.0.0-next.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.
Files changed (57) hide show
  1. package/README.md +24 -93
  2. package/dist/bin.js +23268 -10576
  3. package/dist/cli-format.d.ts +11 -3
  4. package/dist/cli-format.d.ts.map +1 -1
  5. package/dist/command-config.d.ts +7 -2
  6. package/dist/command-config.d.ts.map +1 -1
  7. package/dist/commands/adopt-routes.d.ts +47 -0
  8. package/dist/commands/adopt-routes.d.ts.map +1 -0
  9. package/dist/commands/adopt.d.ts +2 -2
  10. package/dist/commands/adopt.d.ts.map +1 -1
  11. package/dist/commands/agents.d.ts.map +1 -1
  12. package/dist/commands/check.d.ts +14 -0
  13. package/dist/commands/check.d.ts.map +1 -0
  14. package/dist/commands/context.d.ts +11 -0
  15. package/dist/commands/context.d.ts.map +1 -0
  16. package/dist/commands/find-markdown.d.ts +13 -0
  17. package/dist/commands/find-markdown.d.ts.map +1 -0
  18. package/dist/commands/init-blocks.d.ts +38 -0
  19. package/dist/commands/init-blocks.d.ts.map +1 -0
  20. package/dist/commands/init-ci.d.ts +16 -0
  21. package/dist/commands/init-ci.d.ts.map +1 -0
  22. package/dist/commands/init-site.d.ts +16 -0
  23. package/dist/commands/init-site.d.ts.map +1 -0
  24. package/dist/commands/init-targets.d.ts +6 -1
  25. package/dist/commands/init-targets.d.ts.map +1 -1
  26. package/dist/commands/init.d.ts +5 -4
  27. package/dist/commands/init.d.ts.map +1 -1
  28. package/dist/commands/package-manager.d.ts +22 -0
  29. package/dist/commands/package-manager.d.ts.map +1 -0
  30. package/dist/commands/skill-drift.d.ts +7 -0
  31. package/dist/commands/skill-drift.d.ts.map +1 -0
  32. package/dist/commands/studio.d.ts +3 -2
  33. package/dist/commands/studio.d.ts.map +1 -1
  34. package/dist/content-project.d.ts +1 -6
  35. package/dist/content-project.d.ts.map +1 -1
  36. package/dist/load-site.d.ts +20 -0
  37. package/dist/load-site.d.ts.map +1 -0
  38. package/dist/project-config.d.ts +4 -1
  39. package/dist/project-config.d.ts.map +1 -1
  40. package/dist/run.d.ts +2 -1
  41. package/dist/run.d.ts.map +1 -1
  42. package/dist/run.js +23256 -10575
  43. package/dist/write-file.d.ts +7 -0
  44. package/dist/write-file.d.ts.map +1 -0
  45. package/package.json +17 -10
  46. package/dist/commands/brief.d.ts +0 -12
  47. package/dist/commands/brief.d.ts.map +0 -1
  48. package/dist/commands/doctor.d.ts +0 -16
  49. package/dist/commands/doctor.d.ts.map +0 -1
  50. package/dist/commands/links.d.ts +0 -9
  51. package/dist/commands/links.d.ts.map +0 -1
  52. package/dist/commands/snapshot.d.ts +0 -12
  53. package/dist/commands/snapshot.d.ts.map +0 -1
  54. package/dist/commands/stats.d.ts +0 -9
  55. package/dist/commands/stats.d.ts.map +0 -1
  56. package/dist/links-io.d.ts +0 -3
  57. package/dist/links-io.d.ts.map +0 -1
package/README.md CHANGED
@@ -1,99 +1,30 @@
1
1
  # contentbit
2
2
 
3
- CLI for [contentbit](https://contentbit.dev): initialize projects, validate
4
- structured Markdown blocks, print ranked health reports, build internal-link
5
- indexes, render content, and give LLMs live authoring instructions from your
6
- registry.
7
-
8
- Fast path:
3
+ An SEO content check for agents. `contentbit check` reads the HTML your build
4
+ wrote and reports SEO and link problems before you deploy, each one pointed at
5
+ a Markdown line, a shared template element, or a page. `contentbit context`
6
+ gives an agent a page's context, or the whole site's.
9
7
 
10
8
  ```bash
11
- # scaffold packages, starter content, registry, renderer, scripts, and LLM-agent files
12
- pnpm dlx contentbit@latest init
13
-
14
- # run the generated validate script, including your custom registry
15
- pnpm run content:check
16
-
17
- # open the local read-only Studio dashboard
18
- pnpm run studio
19
-
20
- # inspect validation, links, and content-quality suggestions together
21
- pnpm run content:doctor
22
-
23
- # optionally scaffold SEO contracts for brief + doctor checks
24
- contentbit init --seo
25
-
26
- # refresh AGENTS.md and Claude Code skills for LLM agents
27
- contentbit agents
9
+ npx contentbit@latest init # finds the build and attaches Markdown to its pages
10
+ npm run build
11
+ contentbit check # exits 1 on errors, so it can fail CI
12
+ contentbit context # every built page, its keyword and its links in
13
+ contentbit context /blog/my-post/
28
14
  ```
29
15
 
30
- Astro init creates a self-contained `/example` route without editing the
31
- project's content collections. Integrate `content/` into an existing collection
32
- deliberately, or use
33
- [`astro-speedrun-seo`](https://github.com/agonist/astro-speedrun-seo) as the
34
- production-shaped reference template.
35
-
36
- Everyday commands:
37
-
38
- ```bash
39
- # contentbit.config.ts supplies the content glob, registry, links, and SEO config
40
- contentbit validate
41
- contentbit doctor
42
- contentbit studio
43
- contentbit stats
44
- contentbit links
45
- contentbit instructions --audience llm
46
-
47
- # explicit files and flags override config for one invocation
48
- # exits 1 with file:line:col diagnostics and fix hints
49
- contentbit validate "content/**/*.md" --registry ./blocks/registry.ts
50
- contentbit validate "content/**/*.md" --registry ./blocks/registry.ts --no-generic-blocks
51
-
52
- # ranked repair plan: validation, links, thin sections, block-less long docs,
53
- # and missing image alt text; add --json for agents/CI
54
- contentbit doctor "content/**/*.md" --registry ./blocks/registry.ts
55
- contentbit doctor "content/**/*.md" --registry ./blocks/registry.ts --no-generic-blocks
56
- contentbit doctor "content/**/*.md" --seo-config ./contentbit.seo.config.ts --strict-seo
57
- contentbit doctor "content/**/*.md" --no-seo
58
-
59
- # agent-ready SEO structure brief for an existing or planned page
60
- contentbit brief ahrefs-alternatives "content/**/*.md"
61
- contentbit brief ahrefs-alternatives --json
62
-
63
- # local read-only web app for previews, stats, diagnostics, links, and keywords
64
- contentbit studio "content/**/*.md" --registry ./blocks/registry.ts
65
- contentbit studio "content/**/*.md" --registry ./blocks/registry.ts --no-open
66
- contentbit studio "content/**/*.md" --registry ./blocks/registry.ts --no-generic-blocks
67
-
68
- # structured JSON stats for one document: outline, word counts,
69
- # block census, links, validation summary — quick context for LLMs
70
- contentbit stats article.md
71
-
72
- # internal-link graph from frontmatter slugs, aliases, and linksTo
73
- contentbit links "content/**/*.md"
74
- contentbit links "content/**/*.md" --fix
75
-
76
- # compact LLM context generated from the registry
77
- contentbit instructions --audience llm --out guide.md
78
-
79
- # render to plain Markdown
80
- contentbit render article.md
81
- ```
82
-
83
- Point `--registry ./blocks/registry.ts` at a module to add custom blocks.
84
- Pass `--no-generic-blocks` when that registry owns the full block set, including
85
- names that overlap the generic pack.
86
- Add `contentbit.seo.config.ts` with `defineSeoConfig(...)` to let `doctor`
87
- include SEO contract findings and `contentbit brief <key-or-slug>` print an
88
- agent-ready page brief. Use `--no-seo` to keep `doctor` to validation, links,
89
- and stats only.
90
- LLM agents should read the same registry with `contentbit instructions`, write
91
- plain Markdown with registered blocks, then run `contentbit validate` until it
92
- exits 0.
93
-
94
- New projects keep shared defaults in `contentbit.config.ts`; existing projects
95
- whose package scripts contain full command arguments remain supported.
96
- Studio is installed separately as `@contentbit/studio` so the base CLI stays
97
- lightweight; `contentbit init` installs it automatically.
98
-
99
- Docs: [contentbit.dev/docs](https://contentbit.dev/docs)
16
+ | Command | What it does |
17
+ | --- | --- |
18
+ | `init` | Set a project up for `check` and `context`. `--ci github` writes the CI workflow. |
19
+ | `adopt` | Propose page routes from an existing build, changing no file. |
20
+ | `check` | Report SEO and link problems on the built pages and the Markdown. `--json` for agents and CI. |
21
+ | `context` | Print what a built page or the site serves, says and links. |
22
+ | `studio` | Browse the built pages, their context and findings locally (needs `@contentbit/studio`). |
23
+ | `validate`, `render`, `instructions`, `docs` | Work with typed Markdown blocks, which are opt-in. |
24
+ | `agents` | Install or refresh the coding-agent guidance. |
25
+
26
+ Settings live in `contentbit.config.ts`. Requires Node 22.18 or later.
27
+
28
+ Docs: [contentbit.dev/docs](https://contentbit.dev/docs) ·
29
+ [CLI reference](https://contentbit.dev/docs/reference/cli) ·
30
+ [Upgrade from 1.x](https://contentbit.dev/docs/guides/upgrade)