Skip to content

Create a plugin

The recommended way is the interactive scaffold (it fills in the id / name / icon and any optional backend, settings or database parts):

终端窗口
pnpm create-plugin

Or copy the template by hand:

终端窗口
cp -r plugins/_template plugins/my-tools

Then edit plugins/my-tools/plugin.json:

{
"id": "my-tools",
"name": "My Tools",
"tools": [
{
"id": "my-tools-hello",
"name": "Hello",
"description": "My first tool",
"icon": "Sparkles",
"entry": "frontend/views/Tool.vue"
}
]
}

Rewrite frontend/views/Tool.vue — done. Sidebar navigation, routing, titles, the enable/disable toggle, the settings panel, the error boundary and KeepAlive all work automatically, with no manual registration.

These examples all live in the hello-world plugin (available until you delete it):

GoalFile
Call Rust commands, read/write SQLitefrontend/views/Tool.vue (full Rust integration)
Table + pagination + dialog CRUD + import/exportfrontend/views/TableTool.vue
Form controls and validationfrontend/views/FormTool.vue
Make an HTTP request and show the resultfrontend/views/HttpTool.vue
Layout and the empty / loading / error statesfrontend/views/TemplateTool.vue

Next: review plugin.json fields, or write the frontend view.