create-thally-docs 0.10.25 → 0.10.26

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
@@ -1,10 +1,9 @@
1
1
  # create-thally-docs
2
2
 
3
- Scaffold the first customer-facing knowledge surface in a
4
- [Thally](https://github.com/thallylabs/thally) product-knowledge pipeline. The
5
- result is an open documentation site that serves every page to humans as
6
- polished HTML and to agents as structured JSON, JSON-LD, and Markdown from the
7
- same URL.
3
+ Scaffold an open-source [Thally](https://github.com/thallylabs/thally) docs
4
+ site for people, search engines, and AI tools. The result keeps your source in
5
+ Git and publishes each page as HTML, Markdown, structured JSON, JSON-LD, and
6
+ agent discovery files.
8
7
 
9
8
  ## Quick start
10
9
 
@@ -1,10 +1,10 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  readStarterReleaseManifest
4
- } from "./chunk-2F7CFF5V.js";
4
+ } from "./chunk-AC3VR55N.js";
5
5
  import {
6
6
  STABLE_SCAFFOLD_RELEASE
7
- } from "./chunk-T7N455IR.js";
7
+ } from "./chunk-3B6CW5VF.js";
8
8
 
9
9
  // src/download.ts
10
10
  import { Readable, Transform, pipeline } from "stream";
@@ -3,19 +3,19 @@
3
3
  // src/stable-scaffold-release.json
4
4
  var stable_scaffold_release_default = {
5
5
  schemaVersion: 1,
6
- id: "2026-09-02.814f1f54.cef2fe3b",
6
+ id: "2026-09-05.b8a69237.2c73d8c3",
7
7
  source: {
8
8
  repository: "thallylabs/starter",
9
- commitSha: "814f1f54f5a53a129c552941124d81307dc8b048",
10
- treeSha: "03f37cd5e7c504f92b517f8b4194f4b9294ed4bf",
11
- archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/814f1f54f5a53a129c552941124d81307dc8b048",
9
+ commitSha: "b8a6923724e7dd7d16e75b50531e097a47e77682",
10
+ treeSha: "4e0426e44b4216e02e3c7dd50a543a7d1b94e959",
11
+ archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/b8a6923724e7dd7d16e75b50531e097a47e77682",
12
12
  manifestPath: "starter-release.json",
13
- manifestSha256: "46804f563d00e02783c0aa963e5c3dcf932ae11134e2c8f2843faff4fb4e1047"
13
+ manifestSha256: "e1e7962089419a0de68d513c7153555cf388338b25261ed978332abd581b8589"
14
14
  },
15
15
  runtime: {
16
16
  repository: "thallylabs/thally",
17
- commitSha: "cef2fe3b11895cf6ce60d17177ac97200f975507",
18
- treeSha: "0edafb000e3fb477f0f2eac93e262b4c07127851",
17
+ commitSha: "2c73d8c312b290598a4335ef77c9e04d8cbe1b4b",
18
+ treeSha: "930c8a4974300649852769e4fcdab2798c4b3b79",
19
19
  contentSource: "assets",
20
20
  identityContractVersion: 1
21
21
  },
@@ -24,6 +24,26 @@ var stable_scaffold_release_default = {
24
24
 
25
25
  // src/previous-scaffold-releases.json
26
26
  var previous_scaffold_releases_default = [
27
+ {
28
+ schemaVersion: 1,
29
+ id: "2026-09-02.814f1f54.cef2fe3b",
30
+ source: {
31
+ repository: "thallylabs/starter",
32
+ commitSha: "814f1f54f5a53a129c552941124d81307dc8b048",
33
+ treeSha: "03f37cd5e7c504f92b517f8b4194f4b9294ed4bf",
34
+ archiveUrl: "https://codeload.github.com/thallylabs/starter/tar.gz/814f1f54f5a53a129c552941124d81307dc8b048",
35
+ manifestPath: "starter-release.json",
36
+ manifestSha256: "46804f563d00e02783c0aa963e5c3dcf932ae11134e2c8f2843faff4fb4e1047"
37
+ },
38
+ runtime: {
39
+ repository: "thallylabs/thally",
40
+ commitSha: "cef2fe3b11895cf6ce60d17177ac97200f975507",
41
+ treeSha: "0edafb000e3fb477f0f2eac93e262b4c07127851",
42
+ contentSource: "assets",
43
+ identityContractVersion: 1
44
+ },
45
+ starterVersion: 2
46
+ },
27
47
  {
28
48
  schemaVersion: 1,
29
49
  id: "2026-09-02.e29a6539.b84cbc74",
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  STABLE_SCAFFOLD_RELEASE
4
- } from "./chunk-T7N455IR.js";
4
+ } from "./chunk-3B6CW5VF.js";
5
5
 
6
6
  // src/starter-sync.ts
7
7
  import { createHash } from "crypto";
@@ -5,7 +5,7 @@ import {
5
5
  } from "./chunk-ORUAMPNF.js";
6
6
  import {
7
7
  downloadStarter
8
- } from "./chunk-FW64PO5S.js";
8
+ } from "./chunk-2RWSXKSV.js";
9
9
 
10
10
  // src/scaffold.ts
11
11
  import { existsSync, mkdirSync, readdirSync } from "fs";
@@ -3,7 +3,7 @@ import {
3
3
  initGit,
4
4
  installDeps,
5
5
  scaffold
6
- } from "./chunk-SBSYWX2B.js";
6
+ } from "./chunk-BBRZGMM6.js";
7
7
 
