# qgis-deployment/qgis-deployment-toolbelt-cli architecture

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

- Interactive diagram: https://gitdiagram.com/qgis-deployment/qgis-deployment-toolbelt-cli
- Repository: https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli

## Overview

QDT is a cross-platform CLI for applying organizational QGIS deployment scenarios. Its main workflow reads a scenario, selects and runs deployment jobs, and updates local QGIS profiles, plugins, settings, and related environment conveniences. The README also documents Git-backed profile management, conditional rules, variable-aware INI configuration, and bandwidth-conscious plugin handling; these appear as capability branches, though the sampled source does not establish all their runtime wiring. Job and handler paths are shown where supported by the tree; unsampled job internals are not inferred.

Main entry points: [`qgis_deployment_toolbelt/jobs/orchestrator.py`](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/orchestrator.py) (Jobs orchestrator), [`qgis_deployment_toolbelt/jobs/job_profiles_synchronizer.py`](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_profiles_synchronizer.py) (Profile sync and download), [`qgis_deployment_toolbelt/commands/deployment.py`](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/commands/deployment.py) (Deploy command), [`qgis_deployment_toolbelt/cli.py`](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/cli.py) (Command-line interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and scenarios"]
  node_cli["Command-line interface<br/>[cli.py]"]
  node_deployment["Deploy command<br/>[deployment.py]"]
  node_scenario["Scenario reader<br/>[scenario_reader.py]"]
end

subgraph group_jobs["Deployment jobs"]
  node_orchestrator["Jobs orchestrator<br/>[orchestrator.py]"]
  node_profile_jobs["Profile sync and download"]
  node_plugin_jobs["Plugin sync and download"]
  node_cleanup["Stale resource cleanup"]
  node_settings_jobs["Settings and environment jobs"]
  node_shortcuts_job["Shortcut management<br/>[job_shortcuts.py]"]
  node_splash_job["Splash management"]
  node_cleanup_manager["Cleanup manager"]
end

subgraph group_profiles["Profiles and rules"]
  node_profiles["Profile model<br/>[qdt_profile.py]"]
  node_rules["Conditional rules context<br/>[rules_context.py]"]
  node_git_handler["Git profile sources"]
  node_http_handler["HTTP profile source"]
end

subgraph group_runtime["QGIS integration"]
  node_ini["QGIS INI handling"]
  node_shortcuts["Shortcut creation"]
end

node_user(("Operator"))
node_git_service(("Git repository"))
node_http_service(("HTTP repository"))
node_qgis(("Local QGIS installation"))

node_user -->|"invokes"| node_cli
node_cli -->|"dispatches"| node_deployment
node_deployment -->|"reads scenario"| node_scenario
node_deployment -->|"runs jobs"| node_orchestrator
node_orchestrator -->|"dispatches"| node_profile_jobs
node_orchestrator -->|"dispatches"| node_plugin_jobs
node_orchestrator -->|"dispatches"| node_cleanup
node_orchestrator -->|"dispatches"| node_settings_jobs
node_orchestrator -->|"dispatches"| node_shortcuts_job
node_orchestrator -->|"dispatches"| node_splash_job
node_cleanup -->|"runs cleanup"| node_cleanup_manager
node_profile_jobs -->|"syncs profiles"| node_profiles
node_plugin_jobs -->|"uses profile data"| node_profiles
node_git_handler -.->|"reads repository"| node_git_service
node_http_handler -.->|"downloads files"| node_http_service
node_profile_jobs -.->|"uses source"| node_git_handler
node_profile_jobs -.->|"uses source"| node_http_handler
node_settings_jobs -->|"updates settings"| node_ini
node_shortcuts_job -->|"creates shortcuts"| node_shortcuts
node_ini -->|"configures"| node_qgis
node_shortcuts -->|"targets installation"| node_qgis
node_rules -.->|"supports conditions"| node_scenario

click node_cli "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/cli.py"
click node_deployment "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/commands/deployment.py"
click node_scenario "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/scenarios/scenario_reader.py"
click node_orchestrator "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/orchestrator.py"
click node_profile_jobs "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_profiles_synchronizer.py"
click node_plugin_jobs "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_plugins_synchronizer.py"
click node_cleanup "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_cleanup_manager.py"
click node_settings_jobs "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_environment_variables.py"
click node_shortcuts_job "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_shortcuts.py"
click node_splash_job "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_splash_screen.py"
click node_profiles "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/qdt_profile.py"
click node_rules "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/rules_context.py"
click node_git_handler "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/profiles_handler_base.py"
click node_http_handler "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/remote_http_handler.py"
click node_ini "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/qgis_ini_handler.py"
click node_shortcuts "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/shortcuts/shortcuts_handler.py"
click node_cleanup_manager "https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_cleanup_manager.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_cli,node_deployment,node_scenario toneBlue
class node_orchestrator,node_profile_jobs,node_plugin_jobs,node_cleanup,node_settings_jobs,node_shortcuts_job,node_splash_job,node_cleanup_manager toneAmber
class node_profiles,node_rules,node_git_handler,node_http_handler toneMint
class node_ini,node_shortcuts toneRose
class node_user,node_git_service,node_http_service,node_qgis toneIndigo
```

## Components

### CLI and scenarios

- [Command-line interface](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/cli.py): `qgis_deployment_toolbelt/cli.py`
- [Deploy command](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/commands/deployment.py): `qgis_deployment_toolbelt/commands/deployment.py`
- [Scenario reader](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/scenarios/scenario_reader.py): `qgis_deployment_toolbelt/scenarios/scenario_reader.py`

### Deployment jobs

- [Jobs orchestrator](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/orchestrator.py): `qgis_deployment_toolbelt/jobs/orchestrator.py`
- [Profile sync and download](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_profiles_synchronizer.py): `qgis_deployment_toolbelt/jobs/job_profiles_synchronizer.py`
- [Plugin sync and download](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_plugins_synchronizer.py): `qgis_deployment_toolbelt/jobs/job_plugins_synchronizer.py`
- [Stale resource cleanup](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_cleanup_manager.py): `qgis_deployment_toolbelt/jobs/job_cleanup_manager.py`
- [Settings and environment jobs](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_environment_variables.py): `qgis_deployment_toolbelt/jobs/job_environment_variables.py`
- [Shortcut management](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_shortcuts.py): `qgis_deployment_toolbelt/jobs/job_shortcuts.py`
- [Splash management](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_splash_screen.py): `qgis_deployment_toolbelt/jobs/job_splash_screen.py`
- [Cleanup manager](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/jobs/job_cleanup_manager.py): `qgis_deployment_toolbelt/jobs/job_cleanup_manager.py`

### Profiles and rules

- [Profile model](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/qdt_profile.py): `qgis_deployment_toolbelt/profiles/qdt_profile.py`
- [Conditional rules context](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/rules_context.py): `qgis_deployment_toolbelt/profiles/rules_context.py`
- [Git profile sources](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/profiles_handler_base.py): `qgis_deployment_toolbelt/profiles/profiles_handler_base.py`
- [HTTP profile source](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/remote_http_handler.py): `qgis_deployment_toolbelt/profiles/remote_http_handler.py`

### QGIS integration

- [QGIS INI handling](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/profiles/qgis_ini_handler.py): `qgis_deployment_toolbelt/profiles/qgis_ini_handler.py`
- [Shortcut creation](https://github.com/qgis-deployment/qgis-deployment-toolbelt-cli/blob/main/qgis_deployment_toolbelt/shortcuts/shortcuts_handler.py): `qgis_deployment_toolbelt/shortcuts/shortcuts_handler.py`

### Other components

- **Operator**
- **Git repository**
- **HTTP repository**
- **Local QGIS installation**

## Connections

- Operator → Command-line interface: invokes
- Command-line interface → Deploy command: dispatches
- Deploy command → Scenario reader: reads scenario
- Deploy command → Jobs orchestrator: runs jobs
- Jobs orchestrator → Profile sync and download: dispatches
- Jobs orchestrator → Plugin sync and download: dispatches
- Jobs orchestrator → Stale resource cleanup: dispatches
- Jobs orchestrator → Settings and environment jobs: dispatches
- Jobs orchestrator → Shortcut management: dispatches
- Jobs orchestrator → Splash management: dispatches
- Stale resource cleanup → Cleanup manager: runs cleanup
- Profile sync and download → Profile model: syncs profiles
- Plugin sync and download → Profile model: uses profile data
- Git profile sources → Git repository: reads repository
- HTTP profile source → HTTP repository: downloads files
- Profile sync and download → Git profile sources: uses source
- Profile sync and download → HTTP profile source: uses source
- Settings and environment jobs → QGIS INI handling: updates settings
- Shortcut management → Shortcut creation: creates shortcuts
- QGIS INI handling → Local QGIS installation: configures
- Shortcut creation → Local QGIS installation: targets installation
- Conditional rules context → Scenario reader: supports conditions
