Skip to content

Commit 1f21de9

Browse files
Mpdreamzclaude
andauthored
feat(cli-docs): auto-generate CLI reference from schema JSON (#3221)
Co-authored-by: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent f1aced1 commit 1f21de9

92 files changed

Lines changed: 8946 additions & 2797 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/ci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,13 @@ jobs:
158158
- name: Compile
159159
run: dotnet run --project build -c release -- compile
160160

161+
- name: Check CLI schema is up to date
162+
if: ${{ matrix.os == 'ubuntu-latest' }}
163+
run: |
164+
dotnet run --project src/tooling/docs-builder -c release --no-build -- __schema > docs/cli-schema.json.tmp
165+
diff docs/cli-schema.json docs/cli-schema.json.tmp || (echo "docs/cli-schema.json is out of date — run: dotnet run --project src/tooling/docs-builder -- __schema > docs/cli-schema.json" && exit 1)
166+
rm docs/cli-schema.json.tmp
167+
161168
- name: Test
162169
run: dotnet run --project build -c release -- unit-test
163170

Directory.Packages.props

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,9 @@
6969
<PackageVersion Include="FSharp.Core" Version="10.1.201" />
7070
</ItemGroup>
7171
<ItemGroup>
72-
<PackageVersion Include="Nullean.Argh" Version="0.15.4" />
73-
<PackageVersion Include="Nullean.Argh.Hosting" Version="0.15.4" />
74-
<PackageVersion Include="Nullean.Argh.Interfaces" Version="0.15.4" />
72+
<PackageVersion Include="Nullean.Argh" Version="0.16.0" />
73+
<PackageVersion Include="Nullean.Argh.Hosting" Version="0.16.0" />
74+
<PackageVersion Include="Nullean.Argh.Interfaces" Version="0.16.0" />
7575
<PackageVersion Include="Crayon" Version="2.0.69" />
7676
<PackageVersion Include="DotNet.Glob" Version="3.1.3" />
7777
<PackageVersion Include="Errata" Version="0.16.0" />
@@ -88,7 +88,7 @@
8888
<PackageVersion Include="Proc" Version="0.13.0" />
8989
<PackageVersion Include="RazorSlices" Version="0.9.5" />
9090
<PackageVersion Include="Samboy063.Tomlet" Version="6.0.0" />
91-
<PackageVersion Include="Sep" Version="0.12.5" />
91+
<PackageVersion Include="Sep" Version="0.13.0" />
9292
<PackageVersion Include="Slugify.Core" Version="4.0.1" />
9393
<PackageVersion Include="SoftCircuits.IniFileParser" Version="2.7.0" />
9494
<PackageVersion Include="System.IO.Abstractions" Version="22.1.1" />

docs/_docset.yml

Lines changed: 6 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ toc:
150150
- file: line_breaks.md
151151
- file: links.md
152152
- file: list-sub-pages.md
153+
- file: page-card.md
153154
- file: passthrough.md
154155
- file: sidebars.md
155156
- file: stepper.md
@@ -160,53 +161,12 @@ toc:
160161
- file: tabs.md
161162
- file: tagged_regions.md
162163
- file: titles.md
163-
- folder: cli
164+
- cli: cli-schema.json
165+
folder: cli
164166
children:
165-
- file: index.md
166-
- folder: docset
167-
children:
168-
- file: index.md
169-
- file: build.md
170-
- file: diff-validate.md
171-
- file: format.md
172-
- file: index-command.md
173-
- file: mv.md
174-
- file: serve.md
175-
- folder: assembler
176-
children:
177-
- file: index.md
178-
- file: assemble.md
179-
- file: assembler-bloom-filter-create.md
180-
- file: assembler-bloom-filter-lookup.md
181-
- file: assembler-build.md
182-
- file: assembler-clone.md
183-
- file: assembler-config-init.md
184-
- file: assembler-content-source-match.md
185-
- file: assembler-content-source-validate.md
186-
- file: assembler-deploy-apply.md
187-
- file: assembler-deploy-plan.md
188-
- file: assembler-deploy-update-redirects.md
189-
- file: assembler-index.md
190-
- file: assembler-navigation-validate.md
191-
- file: assembler-navigation-validate-link-reference.md
192-
- file: assembler-serve.md
193-
- folder: links
194-
children:
195-
- file: index.md
196-
- file: inbound-links-validate.md
197-
- file: inbound-links-validate-all.md
198-
- file: inbound-links-validate-link-reference.md
199-
- folder: changelog
200-
children:
201-
- file: index.md
202-
- file: add.md
203-
- file: bundle.md
204-
- file: bundle-amend.md
205-
- file: evaluate-pr.md
206-
- file: gh-release.md
207-
- file: init.md
208-
- file: remove.md
209-
- file: render.md
167+
- file: installation.md
168+
- file: shell-autocompletion.md
169+
- file: cli-reference-how-to.md
210170
- folder: mcp
211171
children:
212172
- file: index.md

docs/_redirects.yml

Lines changed: 40 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,45 @@
11
redirects:
22
'migration/freeze/gh-action.md' : 'index.md'
33
'migration/freeze/index.md' : 'index.md'
4-
'cli/mcp.md': 'index.md'
5-
'cli/release/changelog-add.md': 'cli/changelog/add.md'
6-
'cli/release/changelog-evaluate-artifact.md': 'index.md'
7-
'cli/release/changelog-evaluate-pr.md': 'cli/changelog/evaluate-pr.md'
8-
'cli/release/changelog-bundle.md': 'cli/changelog/bundle.md'
9-
'cli/release/changelog-bundle-amend.md': 'cli/changelog/bundle-amend.md'
10-
'cli/release/changelog-gh-release.md': 'cli/changelog/gh-release.md'
11-
'cli/release/changelog-init.md': 'cli/changelog/init.md'
12-
'cli/release/changelog-prepare-artifact.md': 'index.md'
13-
'cli/release/changelog-remove.md': 'cli/changelog/remove.md'
14-
'cli/release/changelog-render.md': 'cli/changelog/render.md'
15-
'cli/release/index.md': 'cli/changelog/index.md'
4+
# CLI docs: old static pages replaced by schema-generated equivalents.
5+
# Targets use physical pages so redirect validation works in authoring tests.
6+
# The CLI schema-generated pages (synthetic) serve the real content in production.
7+
'cli/index.md': 'cli/installation.md'
8+
'cli/assembler/index.md': 'cli/installation.md'
9+
'cli/changelog/add.md': 'cli/changelog/index.md'
10+
'cli/changelog/bundle-amend.md': 'cli/changelog/index.md'
11+
'cli/changelog/bundle.md': 'cli/changelog/index.md'
12+
'cli/changelog/evaluate-pr.md': 'cli/changelog/index.md'
13+
'cli/changelog/gh-release.md': 'cli/changelog/index.md'
14+
'cli/changelog/init.md': 'cli/changelog/index.md'
15+
'cli/changelog/remove.md': 'cli/changelog/index.md'
16+
'cli/changelog/render.md': 'cli/changelog/index.md'
17+
'cli/assembler/assemble.md': 'cli/installation.md'
18+
'cli/assembler/assembler-bloom-filter-create.md': 'cli/installation.md'
19+
'cli/assembler/assembler-bloom-filter-lookup.md': 'cli/installation.md'
20+
'cli/assembler/assembler-build.md': 'cli/installation.md'
21+
'cli/assembler/assembler-clone.md': 'cli/installation.md'
22+
'cli/assembler/assembler-config-init.md': 'cli/installation.md'
23+
'cli/assembler/assembler-content-source-match.md': 'cli/installation.md'
24+
'cli/assembler/assembler-content-source-validate.md': 'cli/installation.md'
25+
'cli/assembler/assembler-deploy-apply.md': 'cli/installation.md'
26+
'cli/assembler/assembler-deploy-plan.md': 'cli/installation.md'
27+
'cli/assembler/assembler-deploy-update-redirects.md': 'cli/installation.md'
28+
'cli/assembler/assembler-index.md': 'cli/installation.md'
29+
'cli/assembler/assembler-navigation-validate-link-reference.md': 'cli/installation.md'
30+
'cli/assembler/assembler-navigation-validate.md': 'cli/installation.md'
31+
'cli/assembler/assembler-serve.md': 'cli/installation.md'
32+
'cli/docset/index.md': 'cli/installation.md'
33+
'cli/docset/build.md': 'cli/installation.md'
34+
'cli/docset/diff-validate.md': 'cli/installation.md'
35+
'cli/docset/format.md': 'cli/installation.md'
36+
'cli/docset/index-command.md': 'cli/installation.md'
37+
'cli/docset/mv.md': 'cli/installation.md'
38+
'cli/docset/serve.md': 'cli/installation.md'
39+
'cli/links/index.md': 'cli/installation.md'
40+
'cli/links/inbound-links-validate.md': 'cli/installation.md'
41+
'cli/links/inbound-links-validate-all.md': 'cli/installation.md'
42+
'cli/links/inbound-links-validate-link-reference.md': 'cli/installation.md'
1643
'testing/redirects/4th-page.md': 'testing/redirects/5th-page.md'
1744
'testing/redirects/9th-page.md': '!testing/redirects/5th-page.md'
1845
'testing/redirects/6th-page.md':
@@ -35,4 +62,4 @@ redirects:
3562
"yy": "bb"
3663
'testing/redirects/third-page.md':
3764
anchors:
38-
'removed-anchor':
65+
'removed-anchor':

docs/building-blocks/inbound-cross-links.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@ Inbound cross-link validation allows you to:
1616

1717
## How it works
1818

19-
A regular [build](../cli/docset/build.md) of a documentation set won't validate inbound links automatically.
19+
A regular [build](../cli/build.md) of a documentation set won't validate inbound links automatically.
2020

21-
You have to use the [inbound-links validate-link-reference](../cli/links/inbound-links-validate-link-reference.md) after a build to validate all inbound links.
21+
You have to use the [inbound-links validate-link-reference](../cli/inbound-links/validate-link-reference.md) after a build to validate all inbound links.
2222

2323
The reason for this is that validating all inbound links has to download all published [Link Index](link-index.md) files
2424
for the current [Content Source](../configure/content-sources.md).

0 commit comments

Comments
 (0)