@forumulate/cli 0.8.0 → 0.10.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 (286) hide show
  1. package/README.md +11 -3
  2. package/dist/api/args.d.ts.map +1 -1
  3. package/dist/api/args.js +1 -0
  4. package/dist/api/args.js.map +1 -1
  5. package/dist/api/command.d.ts +1 -1
  6. package/dist/api/command.d.ts.map +1 -1
  7. package/dist/api/command.js +86 -11
  8. package/dist/api/command.js.map +1 -1
  9. package/dist/api/http.d.ts +8 -0
  10. package/dist/api/http.d.ts.map +1 -1
  11. package/dist/api/http.js +3 -2
  12. package/dist/api/http.js.map +1 -1
  13. package/dist/api/live-spec.d.ts +48 -0
  14. package/dist/api/live-spec.d.ts.map +1 -0
  15. package/dist/api/live-spec.js +72 -0
  16. package/dist/api/live-spec.js.map +1 -0
  17. package/dist/api/operations.json +1 -1
  18. package/dist/api/request.d.ts.map +1 -1
  19. package/dist/api/request.js +25 -1
  20. package/dist/api/request.js.map +1 -1
  21. package/dist/api/send.d.ts +10 -1
  22. package/dist/api/send.d.ts.map +1 -1
  23. package/dist/api/send.js +14 -3
  24. package/dist/api/send.js.map +1 -1
  25. package/dist/api/slim.d.ts +14 -0
  26. package/dist/api/slim.d.ts.map +1 -0
  27. package/dist/api/slim.js +174 -0
  28. package/dist/api/slim.js.map +1 -0
  29. package/dist/cache-command.d.ts +12 -0
  30. package/dist/cache-command.d.ts.map +1 -0
  31. package/dist/cache-command.js +93 -0
  32. package/dist/cache-command.js.map +1 -0
  33. package/dist/check/command.d.ts +48 -0
  34. package/dist/check/command.d.ts.map +1 -0
  35. package/dist/check/command.js +256 -0
  36. package/dist/check/command.js.map +1 -0
  37. package/dist/check/external.d.ts +66 -0
  38. package/dist/check/external.d.ts.map +1 -0
  39. package/dist/check/external.js +177 -0
  40. package/dist/check/external.js.map +1 -0
  41. package/dist/check/markdown-links.d.ts +38 -0
  42. package/dist/check/markdown-links.d.ts.map +1 -0
  43. package/dist/check/markdown-links.js +166 -0
  44. package/dist/check/markdown-links.js.map +1 -0
  45. package/dist/cli.js +42 -7
  46. package/dist/cli.js.map +1 -1
  47. package/dist/commands/completion.d.ts.map +1 -1
  48. package/dist/commands/completion.js +17 -0
  49. package/dist/commands/completion.js.map +1 -1
  50. package/dist/commands/context.d.ts.map +1 -1
  51. package/dist/commands/context.js +6 -2
  52. package/dist/commands/context.js.map +1 -1
  53. package/dist/commands/groups-api.d.ts.map +1 -1
  54. package/dist/commands/groups-api.js +20 -2
  55. package/dist/commands/groups-api.js.map +1 -1
  56. package/dist/commands/groups-docs.d.ts.map +1 -1
  57. package/dist/commands/groups-docs.js +8 -2
  58. package/dist/commands/groups-docs.js.map +1 -1
  59. package/dist/commands/groups-jobs.d.ts +10 -0
  60. package/dist/commands/groups-jobs.d.ts.map +1 -0
  61. package/dist/commands/groups-jobs.js +89 -0
  62. package/dist/commands/groups-jobs.js.map +1 -0
  63. package/dist/commands/groups-org.d.ts.map +1 -1
  64. package/dist/commands/groups-org.js +59 -2
  65. package/dist/commands/groups-org.js.map +1 -1
  66. package/dist/commands/groups-site.d.ts.map +1 -1
  67. package/dist/commands/groups-site.js +47 -10
  68. package/dist/commands/groups-site.js.map +1 -1
  69. package/dist/commands/groups-spaces.d.ts.map +1 -1
  70. package/dist/commands/groups-spaces.js +11 -5
  71. package/dist/commands/groups-spaces.js.map +1 -1
  72. package/dist/commands/groups-types.d.ts.map +1 -1
  73. package/dist/commands/groups-types.js +74 -0
  74. package/dist/commands/groups-types.js.map +1 -1
  75. package/dist/commands/groups.d.ts.map +1 -1
  76. package/dist/commands/groups.js +2 -0
  77. package/dist/commands/groups.js.map +1 -1
  78. package/dist/commands/index.d.ts +9 -0
  79. package/dist/commands/index.d.ts.map +1 -1
  80. package/dist/commands/index.js +18 -3
  81. package/dist/commands/index.js.map +1 -1
  82. package/dist/commands/job-wait.d.ts +64 -0
  83. package/dist/commands/job-wait.d.ts.map +1 -0
  84. package/dist/commands/job-wait.js +91 -0
  85. package/dist/commands/job-wait.js.map +1 -0
  86. package/dist/commands/resource.d.ts +19 -0
  87. package/dist/commands/resource.d.ts.map +1 -1
  88. package/dist/commands/resource.js +65 -3
  89. package/dist/commands/resource.js.map +1 -1
  90. package/dist/content/library.d.ts +8 -0
  91. package/dist/content/library.d.ts.map +1 -1
  92. package/dist/content/library.js +10 -2
  93. package/dist/content/library.js.map +1 -1
  94. package/dist/credentials.d.ts +43 -4
  95. package/dist/credentials.d.ts.map +1 -1
  96. package/dist/credentials.js +67 -4
  97. package/dist/credentials.js.map +1 -1
  98. package/dist/dev/command.d.ts +41 -0
  99. package/dist/dev/command.d.ts.map +1 -0
  100. package/dist/dev/command.js +158 -0
  101. package/dist/dev/command.js.map +1 -0
  102. package/dist/doctor/address-checks.d.ts +56 -0
  103. package/dist/doctor/address-checks.d.ts.map +1 -0
  104. package/dist/doctor/address-checks.js +183 -0
  105. package/dist/doctor/address-checks.js.map +1 -0
  106. package/dist/doctor/boilerplate.d.ts +33 -0
  107. package/dist/doctor/boilerplate.d.ts.map +1 -0
  108. package/dist/doctor/boilerplate.js +78 -0
  109. package/dist/doctor/boilerplate.js.map +1 -0
  110. package/dist/doctor/command.d.ts +18 -0
  111. package/dist/doctor/command.d.ts.map +1 -0
  112. package/dist/doctor/command.js +234 -0
  113. package/dist/doctor/command.js.map +1 -0
  114. package/dist/doctor/crawl.d.ts +49 -0
  115. package/dist/doctor/crawl.d.ts.map +1 -0
  116. package/dist/doctor/crawl.js +210 -0
  117. package/dist/doctor/crawl.js.map +1 -0
  118. package/dist/doctor/extended.d.ts +52 -0
  119. package/dist/doctor/extended.d.ts.map +1 -0
  120. package/dist/doctor/extended.js +150 -0
  121. package/dist/doctor/extended.js.map +1 -0
  122. package/dist/doctor/page-checks.d.ts +42 -0
  123. package/dist/doctor/page-checks.d.ts.map +1 -0
  124. package/dist/doctor/page-checks.js +200 -0
  125. package/dist/doctor/page-checks.js.map +1 -0
  126. package/dist/doctor/probe.d.ts +63 -0
  127. package/dist/doctor/probe.d.ts.map +1 -0
  128. package/dist/doctor/probe.js +170 -0
  129. package/dist/doctor/probe.js.map +1 -0
  130. package/dist/doctor/reader-auth-atlas.d.ts +18 -0
  131. package/dist/doctor/reader-auth-atlas.d.ts.map +1 -0
  132. package/dist/doctor/reader-auth-atlas.js +50 -0
  133. package/dist/doctor/reader-auth-atlas.js.map +1 -0
  134. package/dist/doctor/robots-params.d.ts +36 -0
  135. package/dist/doctor/robots-params.d.ts.map +1 -0
  136. package/dist/doctor/robots-params.js +97 -0
  137. package/dist/doctor/robots-params.js.map +1 -0
  138. package/dist/doctor/site.d.ts +42 -0
  139. package/dist/doctor/site.d.ts.map +1 -0
  140. package/dist/doctor/site.js +82 -0
  141. package/dist/doctor/site.js.map +1 -0
  142. package/dist/doctor.d.ts +21 -0
  143. package/dist/doctor.d.ts.map +1 -1
  144. package/dist/doctor.js +94 -3
  145. package/dist/doctor.js.map +1 -1
  146. package/dist/exit-codes.d.ts +40 -0
  147. package/dist/exit-codes.d.ts.map +1 -0
  148. package/dist/exit-codes.js +66 -0
  149. package/dist/exit-codes.js.map +1 -0
  150. package/dist/help-commands.d.ts +13 -0
  151. package/dist/help-commands.d.ts.map +1 -0
  152. package/dist/help-commands.js +215 -0
  153. package/dist/help-commands.js.map +1 -0
  154. package/dist/help.d.ts +1 -1
  155. package/dist/help.d.ts.map +1 -1
  156. package/dist/help.js +74 -11
  157. package/dist/help.js.map +1 -1
  158. package/dist/io.d.ts +33 -0
  159. package/dist/io.d.ts.map +1 -0
  160. package/dist/io.js +81 -0
  161. package/dist/io.js.map +1 -0
  162. package/dist/preview-comment.d.ts +20 -0
  163. package/dist/preview-comment.d.ts.map +1 -0
  164. package/dist/preview-comment.js +88 -0
  165. package/dist/preview-comment.js.map +1 -0
  166. package/dist/publish/about.d.ts +23 -0
  167. package/dist/publish/about.d.ts.map +1 -0
  168. package/dist/publish/about.js +66 -0
  169. package/dist/publish/about.js.map +1 -0
  170. package/dist/publish/api.d.ts +30 -12
  171. package/dist/publish/api.d.ts.map +1 -1
  172. package/dist/publish/api.js +62 -10
  173. package/dist/publish/api.js.map +1 -1
  174. package/dist/publish/client.d.ts +19 -0
  175. package/dist/publish/client.d.ts.map +1 -0
  176. package/dist/publish/client.js +3 -0
  177. package/dist/publish/client.js.map +1 -0
  178. package/dist/publish/command.d.ts +51 -2
  179. package/dist/publish/command.d.ts.map +1 -1
  180. package/dist/publish/command.js +157 -17
  181. package/dist/publish/command.js.map +1 -1
  182. package/dist/publish/context.d.ts +12 -1
  183. package/dist/publish/context.d.ts.map +1 -1
  184. package/dist/publish/context.js.map +1 -1
  185. package/dist/publish/diff.d.ts +21 -0
  186. package/dist/publish/diff.d.ts.map +1 -0
  187. package/dist/publish/diff.js +96 -0
  188. package/dist/publish/diff.js.map +1 -0
  189. package/dist/publish/docs-apply.d.ts +8 -1
  190. package/dist/publish/docs-apply.d.ts.map +1 -1
  191. package/dist/publish/docs-apply.js +49 -10
  192. package/dist/publish/docs-apply.js.map +1 -1
  193. package/dist/publish/docs-plan.d.ts +16 -3
  194. package/dist/publish/docs-plan.d.ts.map +1 -1
  195. package/dist/publish/docs-plan.js +57 -6
  196. package/dist/publish/docs-plan.js.map +1 -1
  197. package/dist/publish/extras.d.ts +10 -0
  198. package/dist/publish/extras.d.ts.map +1 -1
  199. package/dist/publish/extras.js +54 -2
  200. package/dist/publish/extras.js.map +1 -1
  201. package/dist/publish/frontmatter.d.ts +1 -1
  202. package/dist/publish/frontmatter.d.ts.map +1 -1
  203. package/dist/publish/frontmatter.js +1 -0
  204. package/dist/publish/frontmatter.js.map +1 -1
  205. package/dist/publish/index.d.ts +12 -0
  206. package/dist/publish/index.d.ts.map +1 -0
  207. package/dist/publish/index.js +17 -0
  208. package/dist/publish/index.js.map +1 -0
  209. package/dist/publish/manifest.d.ts.map +1 -1
  210. package/dist/publish/manifest.js +48 -3
  211. package/dist/publish/manifest.js.map +1 -1
  212. package/dist/publish/names.d.ts +28 -0
  213. package/dist/publish/names.d.ts.map +1 -0
  214. package/dist/publish/names.js +80 -0
  215. package/dist/publish/names.js.map +1 -0
  216. package/dist/publish/posts.d.ts.map +1 -1
  217. package/dist/publish/posts.js +46 -13
  218. package/dist/publish/posts.js.map +1 -1
  219. package/dist/publish/preview.d.ts +56 -0
  220. package/dist/publish/preview.d.ts.map +1 -0
  221. package/dist/publish/preview.js +133 -0
  222. package/dist/publish/preview.js.map +1 -0
  223. package/dist/publish/redirects.d.ts +13 -0
  224. package/dist/publish/redirects.d.ts.map +1 -0
  225. package/dist/publish/redirects.js +154 -0
  226. package/dist/publish/redirects.js.map +1 -0
  227. package/dist/publish/reserved.d.ts +49 -0
  228. package/dist/publish/reserved.d.ts.map +1 -0
  229. package/dist/publish/reserved.js +118 -0
  230. package/dist/publish/reserved.js.map +1 -0
  231. package/dist/publish/rewrite.d.ts +12 -0
  232. package/dist/publish/rewrite.d.ts.map +1 -1
  233. package/dist/publish/rewrite.js +22 -0
  234. package/dist/publish/rewrite.js.map +1 -1
  235. package/dist/publish/scan-docs.d.ts +10 -0
  236. package/dist/publish/scan-docs.d.ts.map +1 -0
  237. package/dist/publish/scan-docs.js +160 -0
  238. package/dist/publish/scan-docs.js.map +1 -0
  239. package/dist/publish/scan.d.ts +21 -17
  240. package/dist/publish/scan.d.ts.map +1 -1
  241. package/dist/publish/scan.js +99 -232
  242. package/dist/publish/scan.js.map +1 -1
  243. package/dist/publish/slots.d.ts +39 -0
  244. package/dist/publish/slots.d.ts.map +1 -0
  245. package/dist/publish/slots.js +64 -0
  246. package/dist/publish/slots.js.map +1 -0
  247. package/dist/publish/studio-edits.d.ts +25 -0
  248. package/dist/publish/studio-edits.d.ts.map +1 -0
  249. package/dist/publish/studio-edits.js +53 -0
  250. package/dist/publish/studio-edits.js.map +1 -0
  251. package/dist/publish/tags.d.ts +9 -0
  252. package/dist/publish/tags.d.ts.map +1 -0
  253. package/dist/publish/tags.js +194 -0
  254. package/dist/publish/tags.js.map +1 -0
  255. package/dist/publish/types.d.ts +84 -1
  256. package/dist/publish/types.d.ts.map +1 -1
  257. package/dist/publish/types.js +0 -10
  258. package/dist/publish/types.js.map +1 -1
  259. package/dist/publish-command.d.ts +55 -0
  260. package/dist/publish-command.d.ts.map +1 -0
  261. package/dist/publish-command.js +197 -0
  262. package/dist/publish-command.js.map +1 -0
  263. package/dist/run.d.ts +3 -10
  264. package/dist/run.d.ts.map +1 -1
  265. package/dist/run.js +171 -112
  266. package/dist/run.js.map +1 -1
  267. package/dist/translations/target.d.ts.map +1 -1
  268. package/dist/translations/target.js +2 -2
  269. package/dist/translations/target.js.map +1 -1
  270. package/dist/validate.d.ts +39 -0
  271. package/dist/validate.d.ts.map +1 -0
  272. package/dist/validate.js +166 -0
  273. package/dist/validate.js.map +1 -0
  274. package/dist/version.d.ts +8 -0
  275. package/dist/version.d.ts.map +1 -0
  276. package/dist/version.js +11 -0
  277. package/dist/version.js.map +1 -0
  278. package/dist/whoami.d.ts +41 -0
  279. package/dist/whoami.d.ts.map +1 -0
  280. package/dist/whoami.js +161 -0
  281. package/dist/whoami.js.map +1 -0
  282. package/package.json +2 -2
  283. package/dist/publish-dir.d.ts +0 -54
  284. package/dist/publish-dir.d.ts.map +0 -1
  285. package/dist/publish-dir.js +0 -119
  286. package/dist/publish-dir.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-commands.d.ts","sourceRoot":"","sources":["../src/help-commands.ts"],"names":[],"mappings":"AAsBA,eAAO,MAAM,YAAY,+3IAmEN,CAAC;AAEpB,eAAO,MAAM,SAAS,u6BAYH,CAAC;AAEpB,eAAO,MAAM,QAAQ,4jBAQF,CAAC;AAEpB,eAAO,MAAM,UAAU,mxBAWJ,CAAC;AAEpB,eAAO,MAAM,WAAW,2dAOL,CAAC;AAEpB,eAAO,MAAM,aAAa,ueAMP,CAAC;AAEpB,eAAO,MAAM,gBAAgB,0hBAQV,CAAC;AAEpB,eAAO,MAAM,YAAY,i5BAYN,CAAC;AAEpB,eAAO,MAAM,WAAW,o7BAYL,CAAC;AAEpB,eAAO,MAAM,iBAAiB,gxCAkBX,CAAC;AAEpB,iFAAiF;AACjF,eAAO,MAAM,YAAY,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAkBzD,CAAC"}
