Plugin Source Data

PluginManifest

Each plugin must define PluginManifest and mount it to PLUGIN.manifest,用于描述插件的静态信息。

Tip

推荐以插件 identifier 作为文件名,例如 sample.py 对应 identifier="sample"

from app.plugins import PluginManifest, PluginKind

manifest = PluginManifest(
    identifier="sample",
    name="Sample Plugin",
    version="0.1.0",
    description="Demonstrates how to integrate Little Tree Wallpaper Next plugin API",
    author="Your Name",
    homepage="https://example.com",
    permissions=("resource_data",),  # Optional, declare when needing to access protected data
    dependencies=("core>=1.0.0",),  # Optional, supports simple version comparison operators
    kind=PluginKind.FEATURE,  # Optional, can be declared as PluginKind.LIBRARY
)

Field descriptions:

FieldDescription
identifierPlugin unique identifier (用于存储目录、日志等),建议使用小写字母和下划线
namePlugin display name
versionPlugin version number,采用语义化版本
descriptionOptional, plugin brief description
authorOptional, author information
homepageOptional, homepage or documentation link
permissionsOptional, list permission identifiers that need to be granted before plugin startup
dependenciesOptional, list identifiers of other plugins depended upon,可使用 core>=1.0.0helper==0.2 这样的语法描述版本要求
kindOptional, plugin type, default PluginKind.FEATURE,当插件仅提供 API/库能力时可设为 PluginKind.LIBRARY

访问 manifest.short_label() 可获得 name + version 的组合字符串。