# reroc8/clash-verge-share-kit architecture

> Architecture diagram of the GitHub repository reroc8/clash-verge-share-kit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-17). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/reroc8/clash-verge-share-kit
- Repository: https://github.com/reroc8/clash-verge-share-kit

## Overview

Clash Verge Rev Share Kit packages configuration templates and one-click macOS/Windows installers; it does not provide subscriptions or proxy nodes. The main workflow is to prepare Clash Verge Rev with the user’s subscription, run the installer, then reopen the client and verify routing. The sampled Script.js shows configuration transformation, while README capabilities document routing and installation behavior. Unsampled installer internals are represented only where the README establishes their role; the graph does not infer calls between scripts.

Main entry points: [`install/install-macos.command`](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/install-macos.command) (macOS installer), [`install/install-windows.bat`](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/install-windows.bat) (Windows installer), [`config/Script.js`](https://github.com/reroc8/clash-verge-share-kit/blob/main/config/Script.js) (Subscription enhancer), [`install/close-clash-macos.command`](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/close-clash-macos.command) (macOS close helper)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Install and recovery"]
  node_mac_installer["macOS installer"]
  node_win_installer["Windows installer"]
  node_mac_close["macOS close helper"]
  node_win_close["Windows close helper"]
  node_profile_sync["Bound-file sync"]
end

subgraph group_config["Configuration templates"]
  node_merge_template["Merge template<br/>[Merge.yaml]"]
  node_verge_template["Verge settings<br/>[verge.yaml]"]
  node_dns_template["DNS settings<br/>[dns_config.yaml]"]
end

subgraph group_routing["Routing behavior"]
  node_script_transform["Subscription enhancer<br/>[Script.js]"]
  node_routing_guide["Routing design<br/>[routing.md]"]
end

node_user(("Clash Verge user"))
node_clash["Clash Verge Rev"]

node_user -->|"runs on macOS"| node_mac_installer
node_user -->|"runs on Windows"| node_win_installer
node_mac_installer -->|"closes before install"| node_clash
node_win_installer -->|"closes before install"| node_clash
node_user -->|"may run manually"| node_mac_close
node_user -->|"may run manually"| node_win_close
node_mac_installer -->|"installs configuration"| node_clash
node_win_installer -->|"installs configuration"| node_clash
node_user -->|"reopens to apply"| node_clash
node_clash -->|"uses enhanced config"| node_script_transform
node_script_transform -.->|"enhances subscription"| node_merge_template
node_user -.->|"Windows profile setup"| node_profile_sync
node_user -->|"consults routing"| node_routing_guide
node_script_transform -->|"produces routing config"| node_clash

click node_mac_installer "https://github.com/reroc8/clash-verge-share-kit/blob/main/install/install-macos.command"
click node_win_installer "https://github.com/reroc8/clash-verge-share-kit/blob/main/install/install-windows.bat"
click node_mac_close "https://github.com/reroc8/clash-verge-share-kit/blob/main/install/close-clash-macos.command"
click node_win_close "https://github.com/reroc8/clash-verge-share-kit/blob/main/install/close-clash-windows.ps1"
click node_profile_sync "https://github.com/reroc8/clash-verge-share-kit/blob/main/install/sync-profile-bound-files.ps1"
click node_merge_template "https://github.com/reroc8/clash-verge-share-kit/blob/main/config/Merge.yaml"
click node_script_transform "https://github.com/reroc8/clash-verge-share-kit/blob/main/config/Script.js"
click node_verge_template "https://github.com/reroc8/clash-verge-share-kit/blob/main/config/verge.yaml"
click node_dns_template "https://github.com/reroc8/clash-verge-share-kit/blob/main/config/dns_config.yaml"
click node_routing_guide "https://github.com/reroc8/clash-verge-share-kit/blob/main/docs/routing.md"

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_mac_installer,node_win_installer,node_mac_close,node_win_close,node_profile_sync,node_user toneBlue
class node_merge_template,node_verge_template,node_dns_template toneAmber
class node_script_transform,node_routing_guide toneMint
class node_clash toneIndigo
```

## Components

### Install and recovery

- [macOS installer](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/install-macos.command): `install/install-macos.command`
- [Windows installer](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/install-windows.bat): `install/install-windows.bat`
- [macOS close helper](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/close-clash-macos.command): `install/close-clash-macos.command`
- [Windows close helper](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/close-clash-windows.ps1): `install/close-clash-windows.ps1`
- [Bound-file sync](https://github.com/reroc8/clash-verge-share-kit/blob/main/install/sync-profile-bound-files.ps1): `install/sync-profile-bound-files.ps1`

### Configuration templates

- [Merge template](https://github.com/reroc8/clash-verge-share-kit/blob/main/config/Merge.yaml): `config/Merge.yaml`
- [Verge settings](https://github.com/reroc8/clash-verge-share-kit/blob/main/config/verge.yaml): `config/verge.yaml`
- [DNS settings](https://github.com/reroc8/clash-verge-share-kit/blob/main/config/dns_config.yaml): `config/dns_config.yaml`

### Routing behavior

- [Subscription enhancer](https://github.com/reroc8/clash-verge-share-kit/blob/main/config/Script.js): `config/Script.js`
- [Routing design](https://github.com/reroc8/clash-verge-share-kit/blob/main/docs/routing.md): `docs/routing.md`

### Other components

- **Clash Verge user**
- **Clash Verge Rev**

## Connections

- Clash Verge user → macOS installer: runs on macOS (evidence: `README.md`)
- Clash Verge user → Windows installer: runs on Windows (evidence: `README.md`)
- macOS installer → Clash Verge Rev: closes before install (evidence: `README.md`)
- Windows installer → Clash Verge Rev: closes before install (evidence: `README.md`)
- Clash Verge user → macOS close helper: may run manually (evidence: `README.md`)
- Clash Verge user → Windows close helper: may run manually (evidence: `README.md`)
- macOS installer → Clash Verge Rev: installs configuration (evidence: `README.md`)
- Windows installer → Clash Verge Rev: installs configuration (evidence: `README.md`)
- Clash Verge user → Clash Verge Rev: reopens to apply (evidence: `README.md`)
- Clash Verge Rev → Subscription enhancer: uses enhanced config (evidence: `README.md`)
- Subscription enhancer → Merge template: enhances subscription
- Clash Verge user → Bound-file sync: Windows profile setup
- Clash Verge user → Routing design: consults routing (evidence: `README.md`)
- Subscription enhancer → Clash Verge Rev: produces routing config (evidence: `README.md`)