@@ -0,0 +1,215 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.COMMAND_HELP = exports.TRANSLATIONS_HELP = exports.IMPORT_HELP = exports.CONTENT_HELP = exports.CONFORMANCE_HELP = exports.SNAPSHOT_HELP = exports.LOGOUT_HELP = exports.LOGIN_HELP = exports.DEV_HELP = exports.SYNC_HELP = exports.PUBLISH_HELP = void 0;
4
+ const validate_1 = require("./validate");
5
+ const command_1 = require("./doctor/command");
6
+ const exit_codes_1 = require("./exit-codes");
7
+ const whoami_1 = require("./whoami");
8
+ const cache_command_1 = require("./cache-command");
9
+ // `forumulate check links` — its help lives beside the command it documents.
10
+ const command_2 = require("./check/command");
11
+ /**
12
+ * Each top-level command's own `--help` (FMU-B14).
13
+ *
14
+ * `publish --help` and `doctor --help` printed the global help — a page about
15
+ * everything, saying almost nothing about the command asked for: not every
16
+ * flag, not the `forumulate.yaml` keys, not the exit codes, no example. The
17
+ * resource groups always printed their own; these are the commands that did
18
+ * not. `help-commands.test.ts` walks every top-level command and fails when one
19
+ * falls back to the global page again.
20
+ */
21
+ const OUTPUT = `Output (every command):
22
+ --json the result as JSON on stdout; progress and warnings go to stderr
23
+ --out <file> write stdout to a file instead (never truncated, exit 1 if the write fails)`;
24
+ exports.PUBLISH_HELP = `forumulate publish — publish a folder of Markdown into a space
25
+
26
+ Usage:
27
+ forumulate publish <folder> --org <id|slug> --space <id|slug> [flags]
28
+
29
+ (org: and space: may come from forumulate.yaml, FORUMULATE_ORG / FORUMULATE_SPACE
30
+ or \`forumulate config set\` instead of the flags.)
31
+
32
+ One folder per collection, front matter for titles, slugs, order and SEO, assets
33
+ uploaded once by content hash. A re-run changes only what changed, then reads the
34
+ space back and fails if anything did not land.
35
+
36
+ Flags:
37
+ --dry-run print the plan; write nothing (no token needed for a public space)
38
+ --prune move pages/posts/collections with no file to the trash
39
+ --only a,b just these slugs, files, folders, or manifest parts
40
+ (site, theme, settings, openapi, monitors)
41
+ --force re-send every page even if it looks unchanged, AND overwrite pages
42
+ edited in the studio since the last publish
43
+ --purge page|space|none
44
+ what to drop from the cache when done (default page): page = every
45
+ page this run changed; space = the whole space (a title in the
46
+ navigation changed); none = leave the CDN alone. Reported per CDN.
47
+ --no-verify skip the read-back --pace <ms> gap between writes (250)
48
+ --manifest <file> a forumulate.yaml somewhere else
49
+ --diff print the changed paragraphs and fields of each update
50
+ --no-report do not record this run (publish.completed is not sent)
51
+ --json one JSON summary: {space, created, updated, unchanged, trashed,
52
+ purged, verify, diffUrl, runId, lines, errors}
53
+ --out <file> write that output to a file
54
+ --preview <name> publish nothing: send the pages this run would add or change (and
55
+ with --prune, remove) to a preview named <name> (pr-123) and print
56
+ its link — the space as the change would publish it, on its own
57
+ addresses, for 7 days (previews.ttl_days). Same name again: same
58
+ link, renewed. --json adds previews[{urls, summary, comment}].
59
+ --preview-ttl <d> a shorter life for the preview link, in days
60
+ --comment with --preview in CI: post the link and diff table on the pull
61
+ request (GitHub, Gitea, GitLab, Bitbucket; GITHUB_TOKEN /
62
+ GITEA_TOKEN / GITLAB_TOKEN / BITBUCKET_TOKEN), editing it on re-runs
63
+
64
+ Studio edits: a page edited in the studio (or through the API) since this folder was
65
+ last published is not overwritten. The run stops before writing and prints
66
+ CONFLICT <slug> edited in studio by <name> at <time>
67
+ Pull the change into the file, or re-run with --force to overwrite it.
68
+
69
+ forumulate.yaml keys:
70
+ org, space where to publish (one space), or
71
+ spaces: [{path, space, create: {type, name, visibility}, rootCollection,
72
+ theme, settings, tags, openapi: [{file|url, collection, ...}], monitors,
73
+ redirects: [{from, to, status?, type?}] or a CSV file name,
74
+ redirects are merged into the space's table, never replaced
75
+ about: {...} | about.yaml (an ABOUT space's parts)}]
76
+ site: {...} the site configuration (applied with PATCH semantics)
77
+ theme: {...} the space theme
78
+ Guide: https://forumulate.com/guides/content-as-code
79
+
80
+ Older forms (deprecated; they print a notice on stderr):
81
+ publish <orgId> <spaceId> <folder> → publish <folder> --org … --space …
82
+ publish <orgId> <spaceId> <pageId> → forumulate items publish <pageId> --space …
83
+
84
+ Examples:
85
+ forumulate publish docs --org acme --space docs --dry-run
86
+ forumulate publish docs --org acme --space docs --purge space --json --out run.json
87
+ forumulate publish docs --org acme --space docs --preview pr-123 --comment
88
+
89
+ ${OUTPUT}
90
+
91
+ ${exit_codes_1.EXIT_CODES_HELP}`;
92
+ exports.SYNC_HELP = `forumulate sync — the same folder publish, plan by default
93
+
94
+ Usage:
95
+ forumulate sync <folder> [--apply] [--prune] [--diff] [--org …] [--space …]
96
+
97
+ Without --apply it plans and writes nothing; with --apply it is \`publish\`.
98
+ Takes every publish flag (--only, --force, --purge, --no-verify, --pace,
99
+ --manifest, --json). See \`forumulate publish --help\` for them and the
100
+ forumulate.yaml keys.
101
+
102
+ ${OUTPUT}
103
+
104
+ ${exit_codes_1.EXIT_CODES_HELP}`;
105
+ exports.DEV_HELP = `forumulate dev — preview a folder of Markdown locally
106
+
107
+ Usage:
108
+ forumulate dev <folder> --org <id|slug> --space <id|slug> [--port 4321] [--site <url>]
109
+
110
+ Renders with your space's own renderer and reloads on save. Nothing is written
111
+ to the space.
112
+
113
+ ${exit_codes_1.EXIT_CODES_HELP}`;
114
+ exports.LOGIN_HELP = `forumulate login — store a token for this API
115
+
116
+ Usage:
117
+ forumulate login [--token <pat>] (asks for it, hidden, when not given)
118
+
119
+ The token is checked against the API first, then stored in
120
+ ~/.config/forumulate/credentials.json (mode 0600), keyed by API base, so a
121
+ staging token is never sent to production. On every later command a
122
+ --token beats FORUMULATE_TOKEN, which beats the stored token.
123
+ Mint a token at https://forumulate.com/account/tokens
124
+
125
+ ${exit_codes_1.EXIT_CODES_HELP}`;
126
+ exports.LOGOUT_HELP = `forumulate logout — forget the stored token for this API
127
+
128
+ Usage:
129
+ forumulate logout
130
+
131
+ Warns when FORUMULATE_TOKEN is still set, because it still wins.
132
+
133
+ ${exit_codes_1.EXIT_CODES_HELP}`;
134
+ exports.SNAPSHOT_HELP = `forumulate snapshot — save a version snapshot of a space
135
+
136
+ Usage:
137
+ forumulate snapshot <orgId> <spaceId> <label…> [--json]
138
+ (also: forumulate snapshots --help)
139
+
140
+ ${exit_codes_1.EXIT_CODES_HELP}`;
141
+ exports.CONFORMANCE_HELP = `forumulate conformance — run the Content Sync Protocol suite
142
+
143
+ Usage:
144
+ forumulate conformance <collectionUrl> [--json]
145
+
146
+ Runs against any platform's collection endpoint, ours included. Exit 1 when a
147
+ check fails.
148
+
149
+ ${exit_codes_1.EXIT_CODES_HELP}`;
150
+ exports.CONTENT_HELP = `forumulate content — a content library's model as code
151
+
152
+ Usage:
153
+ forumulate content types --library <id|slug> [--org …] [--out forumulate.d.ts]
154
+ [--preview] [--schema <file>] [--check]
155
+ forumulate content pull --library <id|slug> [--format json|payload] [--out <file>]
156
+ forumulate content push [file] [--library …] [--dry-run] [--yes] [--force]
157
+ [--rename type.field=new | block:hero.field=new | library:field=new]
158
+ [--rename-type old=new] [--rename-block old=new]
159
+
160
+ Here --out names the file the command writes (not a stdout redirect).
161
+
162
+ ${exit_codes_1.EXIT_CODES_HELP}`;
163
+ exports.IMPORT_HELP = `forumulate import — bring another CMS's content into a library
164
+
165
+ Usage:
166
+ forumulate import <payload|contentful|sanity|strapi|wordpress> <export path>
167
+ --library <id|slug> [--org …] [--dry-run] [--yes]
168
+ [--config payload.config.ts] [--publish source|all|none]
169
+ [--allow-model-removals] [--pace <ms>] [--base-url <url>]
170
+
171
+ Always shows a dry run first; a re-run updates what a previous import made.
172
+
173
+ ${OUTPUT}
174
+
175
+ ${exit_codes_1.EXIT_CODES_HELP}`;
176
+ exports.TRANSLATIONS_HELP = `forumulate translations (alias i18n) — every translation capability
177
+
178
+ Usage:
179
+ forumulate translations locales list|add|relabel|remove|set [--space …|--library …]
180
+ forumulate translations status [--locale es,fr] [--fail-on missing,outdated]
181
+ forumulate translations pull [--out translations] [--locale …] [--only …]
182
+ forumulate translations push [dir] [--dry-run]
183
+ forumulate translations auto --locale es [--state missing,outdated] [--publish]
184
+ forumulate translations labels|overrides pull|push [file] [--format json|xliff]
185
+ forumulate translations item-locale <itemId> <locale|none>
186
+ forumulate translations remove <pieceId> <locale> --yes
187
+ forumulate translations entry <entryId> <locale> [--fields f.json]
188
+ forumulate translations name <locale> <name…>
189
+ forumulate translations switcher get|set <f.json>
190
+ forumulate translations provider status|connect|disconnect
191
+
192
+ Here --out names the folder or file the command writes.
193
+
194
+ ${exit_codes_1.EXIT_CODES_HELP}`;
195
+ /** The command → its own help. A command missing here prints the global help. */
196
+ exports.COMMAND_HELP = {
197
+ publish: exports.PUBLISH_HELP,
198
+ sync: exports.SYNC_HELP,
199
+ dev: exports.DEV_HELP,
200
+ doctor: command_1.DOCTOR_HELP,
201
+ validate: validate_1.VALIDATE_HELP,
202
+ login: exports.LOGIN_HELP,
203
+ logout: exports.LOGOUT_HELP,
204
+ whoami: whoami_1.WHOAMI_HELP,
205
+ auth: whoami_1.WHOAMI_HELP,
206
+ cache: cache_command_1.CACHE_HELP,
207
+ snapshot: exports.SNAPSHOT_HELP,
208
+ conformance: exports.CONFORMANCE_HELP,
209
+ content: exports.CONTENT_HELP,
210
+ import: exports.IMPORT_HELP,
211
+ translations: exports.TRANSLATIONS_HELP,
212
+ i18n: exports.TRANSLATIONS_HELP,
213
+ check: command_2.CHECK_HELP,
214
+ };
215
+ //# sourceMappingURL=help-commands.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"help-commands.js","sourceRoot":"","sources":["../src/help-commands.ts"],"names":[],"mappings":";;;AAAA,yCAA2C;AAC3C,8CAA+C;AAC/C,6CAA+C;AAC/C,qCAAuC;AACvC,mDAA6C;AAC7C,6EAA6E;AAC7E,6CAAiE;A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,yBAAiB;IACvB,KAAK,EAAE,oBAAgB;CACxB,CAAC"}
package/dist/help.d.ts CHANGED
@@ -1,3 +1,3 @@
1
1
  /** `forumulate help`. The resource groups print their own (`forumulate spaces --help`). */