8
8
  // src/migrate/index.ts
9
9
  import { existsSync, mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "fs";
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  migrateDocs
4
- } from "./chunk-GS2JMPTA.js";
4
+ } from "./chunk-V5M5JVUF.js";
5
5
  import {
6
6
  logo,
7
7
  readDocsJson,
@@ -9,11 +9,11 @@ import {
9
9
  slugify,
10
10
  success,
11
11
  writeDocsJson
12
- } from "./chunk-SBSYWX2B.js";
12
+ } from "./chunk-BBRZGMM6.js";
13
13
  import "./chunk-ORUAMPNF.js";
14
- import "./chunk-FW64PO5S.js";
15
- import "./chunk-2F7CFF5V.js";
16
- import "./chunk-T7N455IR.js";
14
+ import "./chunk-2RWSXKSV.js";
15
+ import "./chunk-AC3VR55N.js";
16
+ import "./chunk-3B6CW5VF.js";
17
17
 
18
18
  // src/index.ts
19
19
  import { existsSync as existsSync3, readdirSync as readdirSync2 } from "fs";
@@ -204,19 +204,30 @@ import { join, extname, relative } from "path";
204
204
  import { execFileSync } from "child_process";
205
205
 
206
206
  // src/frontmatter.ts
207
- import matter from "gray-matter";
208
- var FRONTMATTER_OPTIONS = {
209
- engines: {
210
- javascript: () => ({}),
211
- js: () => ({})
212
- }
213
- };
207
+ import { parse as parseYaml } from "yaml";
214
208
  function parseFrontmatter(raw) {
215
- return matter(raw, FRONTMATTER_OPTIONS);
209
+ const source = raw.charCodeAt(0) === 65279 ? raw.slice(1) : raw;
210
+ const opening = /^---([^\r\n]*)\r?\n/.exec(source);
211
+ if (!opening || opening[1].startsWith("-")) return { content: source, data: {} };
212
+ const language = opening[1].trim().toLowerCase();
213
+ const remainder = source.slice(opening[0].length);
214
+ const closing = /^---[ \t]*\r?$/m.exec(remainder);
215
+ const matter = closing ? remainder.slice(0, closing.index) : remainder;
216
+ let content = closing ? remainder.slice(closing.index + closing[0].length) : "";
217
+ if (content.startsWith("\r\n")) content = content.slice(2);
218
+ else if (content.startsWith("\n")) content = content.slice(1);
219
+ if (matter.trim() === "" || !["", "yaml", "yml"].includes(language)) {
220
+ return { content, data: {} };
221
+ }
222
+ const parsed = parseYaml(matter);
223
+ return {
224
+ content,
225
+ data: parsed && typeof parsed === "object" && !Array.isArray(parsed) ? parsed : {}
226
+ };
216
227
  }
