# answerdotai/nbdev architecture

> Architecture diagram of the GitHub repository answerdotai/nbdev, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/answerdotai/nbdev
- Repository: https://github.com/answerdotai/nbdev

## Overview

nbdev is a notebook-driven development platform: developers author notebooks, export notebook cells into Python modules, and generate documentation and other project outputs. Its major capabilities also include syncing module edits back into notebooks, notebook testing and cleanup, merge support, configuration migration, and release tooling. The graph emphasizes those documented stages; several subsystem links are based on README capabilities because their implementations were not sampled.

Main entry points: [`nbdev/cli.py`](https://github.com/answerdotai/nbdev/blob/main/nbdev/cli.py) (CLI commands), [`nbdev/export.py`](https://github.com/answerdotai/nbdev/blob/main/nbdev/export.py) (Notebook export), [`nbdev/quarto.py`](https://github.com/answerdotai/nbdev/blob/main/nbdev/quarto.py) (Quarto integration), [`nbs`](https://github.com/answerdotai/nbdev/tree/main/nbs) (Project notebooks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Notebook authoring"]
  node_notebooks["Project notebooks"]
  node_config["Project configuration<br/>[config.py]"]
end

subgraph group_core["Export and sync"]
  node_export["Notebook export<br/>[export.py]"]
  node_processor["Notebook processor<br/>[process.py]"]
  node_processors["Cell processors<br/>[processors.py]"]
  node_maker["Module maker<br/>[maker.py]"]
  node_sync["Notebook sync<br/>[sync.py]"]
end

subgraph group_docs["Documentation"]
  node_doclinks["Documentation index<br/>[doclinks.py]"]
  node_showdoc["API documentation<br/>[showdoc.py]"]
  node_frontmatter["Frontmatter processing<br/>[frontmatter.py]"]
  node_quarto["Quarto integration<br/>[quarto.py]"]
  node_quarto_render["Quarto rendering<br/>[quarto_render.py]"]
end

subgraph group_workflow["Project workflows"]
  node_commands["CLI commands<br/>[cli.py]"]
  node_clean["Notebook cleanup<br/>[clean.py]"]
  node_merge["Notebook merge<br/>[merge.py]"]
  node_diff["Notebook diff<br/>[diff.py]"]
  node_test["Notebook tests<br/>[test.py]"]
  node_migrate["Project migration<br/>[migrate.py]"]
  node_release["Package release<br/>[release.py]"]
end

node_developer(("Developer"))
node_quarto_service["Quarto"]
node_package_registry["PyPI and conda"]
node_github_pages["GitHub Pages"]

node_developer -->|"authors"| node_notebooks
node_developer -->|"runs commands"| node_commands
node_commands -->|"reads settings"| node_config
node_commands -->|"invokes export"| node_export
node_export -->|"processes notebook"| node_processor
node_export -->|"creates modules"| node_maker
node_processor -.->|"runs processors"| node_processors
node_notebooks -->|"exports cells"| node_export
node_developer -->|"syncs edits"| node_sync
node_sync -->|"updates cells"| node_notebooks
node_commands -->|"builds index"| node_doclinks
node_doclinks -->|"exports notebooks"| node_export
node_notebooks -.->|"provides metadata"| node_frontmatter
node_commands -->|"builds docs"| node_quarto
node_quarto -.->|"renders notebooks"| node_quarto_render
node_quarto -->|"runs renderer"| node_quarto_service
node_quarto -->|"publishes docs"| node_github_pages
node_commands -->|"cleans notebooks"| node_clean
node_developer -->|"resolves conflicts"| node_merge
node_developer -->|"compares notebooks"| node_diff
node_commands -->|"runs tests"| node_test
node_developer -->|"migrates project"| node_migrate
node_developer -->|"releases package"| node_release
node_release -->|"publishes packages"| node_package_registry

click node_notebooks "https://github.com/answerdotai/nbdev/tree/main/nbs"
click node_config "https://github.com/answerdotai/nbdev/blob/main/nbdev/config.py"
click node_commands "https://github.com/answerdotai/nbdev/blob/main/nbdev/cli.py"
click node_export "https://github.com/answerdotai/nbdev/blob/main/nbdev/export.py"
click node_processor "https://github.com/answerdotai/nbdev/blob/main/nbdev/process.py"
click node_processors "https://github.com/answerdotai/nbdev/blob/main/nbdev/processors.py"
click node_maker "https://github.com/answerdotai/nbdev/blob/main/nbdev/maker.py"
click node_sync "https://github.com/answerdotai/nbdev/blob/main/nbdev/sync.py"
click node_doclinks "https://github.com/answerdotai/nbdev/blob/main/nbdev/doclinks.py"
click node_showdoc "https://github.com/answerdotai/nbdev/blob/main/nbdev/showdoc.py"
click node_frontmatter "https://github.com/answerdotai/nbdev/blob/main/nbdev/frontmatter.py"
click node_quarto "https://github.com/answerdotai/nbdev/blob/main/nbdev/quarto.py"
click node_quarto_render "https://github.com/answerdotai/nbdev/blob/main/nbdev/quarto_render.py"
click node_clean "https://github.com/answerdotai/nbdev/blob/main/nbdev/clean.py"
click node_merge "https://github.com/answerdotai/nbdev/blob/main/nbdev/merge.py"
click node_diff "https://github.com/answerdotai/nbdev/blob/main/nbdev/diff.py"
click node_test "https://github.com/answerdotai/nbdev/blob/main/nbdev/test.py"
click node_migrate "https://github.com/answerdotai/nbdev/blob/main/nbdev/migrate.py"
click node_release "https://github.com/answerdotai/nbdev/blob/main/nbdev/release.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_notebooks,node_config toneBlue
class node_export,node_processor,node_processors,node_maker,node_sync toneAmber
class node_doclinks,node_showdoc,node_frontmatter,node_quarto,node_quarto_render toneMint
class node_commands,node_clean,node_merge,node_diff,node_test,node_migrate,node_release toneRose
class node_developer,node_quarto_service,node_package_registry,node_github_pages toneIndigo
```

## Components

### Notebook authoring

- [Project notebooks](https://github.com/answerdotai/nbdev/tree/main/nbs): `nbs`
- [Project configuration](https://github.com/answerdotai/nbdev/blob/main/nbdev/config.py): `nbdev/config.py`

### Export and sync

- [Notebook export](https://github.com/answerdotai/nbdev/blob/main/nbdev/export.py): `nbdev/export.py`
- [Notebook processor](https://github.com/answerdotai/nbdev/blob/main/nbdev/process.py): `nbdev/process.py`
- [Cell processors](https://github.com/answerdotai/nbdev/blob/main/nbdev/processors.py): `nbdev/processors.py`
- [Module maker](https://github.com/answerdotai/nbdev/blob/main/nbdev/maker.py): `nbdev/maker.py`
- [Notebook sync](https://github.com/answerdotai/nbdev/blob/main/nbdev/sync.py): `nbdev/sync.py`

### Documentation

- [Documentation index](https://github.com/answerdotai/nbdev/blob/main/nbdev/doclinks.py): `nbdev/doclinks.py`
- [API documentation](https://github.com/answerdotai/nbdev/blob/main/nbdev/showdoc.py): `nbdev/showdoc.py`
- [Frontmatter processing](https://github.com/answerdotai/nbdev/blob/main/nbdev/frontmatter.py): `nbdev/frontmatter.py`
- [Quarto integration](https://github.com/answerdotai/nbdev/blob/main/nbdev/quarto.py): `nbdev/quarto.py`
- [Quarto rendering](https://github.com/answerdotai/nbdev/blob/main/nbdev/quarto_render.py): `nbdev/quarto_render.py`

### Project workflows

- [CLI commands](https://github.com/answerdotai/nbdev/blob/main/nbdev/cli.py): `nbdev/cli.py`
- [Notebook cleanup](https://github.com/answerdotai/nbdev/blob/main/nbdev/clean.py): `nbdev/clean.py`
- [Notebook merge](https://github.com/answerdotai/nbdev/blob/main/nbdev/merge.py): `nbdev/merge.py`
- [Notebook diff](https://github.com/answerdotai/nbdev/blob/main/nbdev/diff.py): `nbdev/diff.py`
- [Notebook tests](https://github.com/answerdotai/nbdev/blob/main/nbdev/test.py): `nbdev/test.py`
- [Project migration](https://github.com/answerdotai/nbdev/blob/main/nbdev/migrate.py): `nbdev/migrate.py`
- [Package release](https://github.com/answerdotai/nbdev/blob/main/nbdev/release.py): `nbdev/release.py`

### Other components

- **Developer**
- **Quarto**
- **PyPI and conda**
- **GitHub Pages**

## Connections

- Developer → Project notebooks: authors (evidence: `README.md`)
- Developer → CLI commands: runs commands (evidence: `README.md`)
- CLI commands → Project configuration: reads settings (evidence: `nbdev/cli.py`)
- CLI commands → Notebook export: invokes export (evidence: `nbdev/cli.py`)
- Notebook export → Notebook processor: processes notebook (evidence: `nbdev/export.py`)
- Notebook export → Module maker: creates modules (evidence: `nbdev/export.py`)
- Notebook processor → Cell processors: runs processors (evidence: `nbdev/processors.py`)
- Project notebooks → Notebook export: exports cells (evidence: `README.md`)
- Developer → Notebook sync: syncs edits (evidence: `README.md`)
- Notebook sync → Project notebooks: updates cells (evidence: `nbdev/sync.py`)
- CLI commands → Documentation index: builds index (evidence: `nbdev/cli.py`)
- Documentation index → Notebook export: exports notebooks (evidence: `nbdev/doclinks.py`)
- Project notebooks → Frontmatter processing: provides metadata
- CLI commands → Quarto integration: builds docs (evidence: `nbdev/cli.py`)
- Quarto integration → Quarto rendering: renders notebooks (evidence: `nbdev/quarto.py`)
- Quarto integration → Quarto: runs renderer (evidence: `nbdev/quarto.py`)
- Quarto integration → GitHub Pages: publishes docs (evidence: `README.md`)
- CLI commands → Notebook cleanup: cleans notebooks (evidence: `nbdev/cli.py`)
- Developer → Notebook merge: resolves conflicts (evidence: `README.md`)
- Developer → Notebook diff: compares notebooks (evidence: `README.md`)
- CLI commands → Notebook tests: runs tests (evidence: `nbdev/cli.py`)
- Developer → Project migration: migrates project (evidence: `README.md`)
- Developer → Package release: releases package (evidence: `README.md`)
- Package release → PyPI and conda: publishes packages (evidence: `README.md`)
