this post was submitted on 11 Jul 2025
66 points (98.5% liked)

PieFed Meta

1249 readers
34 users here now

Discuss PieFed project direction, provide feedback, ask questions, suggest improvements, and engage in conversations related to the platform organization, policies, features, and community dynamics.

Wiki

founded 2 years ago
MODERATORS
66
Added a basic plugin system (media.piefed.social)
submitted 2 days ago* (last edited 2 days ago) by rimu@piefed.social to c/piefed_meta@piefed.social
 

PieFed now includes a simple plugin engine so third parties can extend PieFed functionality without adding their code to the main PieFed project. It's pretty simple and bare-bones at the moment and is more of a 'tech preview' stage rather than something to get too serious about.

Each plugin is a directory under app/plugins and must include a init.py file. In that file there must be a plugin_info() function. Plugins can have their code executed by adding a @hook decorator to a function, as in the image above.

The example plugin that comes with PieFed just prints some debugging messages to the console before and after a post is created but the sky is the limit. Eventually plugins could modify data at any stage of the content lifecycle, react to people joining or leaving a community, votes, send email, etc etc.

What I've built today is just the beginning and I'm hoping other contributors will take this framework and add more hooks and incorporate it into the rest of the system.

top 8 comments
sorted by: hot top controversial new old
[–] wiki_me@lemmy.ml 2 points 1 day ago

In the future i think there should be a nice store with reviews like wordpress plugins or discourse plugins .

Having a great UX which will motivate people to extend piefed (like firefox addons website) can be really a killer feature .

[–] tuckerm@saltylike.us 3 points 2 days ago

@rimu Looking forward to checking this out. Piefed is amazing, thank you for making it!

[–] hitagi@ani.social 7 points 2 days ago

That's pretty good!

[–] Snoopy@piefed.social 8 points 2 days ago

Wow ! Awesome ! I hope more and more people will be interested :)

[–] dzajew@piefed.social 6 points 2 days ago

whoa, nice! :D

[–] Paige@piefed.ca 5 points 2 days ago

This is a great direction to go

[–] wjs018@piefed.social 5 points 2 days ago (1 children)

Would this enable something like Lemmy Webhook or other kinds of automod plugins then if I am understanding this right?

[–] asudox@lemmy.asudox.dev 5 points 2 days ago

This seems to be intended for instance owners rather than users of the instance. Though you definitely could send that post_data to some webhook.