# tldr-pages/tldr architecture

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

- Interactive diagram: https://gitdiagram.com/tldr-pages/tldr
- Repository: https://github.com/tldr-pages/tldr

## Overview

tldr-pages is a community-maintained corpus of concise, practical command examples, organized by operating system and language. The main user journey is to look up a command in a client and get its relevant help page. Contributors create or revise Markdown pages; translation directories hold localized versions, and repository scripts assist with common edits and synchronization. The PDF renderer offers a separate way to consume the corpus. The README documents client usage and PDF support; sampled source confirms editing helpers and PDF rendering, but not client internals.

Main entry points: [`pages.fr`](https://github.com/tldr-pages/tldr/tree/main/pages.fr) (Localized pages), [`pages`](https://github.com/tldr-pages/tldr/tree/main/pages) (English pages), [`scripts/_common.py`](https://github.com/tldr-pages/tldr/blob/main/scripts/_common.py) (Shared helpers), [`scripts/set-page-title.py`](https://github.com/tldr-pages/tldr/blob/main/scripts/set-page-title.py) (Title editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Page corpus"]
  node_english["English pages"]
  node_platforms["Platform pages"]
end

subgraph group_translation["Translations"]
  node_localized["Localized pages<br/>[pages.fr]"]
end

subgraph group_tools["Contribution tools"]
  node_title_tool["Title editor<br/>[set-page-title.py]"]
  node_alias_tool["Alias editor<br/>[set-alias-page.py]"]
  node_see_also_tool["See-also editor<br/>[set-see-also.py]"]
  node_link_tool["Info-link editor"]
  node_command_tool["Example updater<br/>[update-command.py]"]
  node_shared_helpers["Shared helpers<br/>[_common.py]"]
end

subgraph group_consumption["Consumption"]
  node_clients["tldr clients"]
  node_pdf_renderer["PDF renderer<br/>[render.py]"]
  node_pdf["PDF book"]
end

node_contributors(("Contributors"))
node_users(("Command-line users"))

node_contributors -->|"write pages"| node_english
node_contributors -->|"translate pages"| node_localized
node_users -->|"request help"| node_clients
node_clients -->|"look up"| node_english
node_clients -->|"look up"| node_platforms
node_english -->|"serve examples"| node_clients
node_platforms -->|"serve examples"| node_clients
node_contributors -->|"edit title"| node_title_tool
node_contributors -->|"edit alias"| node_alias_tool
node_contributors -->|"edit references"| node_see_also_tool
node_contributors -->|"edit link"| node_link_tool
node_contributors -->|"update examples"| node_command_tool
node_title_tool -->|"use"| node_shared_helpers
node_alias_tool -->|"use"| node_shared_helpers
node_see_also_tool -->|"use"| node_shared_helpers
node_link_tool -->|"use"| node_shared_helpers
node_title_tool -->|"update translations"| node_localized
node_alias_tool -->|"update translations"| node_localized
node_see_also_tool -->|"update translations"| node_localized
node_link_tool -->|"update translations"| node_localized
node_command_tool -->|"update examples"| node_english
node_command_tool -->|"update examples"| node_localized
node_contributors -->|"request export"| node_pdf_renderer
node_pdf_renderer -->|"read pages"| node_english
node_pdf_renderer -->|"render PDF"| node_pdf

click node_english "https://github.com/tldr-pages/tldr/tree/main/pages"
click node_platforms "https://github.com/tldr-pages/tldr/tree/main/pages/common"
click node_localized "https://github.com/tldr-pages/tldr/tree/main/pages.fr"
click node_title_tool "https://github.com/tldr-pages/tldr/blob/main/scripts/set-page-title.py"
click node_alias_tool "https://github.com/tldr-pages/tldr/blob/main/scripts/set-alias-page.py"
click node_see_also_tool "https://github.com/tldr-pages/tldr/blob/main/scripts/set-see-also.py"
click node_link_tool "https://github.com/tldr-pages/tldr/blob/main/scripts/set-more-info-link.py"
click node_command_tool "https://github.com/tldr-pages/tldr/blob/main/scripts/update-command.py"
click node_shared_helpers "https://github.com/tldr-pages/tldr/blob/main/scripts/_common.py"
click node_pdf_renderer "https://github.com/tldr-pages/tldr/blob/main/scripts/pdf/render.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_english,node_platforms,node_users toneBlue
class node_localized toneAmber
class node_title_tool,node_alias_tool,node_see_also_tool,node_link_tool,node_command_tool,node_shared_helpers toneMint
class node_clients,node_pdf_renderer,node_pdf toneRose
class node_contributors toneIndigo
```

## Components

### Page corpus

- [English pages](https://github.com/tldr-pages/tldr/tree/main/pages): `pages`
- [Platform pages](https://github.com/tldr-pages/tldr/tree/main/pages/common): `pages/common`

### Translations

- [Localized pages](https://github.com/tldr-pages/tldr/tree/main/pages.fr): `pages.fr`

### Contribution tools

- [Title editor](https://github.com/tldr-pages/tldr/blob/main/scripts/set-page-title.py): `scripts/set-page-title.py`
- [Alias editor](https://github.com/tldr-pages/tldr/blob/main/scripts/set-alias-page.py): `scripts/set-alias-page.py`
- [See-also editor](https://github.com/tldr-pages/tldr/blob/main/scripts/set-see-also.py): `scripts/set-see-also.py`
- [Info-link editor](https://github.com/tldr-pages/tldr/blob/main/scripts/set-more-info-link.py): `scripts/set-more-info-link.py`
- [Example updater](https://github.com/tldr-pages/tldr/blob/main/scripts/update-command.py): `scripts/update-command.py`
- [Shared helpers](https://github.com/tldr-pages/tldr/blob/main/scripts/_common.py): `scripts/_common.py`

### Consumption

- **tldr clients**
- [PDF renderer](https://github.com/tldr-pages/tldr/blob/main/scripts/pdf/render.py): `scripts/pdf/render.py`
- **PDF book**

### Other components

- **Contributors**
- **Command-line users**

## Connections

- Contributors → English pages: write pages
- Contributors → Localized pages: translate pages
- Command-line users → tldr clients: request help
- tldr clients → English pages: look up
- tldr clients → Platform pages: look up
- English pages → tldr clients: serve examples
- Platform pages → tldr clients: serve examples
- Contributors → Title editor: edit title
- Contributors → Alias editor: edit alias
- Contributors → See-also editor: edit references
- Contributors → Info-link editor: edit link
- Contributors → Example updater: update examples
- Title editor → Shared helpers: use
- Alias editor → Shared helpers: use
- See-also editor → Shared helpers: use
- Info-link editor → Shared helpers: use
- Title editor → Localized pages: update translations
- Alias editor → Localized pages: update translations
- See-also editor → Localized pages: update translations
- Info-link editor → Localized pages: update translations
- Example updater → English pages: update examples
- Example updater → Localized pages: update examples
- Contributors → PDF renderer: request export
- PDF renderer → English pages: read pages
- PDF renderer → PDF book: render PDF
