Complete API reference for all plugins in the XE IWA Launcher ecosystem.
- Chrome Manager Plugin
- Podman Plugin
- Workerd Plugin
- Caps Lock Remap Plugin
- Ollama Plugin
- Keyboard Plugin
- Event System
- Error Handling
Import: import * as chromeManager from 'tauri-plugin-chrome-manager';
Launches Chrome with specified configuration.
Parameters:
interface LaunchOptions {
startingUrl?: string; // Default: "https://www.userandagents.com"
installIwaUrl?: string; // Default: "http://localhost:5193"
chromeFlags?: string[]; // Additional command-line flags
}Returns:
interface LaunchResponse {
success: boolean;
pid?: number; // Process ID if successful
error?: string; // Error message if failed
}Example:
const result = await chromeManager.launchChrome({
startingUrl: 'chrome://web-app-internals',
chromeFlags: ['--disable-web-security']
});Terminates the Chrome instance launched by this plugin.
Returns: Success message or throws error
Import: import * as podman from 'tauri-plugin-podman';
Checks if Podman is installed and machine is initialized.
Returns: true if ready, false if not installed
Initializes Podman machine if not already initialized.
Returns: Success message
Lists all containers (running and stopped).
Returns:
interface ContainerInfo {
id: string;
name: string;
status: string;
}Creates a new container.
Parameters:
interface CreateContainerOptions {
name: string;
image: string;
installDevTools: boolean;
}Starts a stopped container.
Stops a running container.
Removes a container (must be stopped first).
Retrieves container logs.
Parameters:
interface ContainerLogsRequest {
containerId: string;
follow: boolean;
tail?: string;
}podman://terminal-output: Terminal output during operations
Import: import * as workerd from 'tauri-plugin-workerd';
Checks workerd installation status.
Returns:
interface WorkerdInfo {
installed: boolean;
version?: string;
running: boolean;
}Downloads workerd binary for current platform.
Lists all registered workers.
Returns:
interface WorkerInfo {
id: string;
name: string;
status: 'Running' | 'Stopped' | 'Error';
url?: string;
scriptPath?: string;
createdAt: string;
}Creates a new worker.
Parameters:
interface CreateWorkerOptions {
name: string;
scriptPath: string;
compatibilityDate?: string;
envVars?: Array<{
name: string;
value: string;
}>;
}Starts a stopped worker.
Stops a running worker.
Removes a worker from registry.
Gets worker logs.
Parameters:
interface WorkerLogsRequest {
workerId: string;
follow: boolean;
tail?: string;
}Returns:
interface WorkerLogs {
stdout: string;
stderr: string;
}workerd://terminal-output: Worker process output
Import: import { invoke } from '@tauri-apps/api/core';
Starts the Caps Lock interceptor.
Invoke: plugin:capslock-remap|start_capslock_interceptor
Stops the Caps Lock interceptor.
Invoke: plugin:capslock-remap|stop_capslock_interceptor
Gets current state.
Returns:
interface CapsLockState {
interceptorRunning: boolean;
capsLockEnabled: boolean;
listenModeActive: boolean;
currentPattern: {
singleTapDelay: number;
doubleTapDelay: number;
tripleTapDelay: number;
holdThreshold: number;
};
}Sets Caps Lock state.
Configures detection patterns.
Parameters:
interface PatternConfiguration {
patterns: {
singleTapDelay: number;
doubleTapDelay: number;
tripleTapDelay: number;
holdThreshold: number;
};
enableLedFeedback: boolean;
enableSingleTap: boolean;
enableDoubleTap: boolean;
enableTripleTap: boolean;
enableHold: boolean;
}Checks accessibility permissions.
Returns:
interface AccessibilityStatus {
hasPermission: boolean;
canRequest: boolean;
instructions: string;
}capslock-single-tap: Single tap detectedcapslock-double-tap: Double tap detectedcapslock-triple-tap: Triple tap detectedcapslock-hold-start: Hold startedcapslock-hold-end: Hold ended
Import: import * as ollama from 'tauri-plugin-ollama';
Checks connection to Ollama server.
Lists available models.
Returns:
interface ModelInfo {
name: string;
modified_at: string;
size: number;
digest: string;
}Downloads a model.
Generates text completion.
Parameters:
interface GenerateRequest {
model: string;
prompt: string;
system?: string;
template?: string;
context?: number[];
options?: {
temperature?: number;
top_k?: number;
top_p?: number;
num_predict?: number;
stop?: string[];
};
}Returns:
interface GenerateResponse {
response: string;
done: boolean;
context?: number[];
total_duration?: number;
prompt_eval_count?: number;
eval_count?: number;
}Conducts chat conversation.
Parameters:
interface ChatRequest {
model: string;
messages: Array<{
role: string;
content: string;
images?: string[];
}>;
stream?: boolean;
options?: GenerateOptions;
}Generates text embeddings.
Parameters:
interface EmbeddingRequest {
model: string;
prompt: string;
}Returns:
interface EmbeddingResponse {
embedding: number[];
}Status: 🚧 Under Development
Import: import * as keyboard from 'tauri-plugin-keyboard';
Registers a global hotkey.
Parameters:
interface RegisterHotkeyRequest {
id: string;
key: {
keyCode: string;
modifiers: string[];
};
description?: string;
}Unregisters a hotkey.
Starts monitoring keyboard events.
Stops monitoring keyboard events.
Gets keyboard lock states.
Returns:
interface KeyboardState {
capsLock: boolean;
numLock: boolean;
scrollLock: boolean;
}Simulates a key press.
Parameters:
interface SimulateKeyRequest {
keyCode: string;
modifiers?: string[];
eventType: 'keyDown' | 'keyUp' | 'keyPress';
}keyboard://hotkey: Hotkey triggeredkeyboard://key-event: Key event detected
import { listen } from '@tauri-apps/api/event';
// Listen to plugin events
const unlisten = await listen('plugin-name://event-name', (event) => {
console.log('Event payload:', event.payload);
});
// Stop listening
unlisten();- Chrome Manager:
chrome://event-name - Podman:
podman://event-name - Workerd:
workerd://event-name - Caps Lock:
capslock-event-name(no prefix) - Ollama: No events currently
- Keyboard:
keyboard://event-name
All plugins use consistent error patterns:
try {
await pluginFunction();
} catch (error) {
if (error.includes('not installed')) {
// Handle missing dependency
} else if (error.includes('permission')) {
// Handle permission issues
} else {
// Handle other errors
}
}Chrome not found: Chrome not installedProcess management: Failed to track PID
NotInstalled: Podman not foundCommandFailed: Podman command failedContainerError: Container operation failed
Not installed: Workerd not foundWorker error: Worker operation failedPort conflict: Port already in use
AccessibilityDenied: Missing permissionsPlatformNotSupported: Wrong OSListenerAlreadyRunning: Already active
Connection: Can't reach Ollama serverModelNotFound: Model not availableGeneration: Generation failed
InvalidKeyCode: Unknown keyListenerError: Event monitoring failedPlatformError: OS-specific error
- Batch Operations: Use Promise.all for multiple async calls
- Event Cleanup: Always unlisten when component unmounts
- Resource Management: Stop services when not needed
- Input Validation: Validate all user inputs
- Permission Checks: Check permissions before operations
- Error Messages: Don't expose sensitive information
- Feature Detection: Check platform support
- Fallbacks: Provide alternatives when unavailable
- Testing: Test on all supported platforms
import { onMount, onCleanup } from 'solid-js';
import * as workerd from 'tauri-plugin-workerd';
import { listen } from '@tauri-apps/api/event';
function WorkerManager() {
let unlisten;
onMount(async () => {
// Check installation
const info = await workerd.checkWorkerdInstalled();
if (!info.installed) {
await workerd.downloadWorkerd();
}
// Listen for logs
unlisten = await listen('workerd://terminal-output', (event) => {
console.log(event.payload.line);
});
// Create and start worker
const worker = await workerd.createWorker({
name: 'api-worker',
scriptPath: './worker.js'
});
await workerd.startWorker(worker.id);
});
onCleanup(() => {
if (unlisten) unlisten();
});
}| Plugin | Tauri Version | Minimum OS Version |
|---|---|---|
| Chrome Manager | 2.0+ | macOS 10.15+, Windows 10+, Ubuntu 20.04+ |
| Podman | 2.0+ | macOS 11+, Windows 10+, Ubuntu 20.04+ |
| Workerd | 2.0+ | macOS 10.15+, Windows 10+, Ubuntu 20.04+ |
| Caps Lock Remap | 2.0+ | macOS 10.15+ |
| Ollama | 2.0+ | macOS 10.15+, Windows 10+, Ubuntu 20.04+ |
| Keyboard | 2.0+ | macOS 10.15+, Windows 10+, Ubuntu 20.04+ |