Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sniper Installer

CLI tool that installs DcPlugin into Vencord or Equicord, then builds and injects the patched Discord client.

The installer handles cloning, updating, dependency installation, and the full build/inject pipeline so you do not have to run each step manually.

Features

  • Interactive client selection (Vencord or Equicord)
  • Automatic requirement checks for git, node, and pnpm
  • Installs pnpm globally via npm when it is missing
  • Clones or updates the client repository on each run
  • Clones or pulls the plugin into the correct userplugins directory
  • Runs pnpm install, pnpm build, and pnpm inject in the right order
  • Colored console output with spinners and a session log file

Prerequisites

Tool Required Notes
Git Yes Opened in browser if missing
Node.js Yes Opened in browser if missing
pnpm Auto-installed Installed via npm install -g pnpm if not found
Discord Yes Must be installed; patched during pnpm inject

Platform: Tested on Windows. Missing dependency URLs are opened with the system default browser.

Installation

Download the latest release from the releases page.

Or, clone this repository and build the binary:

git clone https://github.com/raz461/Sniper-Installer
cd Sniper-Installer
go build -o Sniper-Installer.exe .

Usage

Run the installer from the project root:

./Sniper-Installer.exe

You will be prompted to choose a client:

1. Vencord
2. Equicord

After that, the installer runs the full pipeline automatically. On success, launch Discord as usual — the client will be patched with DcPlugin.

What it does

  1. Check requirements — Verifies git, node, and pnpm are available.
  2. Select client — Reads your Vencord or Equicord choice from stdin.
  3. Prepare client repo — Clones into repos/vencord or repos/equicord, or pulls latest if it already exists.
  4. Install plugin — Clones DcPlugin into repos/{client}/src/userplugins/DcPlugin, or pulls if already present.
  5. Install dependencies — Runs pnpm install inside the plugin directory.
  6. Build — Runs pnpm build inside the plugin directory.
  7. Inject — Runs pnpm inject from the client repository root to patch Discord.

Re-running the installer updates both the client repo and the plugin, then rebuilds and re-injects.

Project structure

Sniper-Installer/
├── main.go              # Entry point and orchestration
├── client/              # Interactive client selection
├── github/              # Client repo clone / pull
├── plugin/              # DcPlugin clone / pull and paths
├── system/              # Requirement checks and pnpm commands
├── logger/              # Console output, spinners, and logging
├── globals/             # Shared constants and URLs
└── repos/               # Cloned client repos (gitignored)
    └── {client}/
        └── src/userplugins/DcPlugin/

Logging

Each run writes a plain-text log to logs.log in the working directory. ANSI color codes are stripped from log entries. Command output from git and pnpm is also captured there.

Sequence diagram

sequenceDiagram
    participant User as User
    participant CLI as main / CLI
    participant Log as logger
    participant Sys as system
    participant Client as client
    participant GH as github
    participant Plugin as plugin
    participant Git as git
    participant PNPM as pnpm
    participant Discord as Discord (patched)

    User->>CLI: Run installer
    CLI->>Log: Init()
    Log-->>CLI: log file ready

    CLI->>Sys: CheckRequirements()
    Sys->>Sys: HasBinary(git, node, pnpm)
    alt pnpm missing
        Sys->>PNPM: npm install -g pnpm
        PNPM-->>Sys: pnpm installed
    end
    Sys-->>CLI: OK

    CLI->>Client: SelectClient()
    User->>Client: 1 (Vencord) or 2 (Equicord)
    Client-->>CLI: "vencord" | "equicord"

    CLI->>GH: EnsureRepository(client)
    alt repo not in repos/{client}
        GH->>Git: clone Vencord/Equicord → repos/{client}
        Git-->>GH: repo ready
    else repo exists
        GH->>Git: pull (repos/{client})
        Git-->>GH: up to date
    end
    GH-->>CLI: OK

    CLI->>Plugin: Install(client)
    alt DcPlugin not installed
        Plugin->>Plugin: EnsureUserPluginsDir()
        Plugin->>Git: clone DcPlugin → repos/{client}/src/userplugins/
        Git-->>Plugin: plugin cloned
    else plugin exists
        Plugin->>Git: pull (userplugins/DcPlugin)
        Git-->>Plugin: plugin updated
    end
    Plugin-->>CLI: OK

    CLI->>Sys: PNPMInstall(client)
    Sys->>PNPM: install (in userplugins/DcPlugin)
    PNPM-->>Sys: dependencies installed
    Sys-->>CLI: OK

    CLI->>Sys: PNPMBuild(client)
    Sys->>PNPM: build (in userplugins/DcPlugin)
    PNPM-->>Sys: build artifacts
    Sys-->>CLI: OK

    CLI->>Sys: PNPMInject(client)
    Sys->>PNPM: inject (in repos/{client})
    PNPM->>Discord: patch Discord install
    Discord-->>PNPM: patched client
    PNPM-->>Sys: OK
    Sys-->>CLI: OK

    CLI->>Log: Close()
    CLI-->>User: exit 0
Loading

Related repositories

Repository URL
Original Plugin Dev https://github.com/neoarz
DcPlugin https://github.com/raz461/DcPlugin
Vencord https://github.com/Vendicated/Vencord
Equicord https://github.com/equicord/equicord

About

One-command installer for the Discord User sniper plugin on Vencord/Equicord. Clone, build, and inject Discord.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages