Phials plugin documentation
User guide
AI Disclosure: This page was generated by an LLM and may contain inaccuracies. Hand-crafted documentation will be implemented over time on the road to 1.0

PluginAPI

Since Plugin API: 1.0.0

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;
    explorer: ExplorerAPI;
    git: GitAPI;
    workspaceFolders: WorkspaceFoldersAPI;
    clipboard: ClipboardAPI;
    fetch(input: RequestInfo | URL, init?: RequestInit): Promise<Response>;
    modules: ModulesAPI;
    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
explorerExplorerAPIyesExplicit acquisition of stable Explorer pane facades.
gitGitAPIyesFixed read-only repository inspection under filesystem.read.
workspaceFoldersWorkspaceFoldersAPIyesPermission-gated Workspace Folder data and Page operations.
clipboardClipboardAPIyesPermission-gated text clipboard.
fetch(input: RequestInfo | URL, init?: RequestInit) => Promise<Response>yesPermission-gated network fetch.
modulesModulesAPIyesCenter-module routing.
eventsEventsAPIyesEvent pub/sub for cross-plugin communication