2
- export declare const HELP = "forumulate \u2014 Forumulate command-line interface\n\nUsage:\n forumulate <command> [args]\n\nCommands:\n login [--token <pat>] Store a token for this API, so every other\n command stops needing FORUMULATE_TOKEN in\n the environment\n logout Forget the stored token\n whoami Show the authenticated user\n config set|get|unset|list Defaults: org, space, library, api-version\n (`forumulate config set org acme`)\n\nEvery API operation:\n api list [--tag t] [--search w] Discover operations and their summaries\n api describe <operationId> Parameters and body schema, as flags\n api <operationId> [args] [flags] Call it: --<param> value, --data @f.json,\n api <METHOD> <path> [flags] --field a.b=v, --paginate, --json\n\nResources (each: <group> --help lists its verbs and the operation each calls):\n Org: orgs | members | invites | groups | roles | service-accounts (bots)\n tokens (pats) | webhooks | extensions | audit\n Spaces: spaces | snapshots | shape | domains | assets | space-types (types)\n Docs: items (pages) | docs | collections | versions | change-requests (crs)\n openapi | sdks | github (git)\n Content: blog | forum | changelog | roadmap | status | events | course\n careers | forms (blog/forum/changelog/status: translations \u2026)\n CMS: libraries | entries | media | releases | environments (envs)\n Site: theme | sites | reader\n search <query...> [--org] e.g. spaces create Docs --slug docs --type DOCS\n items create --space docs --file a.md --publish\n docs schedule set <pageId> <when> --space docs\n webhooks deliveries <id>; webhooks replay <id> <d>\n --out <file> where a file answer goes (SDK archive, PDF, CSV export)\n completion bash|zsh|fish Shell completion script\n\nOlder forms, unchanged:\n orgs List your organizations\n spaces <orgId> List spaces in an org\n items <orgId> <spaceId> List what is in a space, with where each\n piece's content lives\n search <orgId> <query...> Unified search across docs/forum/blog\n publish <folder> Publish a folder of Markdown: one folder per\n collection, front matter, assets, order,\n and a forumulate.yaml manifest for space,\n site, theme, OpenAPI and monitors. Re-runs\n change only what changed, then read back.\n --org <id|slug> --space <id|slug> (or org:/space: in the manifest)\n --dry-run print the plan, write nothing (no token needed for a\n public space)\n --prune remove pages/posts/collections with no file (to the trash)\n --only a,b just these slugs, files, folders, or manifest parts\n (site, theme, settings, openapi, monitors)\n --force re-send every page even if it looks unchanged\n --no-verify skip the read-back --pace <ms> gap between writes\n --manifest <file> a manifest somewhere else\n publish <orgId> <spaceId> <pageId> Publish a page\n publish <orgId> <spaceId> <dir> The folder form, with org and space given\n domains <orgId> <spaceId> List this space's domains and their state\n domains verify <orgId> <spaceId> <hostname>\n Re-run verification and say what is missing\n snapshot <orgId> <spaceId> <label> Create a space version snapshot\n content types --library <id|slug> TypeScript for a content library's model:\n collections, globals, the block union\n [--org <id|slug>] [--out forumulate.d.ts] [--preview] [--schema <file>]\n [--check] fail (exit 1) when the file is out of date, write nothing\n content pull --library <id|slug> Write the model to forumulate.content.json\n [--format json|payload] [--out <file>] (payload: forumulate.payload.ts)\n content push [file] Show the diff against the library, then\n apply it as a new model version\n [--library \u2026] [--dry-run] [--yes] [--force]\n [--rename type.field=new | block:hero.field=new | library:field=new]\n [--rename-type old=new] [--rename-block old=new]\n import <payload|contentful|sanity|strapi|wordpress> <export path>\n Bring another CMS's content into a library:\n model, media, entries, references (always\n shows a dry run first)\n Re-running updates entries a\n previous import made. strapi takes a\n folder or an unencrypted export .tar.gz\n --library <id|slug> [--org \u2026] [--dry-run] [--yes]\n [--config payload.config.ts] (payload) the config that becomes the model\n [--publish source|all|none] what to publish (default: what was live)\n [--allow-model-removals] [--pace <ms>] [--base-url <url>] (strapi uploads)\n translations (alias i18n) Every translation capability, one vocabulary\n locales list|add|relabel|remove|set a space's (--space) or library's\n (--library) languages; set es=Espa\u00F1ol fr [--prune] is exact\n status each piece \u00D7 language: missing/draft/published/outdated\n [--locale es,fr] [--fail-on missing,outdated] (exit 1)\n pull one Markdown file per piece per language \u2192 [--out translations]\n [--locale \u2026] [--only slug,\u2026] [--include-missing] (stubs)\n push [dir] diff the files against the API, write what changed [--dry-run]\n auto machine-translate with YOUR DeepL/AI key --locale es\n [--state missing,outdated] [--only \u2026] [--force] [--publish]\n [--library \u2026 --entry id,\u2026] [--dry-run]\n labels pull|push [file] chrome words (--site <id> | --space \u2026)\n overrides pull|push [file] org UI string overrides [--prune]\n [--format json|xliff] for labels and overrides\n item-locale <itemId> <locale|none> correct a piece's declared language\n remove <pieceId> <locale> one translation (--yes)\n entry <entryId> <locale> a library entry's twin [--fields f.json]\n name <locale> <name\u2026> a space's (or --collection's) name\n switcher get|set <f.json> the org's reader language switcher\n provider status|connect|disconnect your DeepL key (DEEPL_API_KEY)\n conformance <collectionUrl> Run the Content Sync Protocol suite against\n any platform's collection endpoint\n doctor <readerUrl> Check a live site from the outside: health,\n public read, canonical, cache headers,\n crawler access, feeds, HTML rewriting\n help Show this help\n\nEnvironment:\n FORUMULATE_TOKEN Personal Access Token (Bearer). Overrides a stored one, so\n CI keeps working exactly as it did. Mint one at\n https://forumulate.com/account/tokens\n FORUMULATE_URL The site (default https://forumulate.com); the API is its\n /api, i.e. https://forumulate.com/api. A value already\n ending in /api is used as-is.\n FORUMULATE_API_URL Exact API base, for a local API with no /api prefix\n (http://localhost:4000). Wins over FORUMULATE_URL.\n FORUMULATE_ORG, FORUMULATE_SPACE, FORUMULATE_LIBRARY\n Defaults for --org, --space and --library; they beat\n `forumulate config set`, a flag beats both.\n FORUMULATE_API_VERSION\n Forumulate-Version for api/resource commands\n (default 2026-12-01).\n\nThe SDK (ForumulateClient.fromEnv) and the MCP server (@forumulate/mcp) read\nthe same variables. Guide: https://forumulate.com/guides/api-tokens-and-scopes\n\nFlags:\n --json Emit raw JSON instead of a formatted summary\n --dry-run (api, resources) print the request instead of sending it\n --dry-run Plan the work and write nothing (publish of a directory)\n --version Print the CLI version\n";
2
+ export declare const HELP = "forumulate \u2014 Forumulate command-line interface\n\nUsage:\n forumulate <command> [args]\n\nCommands:\n login [--token <pat>] Store a token for this API, so every other\n command stops needing FORUMULATE_TOKEN in\n the environment\n logout Forget the stored token\n whoami [--json] Who you are, and WHICH token: its source (--token,\n FORUMULATE_TOKEN or credentials.json), id, name,\n last 4, expiry, narrowing and the API base\n auth status [--json] The same report, for scripts\n config set|get|unset|list Defaults: org, space, library, api-version\n (`forumulate config set org acme`)\n\nEvery API operation:\n api list [--tag t] [--search w] Discover operations and their summaries\n [--refresh] ...from the live API's spec, not the bundled one\n api describe <operationId> Parameters and body schema, as flags\n api <operationId> [args] [flags] Call it: --<param> value, --data @f.json,\n api <METHOD> <path> [flags] --field a.b=v, --paginate, --json\n\nResources (each: <group> --help lists its verbs and the operation each calls):\n Org: orgs | members | invites | groups | roles | service-accounts (bots)\n tokens (pats) | keys | integration-tokens (int-tokens)\n webhooks | extensions | audit\n Spaces: spaces | snapshots | shape | domains | assets | space-types (types)\n Docs: items (pages) | docs | collections | versions | change-requests (crs)\n openapi | sdks | github (git)\n Content: blog | forum | changelog | roadmap | status | events | course\n careers | forms (blog/forum/changelog/status: translations \u2026)\n CMS: libraries | entries | media | releases | environments (envs)\n Site: theme | sites | reader\n Jobs: jobs | backups | imports | manifest (starters take --wait [--timeout s])\n search <query...> [--org] e.g. spaces create Docs --slug docs --type DOCS\n items create --space docs --file a.md --publish\n docs schedule set <pageId> <when> --space docs\n webhooks deliveries <id>; webhooks replay <id> <d>\n --out <file> where a file answer goes (SDK archive, PDF, CSV export)\n cache purge --space <s> [--page p] Drop cached copies (web tier + every CDN); deletes\n nothing\n completion bash|zsh|fish Shell completion script\n\nOlder forms, unchanged:\n orgs List your organizations\n spaces <orgId> List spaces in an org\n items <orgId> <spaceId> List what is in a space, with where each\n piece's content lives\n search <orgId> <query...> Unified search across docs/forum/blog\n dev <folder> Preview a folder of Markdown locally, rendered\n by your space's own renderer; reloads on save.\n --org <id> --space <id> [--port 4321] [--site <your docs URL>]\n publish <folder> --org <o> --space <s>\n Publish a folder of Markdown: one folder per\n collection, front matter, assets, order,\n and a forumulate.yaml manifest for space,\n site, theme, OpenAPI and monitors. Re-runs\n change only what changed, then read back.\n --org <id|slug> --space <id|slug> (or org:/space: in the manifest)\n --dry-run print the plan, write nothing (no token needed for a\n public space)\n --prune remove pages/posts/collections with no file (to the trash)\n --only a,b just these slugs, files, folders, or manifest parts\n (site, theme, settings, openapi, monitors)\n --force re-send every page even if it looks unchanged\n --no-verify skip the read-back --pace <ms> gap between writes\n --manifest <file> a manifest somewhere else\n --diff print the changed paragraphs and fields of each update\n --purge page|space|none what to drop from the cache (default page),\n reported per CDN\n --json one summary: created, updated, unchanged, trashed, purged,\n verify, diffUrl (the run is recorded; publish.completed fires)\n Pages edited in the studio since the last publish are not overwritten\n without --force. Full reference: forumulate publish --help\n sync <folder> Content as code: the same folder publish,\n PLAN BY DEFAULT. Posts (blog), pages\n (docs, custom, legal), FAQ questions,\n changelog releases and blog categories,\n matched by slug; images uploaded once by\n content hash; README, LICENSE, _drafts/,\n dotfiles skipped. Guide:\n https://forumulate.com/guides/content-as-code\n --apply write the plan (then read it back)\n --prune also remove what has no file (to the trash)\n --diff print the changed paragraphs and fields of each update\n --org, --space, --only, --force, --no-verify, --pace, --manifest, --json\n as for publish\n check links [folder] Broken internal links, #anchors, pictures and\n (--external) outside links in a folder, before\n publishing; exit 1 when any is broken\n --space <s> [--org <o>] the same report for a published space\n --allow-redirect <hosts> --ignore <text> --json\n publish <folder> --preview <name> Send the change to a preview link instead of\n publishing it (--comment posts it on the PR)\n publish <orgId> <spaceId> <pageId> (deprecated) Publish a page \u2014 use items publish\n publish <orgId> <spaceId> <dir> (deprecated) \u2014 use publish <dir> --org --space\n domains <orgId> <spaceId> List this space's domains and their state\n domains verify <orgId> <spaceId> <hostname>\n Re-run verification and say what is missing\n snapshot <orgId> <spaceId> <label> Create a space version snapshot\n content types --library <id|slug> TypeScript for a content library's model:\n collections, globals, the block union\n [--org <id|slug>] [--out forumulate.d.ts] [--preview] [--schema <file>]\n [--check] fail (exit 1) when the file is out of date, write nothing\n content pull --library <id|slug> Write the model to forumulate.content.json\n [--format json|payload] [--out <file>] (payload: forumulate.payload.ts)\n content push [file] Show the diff against the library, then\n apply it as a new model version\n [--library \u2026] [--dry-run] [--yes] [--force]\n [--rename type.field=new | block:hero.field=new | library:field=new]\n [--rename-type old=new] [--rename-block old=new]\n import <payload|contentful|sanity|strapi|wordpress> <export path>\n Bring another CMS's content into a library:\n model, media, entries, references (always\n shows a dry run first)\n Re-running updates entries a\n previous import made. strapi takes a\n folder or an unencrypted export .tar.gz\n --library <id|slug> [--org \u2026] [--dry-run] [--yes]\n [--config payload.config.ts] (payload) the config that becomes the model\n [--publish source|all|none] what to publish (default: what was live)\n [--allow-model-removals] [--pace <ms>] [--base-url <url>] (strapi uploads)\n translations (alias i18n) Every translation capability, one vocabulary\n locales list|add|relabel|remove|set a space's (--space) or library's\n (--library) languages; set es=Espa\u00F1ol fr [--prune] is exact\n status each piece \u00D7 language: missing/draft/published/outdated\n [--locale es,fr] [--fail-on missing,outdated] (exit 1)\n pull one Markdown file per piece per language \u2192 [--out translations]\n [--locale \u2026] [--only slug,\u2026] [--include-missing] (stubs)\n push [dir] diff the files against the API, write what changed [--dry-run]\n auto machine-translate with YOUR DeepL/AI key --locale es\n [--state missing,outdated] [--only \u2026] [--force] [--publish]\n [--library \u2026 --entry id,\u2026] [--dry-run]\n labels pull|push [file] chrome words (--site <id> | --space \u2026)\n overrides pull|push [file] org UI string overrides [--prune]\n [--format json|xliff] for labels and overrides\n item-locale <itemId> <locale|none> correct a piece's declared language\n remove <pieceId> <locale> one translation (--yes)\n entry <entryId> <locale> a library entry's twin [--fields f.json]\n name <locale> <name\u2026> a space's (or --collection's) name\n switcher get|set <f.json> the org's reader language switcher\n provider status|connect|disconnect your DeepL key (DEEPL_API_KEY)\n conformance <collectionUrl> Run the Content Sync Protocol suite against\n any platform's collection endpoint\n validate [dir] Check forumulate.yaml, front matter and $schema\n files against the published schemas, with\n did-you-mean hints. --json; exit 2 if invalid\n doctor <readerUrl> | --site <s> Check a live site from the outside: health,\n canonical on both addresses, sitemap, cache\n consistency, root redirect, descriptions,\n llms.txt, favicon, consent tag, white-label\n leaks. --json; exit 1 on any FAIL\n help [command] Show this help, or a command's own\n (every command also takes --help)\n\nEnvironment:\n FORUMULATE_TOKEN Personal Access Token (Bearer). Overrides a stored one, so\n CI keeps working exactly as it did; --token overrides it.\n Mint one at\n https://forumulate.com/account/tokens\n FORUMULATE_URL The site (default https://forumulate.com); the API is its\n /api, i.e. https://forumulate.com/api. A value already\n ending in /api is used as-is.\n FORUMULATE_API_URL Exact API base, for a local API with no /api prefix\n (http://localhost:4000). Wins over FORUMULATE_URL.\n FORUMULATE_ORG, FORUMULATE_SPACE, FORUMULATE_LIBRARY\n Defaults for --org, --space and --library; they beat\n `forumulate config set`, a flag beats both.\n FORUMULATE_API_VERSION\n Forumulate-Version for api/resource commands\n (default 2026-12-01).\n\nThe SDK (ForumulateClient.fromEnv) and the MCP server (@forumulate/mcp) read\nthe same variables. Guide: https://forumulate.com/guides/api-tokens-and-scopes\n\nEvery FORUMULATE_* variable not listed above is reported (with the one you\nprobably meant) by `forumulate whoami` and on any authentication failure.\n\nFlags:\n --json Emit raw JSON instead of a formatted summary (stdout only;\n progress and warnings go to stderr)\n --out <file> Write stdout to a file (never truncated; non-zero exit if the\n write fails). content/translations use --out for their own file\n --jsonl With --paginate: one JSON row per line, streamed\n --token <pat> The token for this run, on every command. Precedence:\n --token, then FORUMULATE_TOKEN, then credentials.json. On an\n operation with a `token` parameter of its own (registries\n set, github connect, domains acme-challenge) the flag is that\n parameter; set FORUMULATE_TOKEN for the PAT there\n --dry-run (api, resources) print the request instead of sending it\n --dry-run Plan the work and write nothing (publish of a directory)\n --version Print the CLI version\n\nExit status:\n 0 ok 1 failed (verification mismatch, doctor FAIL) 2 usage\n 3 auth (no token, 401, token not allowed) 4 not found\n 5 conflict (409/412, edited in the studio since your last publish)\n";
3
3
  //# sourceMappingURL=help.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,IAAI,ipRAwIhB,CAAC"}
