# yt-dlp/yt-dlp-nightly-builds architecture

> Architecture diagram of the GitHub repository yt-dlp/yt-dlp-nightly-builds, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-11-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/yt-dlp/yt-dlp-nightly-builds
- Repository: https://github.com/yt-dlp/yt-dlp-nightly-builds

## Overview

##### Project type and purpose
- This repository is not a traditional application with frontend/backend. It’s a CI-driven “nightly build” release pipeline for the open-source yt-dlp CLI tool. Its sole purpose is to automatically build, package, and publish nightly versions of yt-dlp to GitHub Releases (and serve as the “nightly” update channel for end users).

##### File structure
- The only file at the top level is README.md, which explains the purpose and points to the GitHub Actions workflows (not shown here) that perform the builds.

##### README for additional insights
- The README confirms that builds are triggered automatically (cron or on merge), and that end users can update to “nightly” via `yt-dlp --update-to nightly`.
- It references the upstream yt-dlp GitHub repo as the source of truth.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% External event
    CronTrigger(("cron / merge trigger")):::ciInfra

    %% Repositories
    UpstreamRepo["Upstream yt-dlp Repository"]:::codeRepo
    NightlyRepo["Nightly-builds Repository"]:::codeRepo
    Workflows["GitHub Actions Workflows"]:::ciInfra

    %% CI Infrastructure
    ActionsRunner["GitHub Actions Runner"]:::ciInfra

    subgraph "Build Matrix"
        direction TB
        Linux["Linux Build"]:::ciInfra
        Mac["macOS Build"]:::ciInfra
        Windows["Windows Build"]:::ciInfra
    end

    Packaging["Packaging Tools (pyinstaller, setuptools)"]:::ciInfra

    %% Artifact store
    GitHubReleases[(GitHub Releases)]:::artifactStore

    %% End user
    EndUser["End User CLI"]:::endUser

    %% Connections
    CronTrigger -->|"trigger workflow"| NightlyRepo
    NightlyRepo -->|"contains CI logic"| Workflows
    Workflows -->|"dispatch workflow"| ActionsRunner
    ActionsRunner -->|"git clone upstream"| UpstreamRepo
    ActionsRunner -->|"execute build matrix"| Linux
    ActionsRunner -->|"execute build matrix"| Mac
    ActionsRunner -->|"execute build matrix"| Windows
    Linux -->|"artifact"| Packaging
    Mac -->|"artifact"| Packaging
    Windows -->|"artifact"| Packaging
    Packaging -->|"upload nightly artifacts"| GitHubReleases
    EndUser -->|"update-to nightly"| GitHubReleases
    GitHubReleases -->|"download nightly"| EndUser

    %% Click Events
    click NightlyRepo "https://github.com/yt-dlp/yt-dlp-nightly-builds/blob/master/README.md"
    click Workflows "https://github.com/yt-dlp/yt-dlp-nightly-builds/tree/master/.github/workflows/"

    %% Styles
    classDef codeRepo fill:#cce5ff,stroke:#004085,color:#004085
    classDef ciInfra fill:#d4edda,stroke:#155724,color:#155724
    classDef artifactStore fill:#fff3cd,stroke:#856404,color:#856404
    classDef endUser fill:#e2e3e5,stroke:#6c757d,color:#6c757d
```
