Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

DocFX

$ docfx Official Low Risk
Microsoft · Design & Docs · MIT · macos / linux / windows

DocFX (docfx) is Microsoft's .NET documentation generator combining Roslyn-extracted C#/VB/F# API metadata (docfx metadata) with conceptual Markdown articles into a static website (docfx build). It supports --warningsAsErrors, --noRestore, --disableGitFeatures, and structured JSON log files via -l log.json.

FCRS-1.0 Score
81 /100
Good
Medium Confidence
Zero-Friction Install
brew install docfx
CLI vs MCP Decision CLI Only

Extracting Roslyn .NET API metadata and compiling docfx.json sites runs locally against the .NET SDK without MCP overhead.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 19 / 25

Headless metadata and build subcommands with --noRestore, --warningsAsErrors, and -l <file>.json JSON logging, though stdout itself is plain text.

  • -l <file> writes structured JSON log entries
  • --noRestore and --warningsAsErrors support offline strict CI checks
Trust & Safety 21 / 25

Writes static HTML/YAML outputs locally, though docfx metadata loads .csproj MSBuild evaluation and can trigger dotnet restore unless --noRestore is set.

  • MSBuild project evaluation; --noRestore prevents implicit NuGet fetches
Setup & Portability 12 / 15

Installable via brew install docfx, dotnet tool update -g docfx, and GitHub releases; API metadata requires matching .NET SDK.

  • Cross-platform .NET tool; requires .NET SDK for metadata
Utility & Efficiency 12 / 15

Premier API + conceptual Markdown doc compiler for the .NET ecosystem with built-in PDF and cross-reference support.

  • Roslyn C#/VB/F# API reflection + Markdown static site builder
Maintenance & Lineage 9 / 10

Official Microsoft .NET Foundation project (dotnet/docfx) actively maintained under MIT.

  • Official dotnet/docfx GitHub repository
Docs & Verifiability 8 / 10

Clear CLI reference at dotnet.github.io/docfx/docs/cli.html.

  • Official docs at dotnet.github.io/docfx/docs/cli.html

Security, Auth & Guardrails

Auth Modes
No Auth
Credential Storage

None required; uses local .NET SDK / NuGet restore caches when extracting API metadata.

Side Effects
Read-Only Local Write
Cost & Quotas

100% free and open-source (MIT).

Copyable Guardrail for CLAUDE.md / AGENTS.md
# DocFX Agent Rules
- Do not pass `--serve` in synchronous tool runs; use `docfx build` to verify builds cleanly.
- Pass `--noRestore` on `docfx metadata` when dependencies are already restored to avoid network NuGet calls.
- Use `-l <file>.json` and `--warningsAsErrors` to capture structured build diagnostics.

Agent-Ready Command Recipes

Safe Read-Only Queries

Inspect DocFX CLI version and options
docfx --version

Prints the installed docfx version without loading MSBuild or docfx.json.

Controlled Writes & Previews

Extract .NET API metadata without NuGet restore
docfx metadata docfx.json --noRestore --warningsAsErrors

Generates API YAML metadata using --noRestore and fails on warnings.

Build static documentation site with JSON log
docfx build docfx.json --warningsAsErrors -l docfx-log.json

Builds the static site into _site/ and writes structured JSON diagnostics to docfx-log.json.

Strengths for Agents

  • + Official Microsoft .NET API + conceptual Markdown site compiler with --noRestore and --warningsAsErrors.
  • + Structured JSON diagnostic log export via -l <log.json>.

Caveats & Pitfalls

  • ! docfx metadata requires a matching .NET SDK and runs MSBuild project loading.
  • ! JSON diagnostics write to a log file (-l) rather than stdout.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI