PluginAPI
Since Plugin API: 1.0.0
Base Plugin API - available to all providers
Signature
interface PluginAPI { openSettings(): Promise<void>; settings: PluginSettings; storage: PluginStorageAPI; secrets: PluginSecretsAPI; database: PluginDatabaseAPI; appSettings: ReadonlyAppSettings; invoke<T>(command: string, args?: Record<string, unknown>): Promise<T>; fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>; clipboard: ClipboardAPI; modal: ModalAPI; notify: NotifyAPI; files: FileUtilsAPI; explorer: ExplorerAPI; git: GitAPI; workspaceFolders: WorkspaceFoldersAPI; modules: ModulesAPI; events: EventsAPI;}Members
| Name | Type | Required | Description |
|---|---|---|---|
openSettings |
() => Promise<void> |
yes | Open Settings in the current main window directly to this plugin’s settings page. |
settings |
PluginSettings |
yes | Plugin’s own settings |
storage |
PluginStorageAPI |
yes | Key/value data storage (separate from settings) |
secrets |
PluginSecretsAPI |
yes | Encrypted Plugin-scoped secrets. Available since Plugin API 1.1.0. |
database |
PluginDatabaseAPI |
yes | SQL database for plugin-owned tables |
appSettings |
ReadonlyAppSettings |
yes | Read-only access to app settings |
invoke |
(command: string, args?: Record<string, unknown>) => Promise<T> |
yes | Invoke Tauri commands (permission-gated allowlist for community plugins) |
fetch |
(input: RequestInfo | URL, init?: RequestInit) => Promise<Response> |
yes | Phials-backed streaming HTTP, gated by network.fetch for community Plugins. |
clipboard |
ClipboardAPI |
yes | Permission-gated text clipboard on the current Client. |
modal |
ModalAPI |
yes | Modal dialogs |
notify |
NotifyAPI |
yes | Notifications/toasts |
files |
FileUtilsAPI |
yes | File path utilities |
explorer |
ExplorerAPI |
yes | Explicit acquisition of stable Explorer pane facades. |
git |
GitAPI |
yes | Fixed read-only repository inspection under filesystem.read. |
workspaceFolders |
WorkspaceFoldersAPI |
yes | Permission-gated Workspace Folder data and Page operations. |
modules |
ModulesAPI |
yes | Center-module routing |
events |
EventsAPI |
yes | Event pub/sub for cross-plugin communication |