# pmorgaonkar/apple-ai-remover architecture

> Architecture diagram of the GitHub repository pmorgaonkar/apple-ai-remover, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pmorgaonkar/apple-ai-remover
- Repository: https://github.com/pmorgaonkar/apple-ai-remover

## Overview

Apple AI remover is a macOS command-line utility for inspecting and changing Apple Intelligence-related controls. Its main workflow is to select features, account for model-set dependencies, generate and apply a removable configuration profile, and reset eligible model sets through a small Objective-C helper. The README assigns catalog, profile, status, confirmation, and recovery behavior to the shell; private UAF operations belong to the helper. Source excerpts were unavailable, so relationships below rely on README statements only.

Main entry points: [`remove-mac-ai.sh`](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh) (CLI workflow), [`uaf-reset.m`](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m) (UAF helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["Shell workflow"]
  node_cli["CLI workflow<br/>[remove-mac-ai.sh]"]
  node_catalog["Feature catalog<br/>[remove-mac-ai.sh]"]
  node_closure["Dependency closure<br/>[remove-mac-ai.sh]"]
  node_confirm["Confirmation and recovery<br/>[remove-mac-ai.sh]"]
end

subgraph group_profile["Profile and state"]
  node_profile["Profile generation<br/>[remove-mac-ai.sh]"]
  node_state["State reporting<br/>[remove-mac-ai.sh]"]
end

subgraph group_uaf["Model reset"]
  node_helper["UAF helper<br/>[uaf-reset.m]"]
  node_resolve["Asset resolution<br/>[uaf-reset.m]"]
  node_validate["Type validation<br/>[uaf-reset.m]"]
  node_status_bytes["Asset byte status<br/>[uaf-reset.m]"]
end

node_user(("Administrator"))
node_profile_manager["macOS profile manager"]
node_xpc["UAF XPC service"]

node_user -->|"runs commands"| node_cli
node_cli -->|"uses catalog"| node_catalog
node_cli -->|"computes dependencies"| node_closure
node_cli -->|"handles confirmation"| node_confirm
node_cli -->|"generates profile"| node_profile
node_cli -->|"reports state"| node_state
node_cli -->|"requests resets"| node_helper
node_profile -->|"installs profile"| node_profile_manager
node_profile_manager -->|"supports removal"| node_profile
node_helper -->|"resolves asset sets"| node_resolve
node_helper -->|"checks asset type"| node_validate
node_helper -->|"reports downloaded bytes"| node_status_bytes
node_helper -->|"sends reset requests"| node_xpc

click node_cli "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh"
click node_catalog "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh"
click node_closure "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh"
click node_confirm "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh"
click node_profile "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh"
click node_state "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh"
click node_helper "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m"
click node_resolve "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m"
click node_validate "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m"
click node_status_bytes "https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m"

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_catalog,node_closure,node_confirm toneBlue
class node_profile,node_state toneAmber
class node_helper,node_resolve,node_validate,node_status_bytes toneMint
class node_user,node_profile_manager,node_xpc toneIndigo
```

## Components

### Shell workflow

- [CLI workflow](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh): `remove-mac-ai.sh`
- [Feature catalog](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh): `remove-mac-ai.sh`
- [Dependency closure](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh): `remove-mac-ai.sh`
- [Confirmation and recovery](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh): `remove-mac-ai.sh`

### Profile and state

- [Profile generation](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh): `remove-mac-ai.sh`
- [State reporting](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/remove-mac-ai.sh): `remove-mac-ai.sh`

### Model reset

- [UAF helper](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m): `uaf-reset.m`
- [Asset resolution](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m): `uaf-reset.m`
- [Type validation](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m): `uaf-reset.m`
- [Asset byte status](https://github.com/pmorgaonkar/apple-ai-remover/blob/main/uaf-reset.m): `uaf-reset.m`

### Other components

- **Administrator**
- **macOS profile manager**
- **UAF XPC service**

## Connections

- Administrator → CLI workflow: runs commands (evidence: `README.md`)
- CLI workflow → Feature catalog: uses catalog (evidence: `README.md`)
- CLI workflow → Dependency closure: computes dependencies (evidence: `README.md`)
- CLI workflow → Confirmation and recovery: handles confirmation (evidence: `README.md`)
- CLI workflow → Profile generation: generates profile (evidence: `README.md`)
- CLI workflow → State reporting: reports state (evidence: `README.md`)
- CLI workflow → UAF helper: requests resets (evidence: `README.md`)
- Profile generation → macOS profile manager: installs profile (evidence: `README.md`)
- macOS profile manager → Profile generation: supports removal (evidence: `README.md`)
- UAF helper → Asset resolution: resolves asset sets (evidence: `README.md`)
- UAF helper → Type validation: checks asset type (evidence: `README.md`)
- UAF helper → Asset byte status: reports downloaded bytes (evidence: `README.md`)
- UAF helper → UAF XPC service: sends reset requests (evidence: `README.md`)
