How diplodoc-platform/cli works
Yfm-docs is a documentation-project CLI: users initialize projects, process Markdown content, and use the broader YFM documentation tooling. The visible runtime centers on command dispatch and shared project services for configuration, file access, Markdown, variables, navigation, and metadata; translation and publishing are additional command branches. The README documents full builds, but the supplied tree has no build-command source, so that implementation is not mapped. Edges use README statements or SOURCE INDEX references; unsampled command internals are not inferred.
Main entry points: translate/index.ts Translation commands · commands/index.ts Command registry · content/index.ts Content command · src/index.ts CLI entry
Components 25
CLI and setup
- CLI entry
src/index.ts - Command registry
src/commands/index.ts - Program runtime
src/core/program/index.ts - Project initializer
src/commands/init/index.ts - Publish command
src/commands/publish/index.ts
Documentation processing
- Content command
src/commands/content/index.ts - Markdown processing
src/core/markdown/MarkdownService.ts - Navigation TOC
src/core/toc/TocService.ts - Page metadata
src/core/meta/MetaService.ts - Leading content
src/core/leading/LeadingService.ts
Project services
- Config resolver
src/core/config/index.ts - Project run
src/core/run/index.ts - Variable presets
src/core/vars/VarsService.ts
Integrations
- VCS service
src/core/vcs/VcsService.ts - GitHub connector
src/extensions/github-vcs/connector.ts - Arcadia connector
src/extensions/arcadia-vcs/connector.ts - Local search
src/extensions/local-search/provider.ts
Translation workflows
- Translation commands
src/commands/translate/index.ts - Extract and compose
src/commands/translate/commands/extract.ts - Seed translations
src/commands/translate/commands/seed.ts - Translation runner
src/commands/translate/run.ts - AI provider
src/commands/translate/providers/ai/index.ts - Yandex provider
src/commands/translate/providers/yandex/index.ts - Translation evaluation
src/commands/translate/eval/run.ts
Other components
- CLI user
Connections 25
- CLI user → CLI entry: runs CLI
src/index.ts - CLI entry → Command registry: dispatches through
src/index.ts - CLI entry → Content command: detects raw mode
src/index.ts - Command registry → Program runtime: creates runtime
src/commands/index.ts - Command registry → Project initializer: registers command
src/commands/index.ts - Command registry → Translation commands: registers command
src/commands/index.ts - Command registry → Publish command: registers command
src/commands/index.ts - Program runtime → Config resolver: resolves config
src/core/program/index.ts - Content command → Project run: creates run
src/commands/content/index.ts - Content command → Markdown processing: renders content
src/commands/content/index.ts - Content command → Variable presets: initializes presets
src/commands/content/index.ts - Markdown processing → Page metadata: records metadata
src/core/markdown/MarkdownService.ts - Navigation TOC → Page metadata: adds no-index metadata
src/core/toc/TocService.ts - Project run → Config resolver: uses configuration
src/core/run/index.ts - Translation commands → Extract and compose: registers extract
src/commands/translate/index.ts - Translation commands → Seed translations: registers seed
src/commands/translate/index.ts - Translation commands → Translation runner: uses runner
src/commands/translate/index.ts - Translation commands → AI provider: registers provider
src/commands/translate/index.ts - Translation commands → Yandex provider: registers provider
src/commands/translate/index.ts - Translation commands → Translation evaluation: offers evaluation
- VCS service → Navigation TOC: uses navigation
src/core/vcs/VcsService.ts - GitHub connector → VCS service: implements connector
- Arcadia connector → VCS service: implements connector
- Leading content → Variable presets: uses presets
src/core/leading/LeadingService.ts - Leading content → Page metadata: uses metadata
src/core/leading/LeadingService.ts