1
+ {"version":3,"file":"help.d.ts","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":"AAAA,2FAA2F;AAC3F,eAAO,MAAM,IAAI,0iaAuMhB,CAAC"}
package/dist/help.js CHANGED
@@ -12,19 +12,24 @@ Commands:
12
12
  command stops needing FORUMULATE_TOKEN in
13
13
  the environment
14
14
  logout Forget the stored token
15
- whoami Show the authenticated user
15
+ whoami [--json] Who you are, and WHICH token: its source (--token,
16
+ FORUMULATE_TOKEN or credentials.json), id, name,
17
+ last 4, expiry, narrowing and the API base
18
+ auth status [--json] The same report, for scripts
16
19
  config set|get|unset|list Defaults: org, space, library, api-version
17
20
  (\`forumulate config set org acme\`)
18
21
 
19
22
  Every API operation:
20
23
  api list [--tag t] [--search w] Discover operations and their summaries
24
+ [--refresh] ...from the live API's spec, not the bundled one
21
25
  api describe <operationId> Parameters and body schema, as flags
22
26
  api <operationId> [args] [flags] Call it: --<param> value, --data @f.json,
23
27
  api <METHOD> <path> [flags] --field a.b=v, --paginate, --json
24
28
 
25
29
  Resources (each: <group> --help lists its verbs and the operation each calls):
26
30
  Org: orgs | members | invites | groups | roles | service-accounts (bots)
27
- tokens (pats) | webhooks | extensions | audit
31
+ tokens (pats) | keys | integration-tokens (int-tokens)
32
+ webhooks | extensions | audit
28
33
  Spaces: spaces | snapshots | shape | domains | assets | space-types (types)
29
34
  Docs: items (pages) | docs | collections | versions | change-requests (crs)
30
35
  openapi | sdks | github (git)
@@ -32,11 +37,14 @@ Resources (each: <group> --help lists its verbs and the operation each calls):
32
37
  careers | forms (blog/forum/changelog/status: translations …)
33
38
  CMS: libraries | entries | media | releases | environments (envs)
34
39
  Site: theme | sites | reader
40
+ Jobs: jobs | backups | imports | manifest (starters take --wait [--timeout s])
35
41
  search <query...> [--org] e.g. spaces create Docs --slug docs --type DOCS
36
42
  items create --space docs --file a.md --publish
37
43
  docs schedule set <pageId> <when> --space docs
38
44
  webhooks deliveries <id>; webhooks replay <id> <d>
39
45
  --out <file> where a file answer goes (SDK archive, PDF, CSV export)
46
+ cache purge --space <s> [--page p] Drop cached copies (web tier + every CDN); deletes
47
+ nothing
40
48
  completion bash|zsh|fish Shell completion script
41
49
 
42
50
  Older forms, unchanged:
@@ -45,7 +53,11 @@ Older forms, unchanged:
45
53
  items <orgId> <spaceId> List what is in a space, with where each
46
54
  piece's content lives
47
55
  search <orgId> <query...> Unified search across docs/forum/blog
48
- publish <folder> Publish a folder of Markdown: one folder per
56
+ dev <folder> Preview a folder of Markdown locally, rendered
57
+ by your space's own renderer; reloads on save.
58
+ --org <id> --space <id> [--port 4321] [--site <your docs URL>]
59
+ publish <folder> --org <o> --space <s>
60
+ Publish a folder of Markdown: one folder per
49
61
  collection, front matter, assets, order,
50
62
  and a forumulate.yaml manifest for space,
51
63
  site, theme, OpenAPI and monitors. Re-runs
@@ -59,8 +71,35 @@ Older forms, unchanged:
59
71
  --force re-send every page even if it looks unchanged
60
72
  --no-verify skip the read-back --pace <ms> gap between writes
61
73
  --manifest <file> a manifest somewhere else
62
- publish <orgId> <spaceId> <pageId> Publish a page
63
- publish <orgId> <spaceId> <dir> The folder form, with org and space given
74
+ --diff print the changed paragraphs and fields of each update
75
+ --purge page|space|none what to drop from the cache (default page),
76
+ reported per CDN
77
+ --json one summary: created, updated, unchanged, trashed, purged,
78
+ verify, diffUrl (the run is recorded; publish.completed fires)
79
+ Pages edited in the studio since the last publish are not overwritten
80
+ without --force. Full reference: forumulate publish --help
81
+ sync <folder> Content as code: the same folder publish,
82
+ PLAN BY DEFAULT. Posts (blog), pages
83
+ (docs, custom, legal), FAQ questions,
84
+ changelog releases and blog categories,
85
+ matched by slug; images uploaded once by
86
+ content hash; README, LICENSE, _drafts/,
87
+ dotfiles skipped. Guide:
88
+ https://forumulate.com/guides/content-as-code
89
+ --apply write the plan (then read it back)
90
+ --prune also remove what has no file (to the trash)
91
+ --diff print the changed paragraphs and fields of each update
92
+ --org, --space, --only, --force, --no-verify, --pace, --manifest, --json
93
+ as for publish
94
+ check links [folder] Broken internal links, #anchors, pictures and
95
+ (--external) outside links in a folder, before
96
+ publishing; exit 1 when any is broken
97
+ --space <s> [--org <o>] the same report for a published space
98
+ --allow-redirect <hosts> --ignore <text> --json
99
+ publish <folder> --preview <name> Send the change to a preview link instead of
100
+ publishing it (--comment posts it on the PR)
101
+ publish <orgId> <spaceId> <pageId> (deprecated) Publish a page — use items publish
102
+ publish <orgId> <spaceId> <dir> (deprecated) — use publish <dir> --org --space
64
103
  domains <orgId> <spaceId> List this space's domains and their state
65
104
  domains verify <orgId> <spaceId> <hostname>
66
105
  Re-run verification and say what is missing
@@ -109,14 +148,21 @@ Older forms, unchanged:
109
148
  provider status|connect|disconnect your DeepL key (DEEPL_API_KEY)
110
149
  conformance <collectionUrl> Run the Content Sync Protocol suite against
111
150
  any platform's collection endpoint
112
- doctor <readerUrl> Check a live site from the outside: health,
113
- public read, canonical, cache headers,
114
- crawler access, feeds, HTML rewriting
115
- help Show this help
151
+ validate [dir] Check forumulate.yaml, front matter and $schema
152
+ files against the published schemas, with
153
+ did-you-mean hints. --json; exit 2 if invalid
154
+ doctor <readerUrl> | --site <s> Check a live site from the outside: health,
155
+ canonical on both addresses, sitemap, cache
156
+ consistency, root redirect, descriptions,
157
+ llms.txt, favicon, consent tag, white-label
158
+ leaks. --json; exit 1 on any FAIL
159
+ help [command] Show this help, or a command's own
160
+ (every command also takes --help)
116
161
 
117
162
  Environment:
118
163
  FORUMULATE_TOKEN Personal Access Token (Bearer). Overrides a stored one, so
119
- CI keeps working exactly as it did. Mint one at
164
+ CI keeps working exactly as it did; --token overrides it.
165
+ Mint one at
120
166
  https://forumulate.com/account/tokens
121
167
  FORUMULATE_URL The site (default https://forumulate.com); the API is its
122
168
  /api, i.e. https://forumulate.com/api. A value already
@@ -133,10 +179,27 @@ Environment:
133
179
  The SDK (ForumulateClient.fromEnv) and the MCP server (@forumulate/mcp) read
134
180
  the same variables. Guide: https://forumulate.com/guides/api-tokens-and-scopes
135
181
 
182
+ Every FORUMULATE_* variable not listed above is reported (with the one you
183
+ probably meant) by \`forumulate whoami\` and on any authentication failure.
184
+
136
185
  Flags:
137
- --json Emit raw JSON instead of a formatted summary
186
+ --json Emit raw JSON instead of a formatted summary (stdout only;
187
+ progress and warnings go to stderr)
188
+ --out <file> Write stdout to a file (never truncated; non-zero exit if the
189
+ write fails). content/translations use --out for their own file
190
+ --jsonl With --paginate: one JSON row per line, streamed
191
+ --token <pat> The token for this run, on every command. Precedence:
192
+ --token, then FORUMULATE_TOKEN, then credentials.json. On an
193
+ operation with a \`token\` parameter of its own (registries
194
+ set, github connect, domains acme-challenge) the flag is that
195
+ parameter; set FORUMULATE_TOKEN for the PAT there
138
196
  --dry-run (api, resources) print the request instead of sending it
139
197
  --dry-run Plan the work and write nothing (publish of a directory)
140
198
  --version Print the CLI version
199
+
200
+ Exit status:
201
+ 0 ok 1 failed (verification mismatch, doctor FAIL) 2 usage
202
+ 3 auth (no token, 401, token not allowed) 4 not found
203
+ 5 conflict (409/412, edited in the studio since your last publish)
141
204
  `;
142
205
  //# sourceMappingURL=help.js.map
package/dist/help.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAA,2FAA2F;AAC9E,QAAA,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwInB,CAAC"}
1
+ {"version":3,"file":"help.js","sourceRoot":"","sources":["../src/help.ts"],"names":[],"mappings":";;;AAAA,2FAA2F;AAC9E,QAAA,IAAI,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAuMnB,CAAC"}
package/dist/io.d.ts ADDED
@@ -0,0 +1,33 @@
1
+ import type { Writable } from 'node:stream';
2
+ /**
3
+ * Where a command's output goes, and the promise that it got there (FMU-B02/D05).
4
+ *
5
+ * `--json` piped into another program stopped at exactly 65,536 or 131,072
6
+ * bytes: the CLI called `process.exit()` the moment the command returned, and
7
+ * on a pipe Node writes stdout asynchronously, so whatever was still queued
8
+ * was thrown away — `items list --json | wc -c` said 65536 while the same
9
+ * command into a file wrote 8 MB. A sink buffers nothing of its own; it writes
10
+ * through, counts what the stream has not yet flushed, and `finish()` waits for
11
+ * the stream to say every byte is handed to the OS before the process ends.
12
+ * A write the OS refuses (a closed pipe, a full disk) is remembered and turns
13
+ * into a non-zero exit, rather than a truncated file and an exit 0.
14
+ */
15
+ export interface Sink {
16
+ line(text: string): void;
17
+ /** Resolves once everything written is flushed; the first write error, if any. */
18
+ finish(): Promise<Error | undefined>;
19
+ }
20
+ export declare function streamSink(stream: Writable, opts?: {
21
+ closeOnFinish?: boolean;
22
+ }): Sink;
23
+ /**
24
+ * `--out <file>`: stdout into a file, opened on the first line so a command
25
+ * that prints nothing leaves no empty file behind. The write errors (no such
26
+ * directory, permission) surface on `finish()` like a pipe's.
27
+ */
28
+ export declare function fileSink(path: string): Sink;
29
+ /** Commands whose own `--out` means "the file this command writes", not "my stdout". */
30
+ export declare const OWNS_OUT: Set<string>;
31
+ /** The `--out` value a global redirect should use, or undefined. */
32
+ export declare function globalOut(argv: string[]): string | undefined;
33
+ //# sourceMappingURL=io.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"io.d.ts","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAE5C;;;;;;;;;;;;GAYG;AACH,MAAM,WAAW,IAAI;IACnB,IAAI,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,kFAAkF;IAClF,MAAM,IAAI,OAAO,CAAC,KAAK,GAAG,SAAS,CAAC,CAAC;CACtC;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,GAAE;IAAE,aAAa,CAAC,EAAE,OAAO,CAAA;CAAO,GAAG,IAAI,CAoCzF;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAW3C;AAED,wFAAwF;AACxF,eAAO,MAAM,QAAQ,aAA+C,CAAC;AAErE,oEAAoE;AACpE,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,MAAM,GAAG,SAAS,CAQ5D"}
package/dist/io.js ADDED
@@ -0,0 +1,81 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.OWNS_OUT = void 0;
4
+ exports.streamSink = streamSink;
5
+ exports.fileSink = fileSink;
6
+ exports.globalOut = globalOut;
7
+ const node_fs_1 = require("node:fs");
8
+ function streamSink(stream, opts = {}) {
9
+ let failed;
10
+ stream.on('error', (e) => {
11
+ failed ??= e;
12
+ });
13
+ return {
14
+ line(text) {
15
+ if (failed)
16
+ return;
17
+ try {
18
+ stream.write(`${text}\n`);
19
+ }
20
+ catch (e) {
21
+ failed ??= e;
22
+ }
23
+ },
24
+ finish() {
25
+ return new Promise((resolve) => {
26
+ let settled = false;
27
+ const done = (e) => {
28
+ if (settled)
29
+ return;
30
+ settled = true;
31
+ resolve(failed ?? e ?? undefined);
32
+ };
33
+ if (failed)
34
+ return done();
35
+ // A stream that errors never finishes: listen for both.
36
+ stream.once('error', (e) => done(e));
37
+ // `end`'s callback carries the error, and Node runs it BEFORE the
38
+ // 'error' event: dropping its argument resolved "no error" for an
39
+ // `--out` into a missing directory, and the CLI exited 0 having
40
+ // written nothing.
41
+ if (opts.closeOnFinish)
42
+ stream.end((e) => done(e ?? undefined));
43
+ // An empty write's callback runs after every earlier write has flushed.
44
+ else
45
+ stream.write('', (e) => done(e ?? undefined));
46
+ });
47
+ },
48
+ };
49
+ }
50
+ /**
51
+ * `--out <file>`: stdout into a file, opened on the first line so a command
52
+ * that prints nothing leaves no empty file behind. The write errors (no such
53
+ * directory, permission) surface on `finish()` like a pipe's.
54
+ */
55
+ function fileSink(path) {
56
+ let inner;
57
+ return {
58
+ line(text) {
59
+ inner ??= streamSink((0, node_fs_1.createWriteStream)(path), { closeOnFinish: true });
60
+ inner.line(text);
61
+ },
62
+ finish() {
63
+ return inner ? inner.finish() : Promise.resolve(undefined);
64
+ },
65
+ };
66
+ }
67
+ /** Commands whose own `--out` means "the file this command writes", not "my stdout". */
68
+ exports.OWNS_OUT = new Set(['content', 'translations', 'i18n']);
69
+ /** The `--out` value a global redirect should use, or undefined. */
70
+ function globalOut(argv) {
71
+ const cmd = argv.find((a) => !a.startsWith('-'));
72
+ if (cmd && exports.OWNS_OUT.has(cmd))
73
+ return undefined;
74
+ const inline = argv.find((a) => a.startsWith('--out='));
75
+ if (inline)
76
+ return inline.slice(6) || undefined;
77
+ const at = argv.indexOf('--out');
78
+ const v = at >= 0 ? argv[at + 1] : undefined;
79
+ return v && !v.startsWith('--') ? v : undefined;
80
+ }
81
+ //# sourceMappingURL=io.js.map
package/dist/io.js.map ADDED
@@ -0,0 +1 @@
1
+ {"version":3,"file":"io.js","sourceRoot":"","sources":["../src/io.ts"],"names":[],"mappings":";;;AAsBA,gCAoCC;AAOD,4BAWC;AAMD,8BAQC;AA1FD,qCAA8D;AAsB9D,SAAgB,UAAU,CAAC,MAAgB,EAAE,OAAoC,EAAE;IACjF,IAAI,MAAyB,CAAC;IAC9B,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,CAAC,CAAQ,EAAE,EAAE;QAC9B,MAAM,KAAK,CAAC,CAAC;IACf,CAAC,CAAC,CAAC;IACH,OAAO;Q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}
@@ -0,0 +1,20 @@
1
+ import { type PreviewResult } from './publish/preview';
2
+ type Fetch = typeof fetch;
3
+ /**
4
+ * `publish --preview <name> --comment` (FMU-F01): post the preview's link and
5
+ * diff on the pull request it was built for — and on the next push EDIT that
6
+ * comment rather than add another, found by the hidden
7
+ * `<!-- forumulate-preview:<name> -->` marker the API puts in it.
8
+ *
9
+ * Host-neutral: GitHub, Gitea/Forgejo (the same REST shape), GitLab and
10
+ * Bitbucket, each with the token its CI documents for writing comments
11
+ * (`GITHUB_TOKEN`, `GITEA_TOKEN`, `GITLAB_TOKEN`, `BITBUCKET_TOKEN`). Any other
12
+ * host: print the comment with `--json` (`previews[].comment`) and post it with
13
+ * that host's own tool — the recipes in docs/guides/docs-workflow.md do both.
14
+ *
15
+ * Answers the pull request's address, or null when there is nothing to
16
+ * comment on (not a PR build). Throws with a sentence when the host refuses.
17
+ */
18
+ export declare function postPreviewComment(preview: PreviewResult, env: NodeJS.ProcessEnv, doFetch?: Fetch): Promise<string | null>;
19
+ export {};
20
+ //# sourceMappingURL=preview-comment.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"preview-comment.d.ts","sourceRoot":"","sources":["../src/preview-comment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,KAAK,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEjE,KAAK,KAAK,GAAG,OAAO,KAAK,CAAC;AAE1B;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,kBAAkB,CACtC,OAAO,EAAE,aAAa,EACtB,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,OAAO,GAAE,KAAa,GACrB,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CA+DxB"}