# scoopinstaller/scoop architecture

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

- Interactive diagram: https://gitdiagram.com/scoopinstaller/scoop
- Repository: https://github.com/scoopinstaller/scoop

## Overview

Scoop is a Windows command-line app installer. Its main workflow is selecting an app from a bucket, resolving dependencies, downloading and installing the app, then exposing it for use; it also supports updates, removal, and bucket management. The README documents these capabilities, but the sampled source covers only the standalone manifest validator. Accordingly, most internal workflow links are dashed and unverified rather than asserted as observed calls.

Main entry points: [`lib/commands.ps1`](https://github.com/scoopinstaller/scoop/blob/master/lib/commands.ps1) (Command Dispatch), [`lib/install.ps1`](https://github.com/scoopinstaller/scoop/blob/master/lib/install.ps1) (App Installation), [`libexec/scoop-update.ps1`](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-update.ps1) (App Updates), [`libexec/scoop-bucket.ps1`](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-bucket.ps1) (Bucket Management)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_scoop["Scoop CLI<br/>[scoop.ps1]"]
  node_commands["Command Dispatch<br/>[commands.ps1]"]
end

subgraph group_catalog["App Catalog"]
  node_search["Search Apps<br/>[scoop-search.ps1]"]
  node_buckets["Bucket Management<br/>[scoop-bucket.ps1]"]
  node_manifests["App Manifests<br/>[manifest.ps1]"]
  node_validator["Manifest Validator<br/>[validator.cs]"]
  node_validation["Validation Logic<br/>[Scoop.Validator.cs]"]
end

subgraph group_lifecycle["App Lifecycle"]
  node_dependencies["Dependency Resolution<br/>[depends.ps1]"]
  node_download["Downloads<br/>[download.ps1]"]
  node_install["App Installation<br/>[install.ps1]"]
  node_decompress["Archive Extraction<br/>[decompress.ps1]"]
  node_shims["Command Shims<br/>[shortcuts.ps1]"]
end

subgraph group_management["Management"]
  node_update["App Updates<br/>[scoop-update.ps1]"]
  node_uninstall["App Removal"]
  node_database[("Installed App State<br/>[database.ps1]")]
  node_config["Configuration<br/>[scoop-config.ps1]"]
end

node_user(("User"))
node_bucketrepos(("Bucket Repositories"))
node_network(("Download Sources"))

node_user -->|"runs commands"| node_scoop
node_scoop -.->|"dispatches"| node_commands
node_commands -.->|"routes to"| node_search
node_commands -.->|"routes to"| node_buckets
node_commands -.->|"routes to"| node_install
node_commands -.->|"routes to"| node_update
node_commands -.->|"routes to"| node_uninstall
node_commands -.->|"routes to"| node_config
node_bucketrepos -->|"provides apps"| node_buckets
node_buckets -.->|"provides manifests"| node_manifests
node_install -.->|"uses manifest"| node_manifests
node_install -->|"resolves dependencies"| node_dependencies
node_install -.->|"downloads app"| node_download
node_network -.->|"provides files"| node_download
node_install -.->|"extracts archives"| node_decompress
node_install -.->|"sets up commands"| node_shims
node_install -.->|"records install"| node_database
node_update -.->|"downloads updates"| node_download
node_update -.->|"updates state"| node_database
node_uninstall -.->|"updates state"| node_database
node_validator -->|"uses validator"| node_validation

click node_scoop "https://github.com/scoopinstaller/scoop/blob/master/bin/scoop.ps1"
click node_commands "https://github.com/scoopinstaller/scoop/blob/master/lib/commands.ps1"
click node_search "https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-search.ps1"
click node_buckets "https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-bucket.ps1"
click node_manifests "https://github.com/scoopinstaller/scoop/blob/master/lib/manifest.ps1"
click node_validator "https://github.com/scoopinstaller/scoop/blob/master/supporting/validator/validator.cs"
click node_validation "https://github.com/scoopinstaller/scoop/blob/master/supporting/validator/Scoop.Validator.cs"
click node_dependencies "https://github.com/scoopinstaller/scoop/blob/master/lib/depends.ps1"
click node_download "https://github.com/scoopinstaller/scoop/blob/master/lib/download.ps1"
click node_install "https://github.com/scoopinstaller/scoop/blob/master/lib/install.ps1"
click node_decompress "https://github.com/scoopinstaller/scoop/blob/master/lib/decompress.ps1"
click node_shims "https://github.com/scoopinstaller/scoop/blob/master/lib/shortcuts.ps1"
click node_update "https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-update.ps1"
click node_uninstall "https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-uninstall.ps1"
click node_database "https://github.com/scoopinstaller/scoop/blob/master/lib/database.ps1"
click node_config "https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-config.ps1"

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_scoop,node_commands,node_user toneBlue
class node_search,node_buckets,node_manifests,node_validator,node_validation toneAmber
class node_dependencies,node_download,node_install,node_decompress,node_shims toneMint
class node_update,node_uninstall,node_database,node_config toneRose
class node_bucketrepos,node_network toneIndigo
```

## Components

### CLI

- [Scoop CLI](https://github.com/scoopinstaller/scoop/blob/master/bin/scoop.ps1): `bin/scoop.ps1`
- [Command Dispatch](https://github.com/scoopinstaller/scoop/blob/master/lib/commands.ps1): `lib/commands.ps1`

### App Catalog

- [Search Apps](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-search.ps1): `libexec/scoop-search.ps1`
- [Bucket Management](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-bucket.ps1): `libexec/scoop-bucket.ps1`
- [App Manifests](https://github.com/scoopinstaller/scoop/blob/master/lib/manifest.ps1): `lib/manifest.ps1`
- [Manifest Validator](https://github.com/scoopinstaller/scoop/blob/master/supporting/validator/validator.cs): `supporting/validator/validator.cs`
- [Validation Logic](https://github.com/scoopinstaller/scoop/blob/master/supporting/validator/Scoop.Validator.cs): `supporting/validator/Scoop.Validator.cs`

### App Lifecycle

- [Dependency Resolution](https://github.com/scoopinstaller/scoop/blob/master/lib/depends.ps1): `lib/depends.ps1`
- [Downloads](https://github.com/scoopinstaller/scoop/blob/master/lib/download.ps1): `lib/download.ps1`
- [App Installation](https://github.com/scoopinstaller/scoop/blob/master/lib/install.ps1): `lib/install.ps1`
- [Archive Extraction](https://github.com/scoopinstaller/scoop/blob/master/lib/decompress.ps1): `lib/decompress.ps1`
- [Command Shims](https://github.com/scoopinstaller/scoop/blob/master/lib/shortcuts.ps1): `lib/shortcuts.ps1`

### Management

- [App Updates](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-update.ps1): `libexec/scoop-update.ps1`
- [App Removal](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-uninstall.ps1): `libexec/scoop-uninstall.ps1`
- [Installed App State](https://github.com/scoopinstaller/scoop/blob/master/lib/database.ps1): `lib/database.ps1`
- [Configuration](https://github.com/scoopinstaller/scoop/blob/master/libexec/scoop-config.ps1): `libexec/scoop-config.ps1`

### Other components

- **User**
- **Bucket Repositories**
- **Download Sources**

## Connections

- User → Scoop CLI: runs commands (evidence: `README.md`)
- Scoop CLI → Command Dispatch: dispatches
- Command Dispatch → Search Apps: routes to
- Command Dispatch → Bucket Management: routes to
- Command Dispatch → App Installation: routes to
- Command Dispatch → App Updates: routes to
- Command Dispatch → App Removal: routes to
- Command Dispatch → Configuration: routes to
- Bucket Repositories → Bucket Management: provides apps (evidence: `README.md`)
- Bucket Management → App Manifests: provides manifests
- App Installation → App Manifests: uses manifest
- App Installation → Dependency Resolution: resolves dependencies (evidence: `README.md`)
- App Installation → Downloads: downloads app
- Download Sources → Downloads: provides files
- App Installation → Archive Extraction: extracts archives
- App Installation → Command Shims: sets up commands
- App Installation → Installed App State: records install
- App Updates → Downloads: downloads updates
- App Updates → Installed App State: updates state
- App Removal → Installed App State: updates state
- Manifest Validator → Validation Logic: uses validator (evidence: `supporting/validator/validator.cs`)
