Prompt #121

Back to prompts
Add new glug plugin
Code Β· claude-3.7-sonnet
5/5
Variables
{'name': 'plugin_name', 'description': 'snake_case dir name'}, {'name': 'feature_description', 'description': 'what it does'}
Tags
stack-aware,glug,plugin,framework
Source
research-2026-05-01-stack-aware-handcrafted
Use count
0
Created
2026-05-01T18:30:35.938632+00:00
Updated
2026-05-01T18:30:35.938632+00:00

Content

Add a new plugin to the glug repo at `/nvmetank1/projects/glug/plugins/{plugin_name}/`.

Required files:
1. `manifest.toml` with `id = "glug.{plugin_name}"`, `name`, `version`, `description`, `default_enabled = true`, `permissions = []`
2. `__init__.py` with PLUGIN dict mirroring manifest.toml + optional `db_migrations` for new tables
3. `routes_admin.py` with `bp_admin = Blueprint(...)` for `/admin/{plugin_name}` routes (Authelia-LDAP-protected via /admin layout)
4. (optional) `routes_public.py` with `bp_public` for tenant-facing routes
5. `tests/test_{plugin_name}.py` with at least: import test + bp-mount test + one route smoke test

Plugin-loader auto-discovers via `glug/helpers/modules.py:_discover_plugins(app)`. Don't register manually.
Use `effective_admin_label(plugin_id, manifest_label)` if plugin needs per-tenant display name (glug#635).

Feature description: {feature_description}