No description
  • TypeScript 44.3%
  • Rust 32.5%
  • Shell 10.8%
  • JavaScript 7%
  • Go 5.4%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-21 15:38:12 +02:00
config Add Block Spam Registrations plugin (#12) 2026-10-07 11:30:18 +02:00
plugins Add Block Spam Registrations plugin (#12) 2026-10-07 11:30:18 +02:00
scripts Add captcha plugin (#9) 2026-02-25 12:25:46 +01:00
tests Add voting mode, download Lemmy release binary (#11) 2026-09-28 12:33:48 +02:00
.gitignore Add Block Spam Registrations plugin (#12) 2026-10-07 11:30:18 +02:00
.woodpecker.yml Add voting mode, download Lemmy release binary (#11) 2026-09-28 12:33:48 +02:00
LICENSE Initial commit with golang plugin 2025-03-13 15:52:10 +01:00
README.md Plugins are experimental (#13) 2026-10-21 15:38:12 +02:00
run.sh Add voting mode, download Lemmy release binary (#11) 2026-09-28 12:33:48 +02:00

Lemmy Plugins

Lemmy 1.0 has experimental support for WASM plugins. Depending on feedback for the current implementation, there may be breaking changes to the plugin API after 1.0 is released. See the plugins label and report your own suggestions!

This repository contains various example plugins for Lemmy. See the following links for more information:

Go: Replace Words

Uses the create_local_post hook to listen for newly created posts, replacing some words and rejecting posts containing specific terms. See go-pdk readme for detailed documentation.

Use the following steps to compile it:

apt install go
# install tinygo: https://tinygo.org/getting-started/install/linux/
cd plugins/go_replace_words
tinygo build -o ../go_replace_words.wasm -target wasip1 -buildmode=c-shared main.go

Typescript: Push Webhook

Listens to new_post hook which is called after any local or remote post is created. Then calls the url configured in the manifest (plugins/typescript_push_webhook.json) with the post's ap_id. See js-pdk readme for setup and detailed documentation.

Use the following steps to compile it:

apt install npm typescript
# use steps in js-pdk readme to install extism-js
cd plugins/typescript_push_webhook
npm install
npm run build

Typescript: Block Spam Registrations

Uses the local_user_before_register hook to reject registrations where the email domain is listed in the plugin config (see config/config.hjson). Use the following steps to compile it:

cd plugins/typescript_block_spam_registrations
npm install
npm run build

Rust: Allowed Voters

Listens to new_vote hook, then calls /api/v4/person to get details about the voter. Set min_posts_for_downvote to allow only users with at least X posts to downvote. Or set allowed_downvote_instances to a comma-separated list of domains to allow downvotes only from those domains.

See rust-pdk readme for setup and detailed documentation.

Use the following steps to compile it:

apt install cargo
cd plugins/rust_allowed_voters
cargo build
cp target/wasm32-unknown-unknown/debug/rust_allowed_voters.wasm ..

Rust: Lingua

Automatic language tagging for new posts and comments using Lingua. Compilation steps are the same as above.

Tests

This repository contains test cases for the plugins. To run them install pnpm and postgresql, with a database postgres://lemmy:password@localhost:5432/lemmy. Then compile all the plugins as described above, go into tests folder and execute ./run.sh.