invoke from @tauri-apps/api/core.
Importing invoke
Basic invocation
Error handling
All commands returnResult<T, String> in Rust. The Tauri bridge translates this to a JavaScript Promise:
- Success — the promise resolves with the return value.
- Failure — the promise rejects with a
stringcontaining the Rust error message.
TypeScript types
The following interfaces are used throughout the API. They match the Rust structs defined in the backend source.Command categories
Settings
Read and write persistent application settings via the Tauri store plugin.
Window Management
Detect the active window, get cursor position, and control overlay behavior.
Dictation & Automation
Paste transcribed text and copy selected text using OS-level automation.
Hotkey Management
Dynamically register and unregister the Escape key shortcut during recording.
App Discovery
Search installed applications for use in App Profile configuration.
Authentication
Google OAuth login, session state, and logout.
Log Mode
Append timestamped voice notes to log files.
Events
Backend events the frontend can subscribe to via Tauri’s event system.
