# yuaotian/go-cursor-help architecture

> Architecture diagram of the GitHub repository yuaotian/go-cursor-help, 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/yuaotian/go-cursor-help
- Repository: https://github.com/yuaotian/go-cursor-help

## Overview

This repository is a cross-platform Cursor trial-reset tool. The documented user workflow is to run the matching Windows, macOS, or Linux script; the README describes the result as an immediate Cursor trial reset. The sampled hook provides an additional device-identity layer: it loads or generates IDs, then intercepts identity-related APIs and protects telemetry fields in storage.json. The run scripts and hook-injection scripts were not sampled, so their internal behavior and wiring are not inferred here.

Main entry points: [`scripts/hook/cursor_hook.js`](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js) (Identity API interception), [`scripts/run/cursor_win_id_modifier.ps1`](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_win_id_modifier.ps1) (Windows reset), [`scripts/run/cursor_mac_id_modifier.sh`](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_mac_id_modifier.sh) (macOS reset), [`scripts/run/cursor_linux_id_modifier.sh`](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_linux_id_modifier.sh) (Linux reset)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_platform_reset["Platform reset"]
  node_windows_runner["Windows reset"]
  node_macos_runner["macOS reset"]
  node_linux_runner["Linux reset"]
end

subgraph group_identity_hook["Identity hook"]
  node_hook_injectors["Hook injectors"]
  node_identity_config["Identity configuration<br/>[cursor_hook.js]"]
  node_api_interception["Identity API interception<br/>[cursor_hook.js]"]
  node_storage_protection["Storage protection<br/>[cursor_hook.js]"]
end

subgraph group_cursor_target["Cursor target"]
  node_cursor_app["Cursor application"]
  node_cursor_storage["Cursor storage.json"]
end

node_user(("Tool user"))

node_user -->|"runs on Windows"| node_windows_runner
node_user -->|"runs on macOS"| node_macos_runner
node_user -->|"runs on Linux"| node_linux_runner
node_windows_runner -->|"resets trial"| node_cursor_app
node_macos_runner -->|"resets trial"| node_cursor_app
node_linux_runner -->|"resets trial"| node_cursor_app
node_hook_injectors -.->|"injects hook"| node_api_interception
node_identity_config -->|"supplies identifiers"| node_api_interception
node_api_interception -->|"intercepts identity APIs"| node_cursor_app
node_storage_protection -->|"protects telemetry fields"| node_cursor_storage

click node_windows_runner "https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_win_id_modifier.ps1"
click node_macos_runner "https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_mac_id_modifier.sh"
click node_linux_runner "https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_linux_id_modifier.sh"
click node_hook_injectors "https://github.com/yuaotian/go-cursor-help/tree/master/scripts/hook"
click node_identity_config "https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js"
click node_api_interception "https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js"
click node_storage_protection "https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js"

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_windows_runner,node_macos_runner,node_linux_runner,node_user toneBlue
class node_hook_injectors,node_identity_config,node_api_interception,node_storage_protection toneAmber
class node_cursor_app,node_cursor_storage toneMint
```

## Components

### Platform reset

- [Windows reset](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_win_id_modifier.ps1): `scripts/run/cursor_win_id_modifier.ps1`
- [macOS reset](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_mac_id_modifier.sh): `scripts/run/cursor_mac_id_modifier.sh`
- [Linux reset](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/run/cursor_linux_id_modifier.sh): `scripts/run/cursor_linux_id_modifier.sh`

### Identity hook

- [Hook injectors](https://github.com/yuaotian/go-cursor-help/tree/master/scripts/hook): `scripts/hook`
- [Identity configuration](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js): `scripts/hook/cursor_hook.js`
- [Identity API interception](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js): `scripts/hook/cursor_hook.js`
- [Storage protection](https://github.com/yuaotian/go-cursor-help/blob/master/scripts/hook/cursor_hook.js): `scripts/hook/cursor_hook.js`

### Cursor target

- **Cursor application**
- **Cursor storage.json**

### Other components

- **Tool user**

## Connections

- Tool user → Windows reset: runs on Windows (evidence: `README.md`)
- Tool user → macOS reset: runs on macOS (evidence: `README.md`)
- Tool user → Linux reset: runs on Linux (evidence: `README.md`)
- Windows reset → Cursor application: resets trial (evidence: `README.md`)
- macOS reset → Cursor application: resets trial (evidence: `README.md`)
- Linux reset → Cursor application: resets trial (evidence: `README.md`)
- Hook injectors → Identity API interception: injects hook
- Identity configuration → Identity API interception: supplies identifiers (evidence: `scripts/hook/cursor_hook.js`)
- Identity API interception → Cursor application: intercepts identity APIs (evidence: `scripts/hook/cursor_hook.js`)
- Storage protection → Cursor storage.json: protects telemetry fields (evidence: `scripts/hook/cursor_hook.js`)
