Plexcord LogoPlexcord
Getting Started

Prerequisites

Set up your development environment to start building Plexcord plugins. Install Node.js, pnpm, VS Code, and clone the Plexcord repository.

Prerequisites

Before you write your first plugin, you need a working development environment. This guide walks you through everything you need.

Required Software

1. Node.js (v22 or higher)

Plexcord requires Node.js 22 or higher for its build tooling.

# Check your current version
node --version
# Should output: v22.x.x or higher

Download: https://nodejs.org/en/download

Use the LTS release for stability. Avoid odd-numbered versions (v23, v25) unless you need cutting-edge features.

2. pnpm Package Manager

Plexcord uses pnpm (not npm or yarn) as its package manager.

# Install pnpm via npm
npm install -g pnpm

# Verify installation
pnpm --version
# Should output: 9.x.x or higher

3. Git

You need Git to clone the Plexcord repository and track changes.

# Check if Git is installed
git --version
# Should output: git version 2.x.x

Download: https://git-scm.com/downloads

4. Code Editor

We strongly recommend Visual Studio Code. See the Editor Setup guide for the full list of recommended extensions.

Clone the Plexcord Repository

All plugins are written inside the Plexcord source code. Clone the official repository:

# Clone the repository
git clone https://github.com/MutanPlex/Plexcord.git

# Navigate into the folder
cd Plexcord

Install Dependencies

# Install all required packages
pnpm install

This will take a minute or two on the first run. You should see output like:

Progress: resolved 800 packages
Packages deduped, added, removed...
Done in 45s

Build Plexcord

Build the project before injecting:

pnpm build

Inject into Discord

Once built, inject Plexcord into your Discord client. This patches Discord's app.asar so it loads Plexcord on startup:

pnpm inject

The script will detect your installed Discord client. Plexcord supports all three release channels:

ChannelNotes
StableRecommended for daily use
PTB (Public Test Build)More frequent updates
CanaryBleeding-edge, may be unstable

You only need to run pnpm inject once. Subsequent pnpm build runs will be picked up automatically on the next Discord restart.

To remove Plexcord from Discord:

pnpm uninject

Use a test Discord account while developing. Some plugins can affect your account or get flagged if used incorrectly.

Web Extension

Plexcord also runs as a browser extension. Build it with:

pnpm buildWeb

Then load the generated dist/ folder as an unpacked extension in Chrome or Edge:

  1. Open chrome://extensions (or edge://extensions)
  2. Enable Developer mode
  3. Click Load unpacked and select the dist/ folder

Verify Your Setup

Run a quick check to make sure everything compiles cleanly:

# Check TypeScript compiles correctly
pnpm tsc --noEmit

# Run the linter
pnpm lint

If both commands exit without errors, your environment is ready.

Project Structure Overview

Here's where plugins live inside the Plexcord repository:

Plexcord/
├── src/
│   ├── plugins/          ← Official plugins (contribute here)
│   │   ├── helloWorld/
│   │   │   └── index.ts
│   │   └── ...
│   ├── userplugins/      ← Your personal plugins (not committed)
│   │   └── myPlugin/
│   │       └── index.ts
│   └── utils/
│       └── types.ts      ← Plugin type definitions
└── ...

Where should I write my plugin?

  • src/userplugins/: For personal plugins. Not tracked by git, perfect for experimenting.
  • src/plugins/: For contributing to the official Plexcord project.

Next Steps

You're ready to write your first plugin!

On this page