-
Notifications
You must be signed in to change notification settings - Fork 34
Description
Which areas does this feature request relate to
- Create Plugin
- Sign Plugin
- Plugin E2E
- Plugin Meta Extractor
- Documentation
Problem
The create-plugin
tool currently supports creating new plugins (datasource, panel, apps and scenes-apps) and migrating existing codebases through the upcoming migrate command. However, devs sometimes have the need to incrementally enhance existing plugins with optional capabilities that aren’t required for every use case. For example plugin i18n support or more advanced configuration.
At the moment, these additions must be done manually, which can be tedious and error-prone. Developers need to know the correct file locations, import patterns, and configuration steps, leading to repetitive setup work and inconsistencies across projects. This friction discourages adoption of best practices and wastes time that could instead be spent on feature development.
Solution
Introduce a new add
command in the create-plugin
tool that allows developers to easily add optional features to existing plugins.
The add command would reuse the same migration logic used by the migrate
command, ensuring that changes are predictable, incremental, and idempotent. Each optional feature (for example, i18n) would be implemented as a small migration package, defining all necessary file additions, configuration updates and wiring.
Example usage:
npx @grafana/create-plugin add i18n --locales fr-FR,de-DE
This command would scaffold the specified translation files, add dependencies, initialize the i18n setup, update configuration and add i18n e2e tests automatically.
Other possible future add-ons might include:
- Add plugin instrumentation, telemetry or profiling support
- Setting up CI workflows
- Enabling telemetry
Basically all optional plugin capabilities described in how-to guides and in the plugin type specific guides in the developer portal.
Alternatives
No response
Additional context
No response
Are you interested in contributing the solution?
- Yes
- No
Metadata
Metadata
Assignees
Labels
Type
Projects
Status