217
228
 
218
229
  // src/check.ts
219
- import { parse as parseYaml } from "yaml";
230
+ import { parse as parseYaml2 } from "yaml";
220
231
  function gitLocal(projectDir, args2) {
221
232
  try {
222
233
  const out = execFileSync("git", args2, { cwd: projectDir, encoding: "utf8", stdio: ["ignore", "pipe", "ignore"] });
@@ -366,7 +377,7 @@ function validateOpenApi(projectDir, source, issues) {
366
377
  let spec;
367
378
  try {
368
379
  const raw = readFileSync(specPath, "utf8");
369
- spec = source.endsWith(".json") ? JSON.parse(raw) : parseYaml(raw);
380
+ spec = source.endsWith(".json") ? JSON.parse(raw) : parseYaml2(raw);
370
381
  } catch (err) {
371
382
  issues.push({ severity: "error", message: `OpenAPI spec is not valid ${source.endsWith(".json") ? "JSON" : "YAML"}: ${err.message}`, file: source });
372
383
  return;
@@ -427,7 +438,7 @@ async function runCheck(projectDir, options) {
427
438
  if (tab.href.startsWith("/")) navPageIds.add(tab.href.slice(1) || "introduction");
428
439
  continue;
429
440
  }
430
- if (tab.api && tab.api.navigation !== false) continue;
441
+ if (tab.api && tab.api.navigation !== false && !hasNavigationNodes) continue;
431
442
  if (!hasNavigationNodes) {
432
443
  issues.push({ severity: "error", message: `Tab "${tab.tab}" has no groups and no href \u2014 it will render empty` });
433
444
  continue;
@@ -805,6 +816,91 @@ var valueFlags = /* @__PURE__ */ new Set([
805
816
  "--pages",
806
817
  "--platform"
807
818
  ]);
819
+ var commandFlags = {
820
+ scaffold: /* @__PURE__ */ new Set(["--help", "-h", "--yes", "-y", "--install", "--no-install"]),
821
+ migrate: /* @__PURE__ */ new Set([
822
+ "--help",
823
+ "-h",
824
+ "--api-key",
825
+ "--branch",
826
+ "--docs-dir",
827
+ "--into",
828
+ "--max-pages",
829
+ "--platform",
830
+ "--yes",
831
+ "-y"
832
+ ]),
833
+ check: /* @__PURE__ */ new Set(["--help", "-h", "--fix", "--ci", "--external", "--drift"]),
834
+ translate: /* @__PURE__ */ new Set([
835
+ "--help",
836
+ "-h",
837
+ "--api-key",
838
+ "--force",
839
+ "--locale",
840
+ "--model",
841
+ "--pages",
842
+ "--yes",
843
+ "-y"
844
+ ])
845
+ };
846
+ var mainHelp = `
847
+ Usage:
848
+ create-thally-docs [project-dir] [options]
849
+ create-thally-docs <command> [arguments] [options]
850
+
851
+ Commands:
852
+ migrate <source> [output-dir] Import an existing documentation project
853
+ check [project-dir] Validate content and navigation
854
+ translate [project-dir] Translate documentation into another locale
855
+
856
+ Scaffold options:
857
+ -y, --yes Accept defaults and skip interactive prompts
858
+ --install Install project dependencies after scaffolding
859
+ --no-install Skip dependency installation without prompting
860
+ -h, --help Show this help
861
+
862
+ Run create-thally-docs <command> --help for command-specific options.
863
+ `;
864
+ var commandHelp = {
865
+ migrate: `
866
+ Usage:
867
+ create-thally-docs migrate <github-or-docs-url> [output-dir] [options]
868
+
869
+ Options:
870
+ --into <dir> Migrate into an existing Thally project
871
+ --branch <name> Override the detected Git branch
872
+ --docs-dir <path> Override the detected documentation directory
873
+ --max-pages <count> Limit a public URL crawl to 1-1000 pages
874
+ --platform <name> Use mintlify, docusaurus, or auto
875
+ --api-key <key> Anthropic API key for non-Markdown conversion
876
+ -y, --yes Skip interactive prompts
877
+ -h, --help Show this help
878
+ `,
879
+ check: `
880
+ Usage:
881
+ create-thally-docs check [project-dir] [options]
882
+
883
+ Options:
884
+ --fix Add orphan pages to navigation when possible
885
+ --ci Use CI-oriented validation behavior
886
+ --external Check external links
887
+ --drift Check documentation provenance and freshness
888
+ -h, --help Show this help
889
+ `,
890
+ translate: `
891
+ Usage:
892
+ create-thally-docs translate [project-dir] --locale <code> [options]
893
+
894
+ Options:
895
+ --locale <code> Target locale code (required)
896
+ --pages <ids> Translate only the comma-separated page IDs
897
+ --force Overwrite existing translations
898
+ --api-key <key> Anthropic API key (defaults to ANTHROPIC_API_KEY)
899
+ --model <id> Claude model to use
900
+ -y, --yes Skip the confirmation prompt
901
+ -h, --help Show this help
902
+ `
903
+ };
808
904
  var positional = [];
809
905
  for (let i = 0; i < args.length; i++) {
810
906
  if (args[i].startsWith("-")) {
@@ -822,6 +918,21 @@ function getFlagValue(flag) {
822
918
  }
823
919
  return void 0;
824
920
  }
921
+ function resolveCommand(subcommand) {
922
+ if (subcommand === "migrate" || subcommand === "check" || subcommand === "translate") {
923
+ return subcommand;
924
+ }
925
+ return "scaffold";
926
+ }
927
+ function printHelp(command) {
928
+ console.log(command === "scaffold" ? mainHelp : commandHelp[command]);
929
+ }
930
+ function validateFlags(command) {
931
+ const unknownFlag = flags.find((flag) => !commandFlags[command].has(flag));
932
+ if (!unknownFlag) return;
933
+ const helpCommand = command === "scaffold" ? "" : ` ${command}`;
934
+ throw new Error(`Unknown option "${unknownFlag}". Run create-thally-docs${helpCommand} --help for usage.`);
935
+ }
825
936
  async function runMigrateCommand() {
826
937
  let sourceUrl = positional[1];
827
938
  if (!sourceUrl) {
@@ -945,6 +1056,12 @@ async function runTranslateSubcommand() {
945
1056
  }
946
1057
  async function main() {
947
1058
  const subcommand = positional[0];
1059
+ const command = resolveCommand(subcommand);
1060
+ if (flags.includes("--help") || flags.includes("-h")) {
1061
+ printHelp(command);
1062
+ return;
1063
+ }
1064
+ validateFlags(command);
948
1065
  if (subcommand === "migrate") {
949
1066
  await runMigrateCommand();
950
1067
  } else if (subcommand === "check") {
@@ -1,12 +1,12 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  migrateDocs
4
- } from "../chunk-GS2JMPTA.js";
5
- import "../chunk-SBSYWX2B.js";
4
+ } from "../chunk-V5M5JVUF.js";
5
+ import "../chunk-BBRZGMM6.js";
6
6
  import "../chunk-ORUAMPNF.js";
7
- import "../chunk-FW64PO5S.js";
8
- import "../chunk-2F7CFF5V.js";
9
- import "../chunk-T7N455IR.js";
7
+ import "../chunk-2RWSXKSV.js";
8
+ import "../chunk-AC3VR55N.js";
9
+ import "../chunk-3B6CW5VF.js";
10
10
  export {
11
11
  migrateDocs
12
12
  };
package/dist/release.js CHANGED
@@ -3,7 +3,7 @@ import {
3
3
  STABLE_SCAFFOLD_RELEASE,
4
4
  SUPPORTED_SCAFFOLD_RELEASES,
5
5
  isStableScaffoldRelease
6
- } from "./chunk-T7N455IR.js";
6
+ } from "./chunk-3B6CW5VF.js";
7
7
  export {
8
8
  STABLE_SCAFFOLD_RELEASE,
9
9
  SUPPORTED_SCAFFOLD_RELEASES,
package/dist/scaffold.js CHANGED
@@ -1,18 +1,18 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  scaffold
4
- } from "./chunk-SBSYWX2B.js";
4
+ } from "./chunk-BBRZGMM6.js";
5
5
  import "./chunk-ORUAMPNF.js";
6
6
  import {
7
7
  STARTER_ARCHIVE_ROOT,
8
8
  STARTER_COMMIT_SHA,
9
9
  STARTER_REPOSITORY,
10
10
  validateStarterArchiveEntry
11
- } from "./chunk-FW64PO5S.js";
12
- import "./chunk-2F7CFF5V.js";
11
+ } from "./chunk-2RWSXKSV.js";
12
+ import "./chunk-AC3VR55N.js";
13
13
  import {
14
14
  STABLE_SCAFFOLD_RELEASE
15
- } from "./chunk-T7N455IR.js";
15
+ } from "./chunk-3B6CW5VF.js";
16
16
  export {
17
17
  STABLE_SCAFFOLD_RELEASE,
18
18
  STARTER_ARCHIVE_ROOT,
@@ -8,8 +8,8 @@ import {
8
8
  planStarterRuntimeSync,
9
9
  readStarterReleaseManifest,
10
10
  starterManifestSha256
11
- } from "./chunk-2F7CFF5V.js";
12
- import "./chunk-T7N455IR.js";
11
+ } from "./chunk-AC3VR55N.js";
12
+ import "./chunk-3B6CW5VF.js";
13
13
  export {
14
14
  applyStarterRuntimeSyncPlan,
15
15
  classifyStarterPath,
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  downloadStarter
4
- } from "./chunk-FW64PO5S.js";
4
+ } from "./chunk-2RWSXKSV.js";
5
5
  import {
6
6
  applyStarterRuntimeSyncPlan,
7
7
  mergeStarterOwnershipContracts,
@@ -9,11 +9,11 @@ import {
9
9
  planStarterRuntimeSync,
10
10
  readStarterReleaseManifest,
11
11
  starterManifestSha256
12
- } from "./chunk-2F7CFF5V.js";
12
+ } from "./chunk-AC3VR55N.js";
13
13
  import {
14
14
  STABLE_SCAFFOLD_RELEASE,
15
15
  SUPPORTED_SCAFFOLD_RELEASES
16
- } from "./chunk-T7N455IR.js";
16
+ } from "./chunk-3B6CW5VF.js";
17
17
 
18
18
  // src/starter-update.ts
19
19
  import {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "create-thally-docs",
3
- "version": "0.10.25",
4
- "description": "Scaffold the first documentation surface in a Thally product-knowledge pipeline.",
3
+ "version": "0.10.26",
4
+ "description": "Scaffold an open-source Thally docs site for people, search engines, and AI tools.",
5
5
  "type": "module",
6
6
  "engines": {
7
7
  "node": ">=18"
@@ -44,8 +44,7 @@
44
44
  "dependencies": {
45
45
  "@anthropic-ai/sdk": "^0.36.0",
46
46
  "@inquirer/prompts": "^7.0.0",
47
- "@thallylabs/migrate": "0.2.3",
48
- "gray-matter": "^4.0.3",
47
+ "@thallylabs/migrate": "0.2.4",
49
48
  "p-limit": "^6.1.0",
50
49
  "tar": "^7.5.22",
51
50
  "yaml": "^2.6.0"
@@ -64,7 +63,7 @@
64
63
  "mdx",
65
64
  "nextjs",
66
65
  "ai",
67
- "agent-native",
66
+ "product-knowledge",
68
67
  "mcp",
69
68
  "create"
70
69
  ],