Phials developer documentation
User guide
AI Notice: Most documentation right now was auto-generated by an LLM. Handwritten documentation will be implemented over time on the road to 1.0

PluginAPI

Base Plugin API - available to all providers

Signature

interface PluginAPI {
    settings: PluginSettings;
    storage: PluginStorageAPI;
    database: PluginDatabaseAPI;
    appSettings: ReadonlyAppSettings;
    invoke<T>(command: string, args?: Record<string, unknown>): Promise<T>;
    modal: ModalAPI;
    notify: NotifyAPI;
    files: FileUtilsAPI;
    events: EventsAPI;
}

Members

NameTypeRequiredDescription
settingsPluginSettingsyesPlugin’s own settings
storagePluginStorageAPIyesKey/value data storage (separate from settings)
databasePluginDatabaseAPIyesSQL database for plugin-owned tables
appSettingsReadonlyAppSettingsyesRead-only access to app settings
invoke(command: string, args?: Record<string, unknown>) => Promise<T>yesInvoke Tauri commands (permission-gated allowlist for community plugins)
modalModalAPIyesModal dialogs
notifyNotifyAPIyesNotifications/toasts
filesFileUtilsAPIyesFile path utilities
eventsEventsAPIyesEvent pub/sub for cross-plugin communication