How langchain-ai/docs works
This repository’s product is the LangChain documentation pipeline: it builds Mintlify-ready output from documentation sources and offers local watch-and-preview plus migration and cross-reference maintenance commands. The graph follows the documented CLI workflow and the sampled build, preprocessing, parsing, and watcher relationships. Some CLI capabilities are documented but their implementations were not sampled; those are represented at the CLI boundary rather than with guessed internal stages.
Main entry points: cli.py Docs CLI · builder.py Documentation Builder · dev.py Dev Command · markdown_preprocessor.py Markdown Preprocessor
Components 18
CLI and Commands
- Docs CLI
pipeline/cli.py - Build Command
pipeline/commands/build.py - Dev Command
pipeline/commands/dev.py
Build and Preview
- Documentation Sources
- Documentation Builder
pipeline/core/builder.py - Build Output
- File Watcher
pipeline/core/watcher.py - Mintlify Dev Server
Content Transformation
- Markdown Preprocessor
pipeline/preprocessors/markdown_preprocessor.py - Autolink Resolver
pipeline/preprocessors/handle_auto_links.py - Cross-reference Map
pipeline/preprocessors/link_map.py - UTM Link Rewriter
pipeline/preprocessors/utm_links.py
Migration Tools
- Docusaurus Converter
pipeline/tools/docusaurus_parser.py - Notebook Converter
pipeline/tools/notebook/convert.py - Markdown Parser
pipeline/tools/parser.py - Markdown Lexer
pipeline/tools/lexer.py - Link Utilities
pipeline/tools/links.py
Other components
- Documentation Contributor
Connections 19
- Documentation Contributor → Docs CLI: runs commands
README.md - Docs CLI → Build Command: routes build
pipeline/cli.py - Docs CLI → Dev Command: routes dev
pipeline/cli.py - Docs CLI → Docusaurus Converter: converts Docusaurus
pipeline/cli.py - Docs CLI → Notebook Converter: converts notebooks
pipeline/cli.py - Docs CLI → Markdown Parser: migrates Markdown
pipeline/cli.py - Docs CLI → Link Utilities: updates references
pipeline/cli.py - Build Command → Documentation Builder: builds with
pipeline/commands/build.py - Documentation Sources → Documentation Builder: provides files
README.md - Documentation Builder → Markdown Preprocessor: preprocesses Markdown
pipeline/core/builder.py - Documentation Builder → Build Output: writes build
README.md - Markdown Preprocessor → Autolink Resolver: resolves autolinks
pipeline/preprocessors/markdown_preprocessor.py - Markdown Preprocessor → UTM Link Rewriter: rewrites tracking links
pipeline/preprocessors/markdown_preprocessor.py - Autolink Resolver → Cross-reference Map: looks up links
pipeline/preprocessors/handle_auto_links.py - Markdown Parser → Markdown Lexer: tokenizes with
pipeline/tools/parser.py - Dev Command → Build Command: runs initial build
pipeline/commands/dev.py - Dev Command → File Watcher: starts watching
pipeline/commands/dev.py - Dev Command → Mintlify Dev Server: launches server
pipeline/commands/dev.py - File Watcher → Documentation Builder: rebuilds changed files
pipeline/core/watcher.py