# willclaf/disco-livre architecture

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

- Interactive diagram: https://gitdiagram.com/willclaf/disco-livre
- Repository: https://github.com/willclaf/disco-livre

## Overview

Disco Livre is a macOS disk-space analyzer and cleanup tool, available through a menu-bar app, a Terminal CLI, and an AI-agent skill. The main workflow is to inspect disk usage, review safe and optional cleanup candidates, then free selected space; a background watcher also monitors free space and crash loops. The app’s CLI invocation is visible in the Swift excerpt. CLI internals are not sampled, so their relationships below rely on README statements rather than inspected implementation.

Main entry points: [`bin/disco-livre`](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre) (Terminal CLI), [`app/DiscoLivre.swift`](https://github.com/willclaf/disco-livre/blob/main/app/DiscoLivre.swift) (Menu-bar app), [`skill/disco-livre/SKILL.md`](https://github.com/willclaf/disco-livre/blob/main/skill/disco-livre/SKILL.md) (AI skill)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_menu_app["Menu-bar app<br/>[DiscoLivre.swift]"]
  node_terminal_cli["Terminal CLI"]
  node_agent_skill["AI skill<br/>[SKILL.md]"]
end

subgraph group_inspection["Disk inspection"]
  node_disk_analysis["Disk analysis"]
  node_folder_scan["Hidden folders"]
  node_crash_detection["Crash detection"]
  node_task_audit["Background task audit"]
  node_browser_audit["Browser audit"]
end

subgraph group_cleanup["Cleanup and control"]
  node_cleanup_candidates["Cleanup candidates"]
  node_selected_cleanup["Selected cleanup"]
  node_trash["Trash management"]
  node_folder_move["Folder mover"]
  node_settings["Configuration"]
end

subgraph group_monitoring["Background monitoring"]
  node_watcher["Space watcher"]
  node_alerts["Alerts and log"]
end

node_user(("Mac user"))
node_ai(("AI assistant"))
node_release_service["GitHub releases"]

node_user -->|"opens"| node_menu_app
node_user -->|"runs commands"| node_terminal_cli
node_ai -->|"invokes"| node_agent_skill
node_agent_skill -->|"runs analysis"| node_terminal_cli
node_menu_app -->|"runs CLI"| node_terminal_cli
node_terminal_cli -->|"runs analysis"| node_disk_analysis
node_terminal_cli -->|"measures folders"| node_folder_scan
node_terminal_cli -->|"reports crash loops"| node_crash_detection
node_terminal_cli -->|"audits tasks"| node_task_audit
node_terminal_cli -->|"audits browsers"| node_browser_audit
node_disk_analysis -->|"lists candidates"| node_cleanup_candidates
node_menu_app -->|"shows candidates"| node_cleanup_candidates
node_menu_app -->|"cleans selections"| node_selected_cleanup
node_terminal_cli -->|"cleans items"| node_selected_cleanup
node_terminal_cli -->|"empties trash"| node_trash
node_terminal_cli -->|"moves folder"| node_folder_move
node_terminal_cli -->|"changes settings"| node_settings
node_menu_app -->|"changes settings"| node_settings
node_settings -->|"configures"| node_watcher
node_watcher -->|"reports conditions"| node_alerts
node_menu_app -->|"checks updates"| node_release_service

click node_menu_app "https://github.com/willclaf/disco-livre/blob/main/app/DiscoLivre.swift"
click node_terminal_cli "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_agent_skill "https://github.com/willclaf/disco-livre/blob/main/skill/disco-livre/SKILL.md"
click node_disk_analysis "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_folder_scan "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_crash_detection "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_task_audit "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_browser_audit "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_cleanup_candidates "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_selected_cleanup "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_trash "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_folder_move "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_settings "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_watcher "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"
click node_alerts "https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre"

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_menu_app,node_terminal_cli,node_agent_skill,node_user toneBlue
class node_disk_analysis,node_folder_scan,node_crash_detection,node_task_audit,node_browser_audit toneAmber
class node_cleanup_candidates,node_selected_cleanup,node_trash,node_folder_move,node_settings toneMint
class node_watcher,node_alerts toneRose
class node_ai,node_release_service toneIndigo
```

## Components

### User interfaces

- [Menu-bar app](https://github.com/willclaf/disco-livre/blob/main/app/DiscoLivre.swift): `app/DiscoLivre.swift`
- [Terminal CLI](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [AI skill](https://github.com/willclaf/disco-livre/blob/main/skill/disco-livre/SKILL.md): `skill/disco-livre/SKILL.md`

### Disk inspection

- [Disk analysis](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Hidden folders](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Crash detection](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Background task audit](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Browser audit](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`

### Cleanup and control

- [Cleanup candidates](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Selected cleanup](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Trash management](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Folder mover](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Configuration](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`

### Background monitoring

- [Space watcher](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`
- [Alerts and log](https://github.com/willclaf/disco-livre/blob/main/bin/disco-livre): `bin/disco-livre`

### Other components

- **Mac user**
- **AI assistant**
- **GitHub releases**

## Connections

- Mac user → Menu-bar app: opens (evidence: `README.md`)
- Mac user → Terminal CLI: runs commands (evidence: `README.md`)
- AI assistant → AI skill: invokes (evidence: `README.md`)
- AI skill → Terminal CLI: runs analysis (evidence: `README.md`)
- Menu-bar app → Terminal CLI: runs CLI (evidence: `app/DiscoLivre.swift`)
- Terminal CLI → Disk analysis: runs analysis (evidence: `README.md`)
- Terminal CLI → Hidden folders: measures folders (evidence: `README.md`)
- Terminal CLI → Crash detection: reports crash loops (evidence: `README.md`)
- Terminal CLI → Background task audit: audits tasks (evidence: `README.md`)
- Terminal CLI → Browser audit: audits browsers (evidence: `README.md`)
- Disk analysis → Cleanup candidates: lists candidates (evidence: `README.md`)
- Menu-bar app → Cleanup candidates: shows candidates (evidence: `app/DiscoLivre.swift`)
- Menu-bar app → Selected cleanup: cleans selections (evidence: `app/DiscoLivre.swift`)
- Terminal CLI → Selected cleanup: cleans items (evidence: `README.md`)
- Terminal CLI → Trash management: empties trash (evidence: `README.md`)
- Terminal CLI → Folder mover: moves folder (evidence: `README.md`)
- Terminal CLI → Configuration: changes settings (evidence: `README.md`)
- Menu-bar app → Configuration: changes settings (evidence: `app/DiscoLivre.swift`)
- Configuration → Space watcher: configures (evidence: `README.md`)
- Space watcher → Alerts and log: reports conditions (evidence: `README.md`)
- Menu-bar app → GitHub releases: checks updates (evidence: `app/DiscoLivre.swift`)
