TauriWatch Quickstart
This guide installs TauriWatch in an existing Tauri v2 app using the public packages.
Published Packages
Rust crates:
tauri-watch-typestauri-watch-sdktauri-plugin-tauri-watch
NPM packages:
@alkkmia/tauri-watch-sdk@alkkmia/tauri-plugin-tauri-watch-api
1. Create an App in TauriWatch
Start the TauriWatch API and dashboard, then create an app from the dashboard or with the API:
curl -X POST https://tauri-watch.cloud.alkkmia.com/api/apps \
-H "content-type: application/json" \
-d '{"slug":"my-tauri-app","name":"My Tauri App"}'Save the returned api_key. It is only shown once.
2. Install the Rust Plugin
Run this inside your Tauri app:
cd src-tauri
cargo add tauri-plugin-tauri-watchRegister the plugin in src-tauri/src/lib.rs or src-tauri/src/main.rs:
tauri::Builder::default()
.plugin(tauri_plugin_tauri_watch::init())
.run(tauri::generate_context!())
.expect("error while running tauri application");3. Add Plugin Config
Add this to src-tauri/tauri.conf.json:
{
"plugins": {
"tauri-watch": {
"appId": "my-tauri-app",
"apiKey": "YOUR_TAURIWATCH_API_KEY",
"endpoint": "https://tauri-watch.cloud.alkkmia.com",
"environment": "production",
"releaseVersion": "1.0.0",
"enabled": true,
"batchSize": 20,
"flushIntervalMs": 3000,
"retryAttempts": 3
}
}
}For a self-hosted local stack, replace the endpoint with your local API URL.
4. Install the Frontend Packages
npm install @alkkmia/tauri-watch-sdk @alkkmia/tauri-plugin-tauri-watch-apiUse the plugin API when your frontend runs inside Tauri:
import {
captureError,
installGlobalHandlers,
logInfo,
} from "@alkkmia/tauri-plugin-tauri-watch-api";
installGlobalHandlers();
await logInfo("App started", { screen: "home" });
try {
throw new Error("Example failure");
} catch (error) {
await captureError(error, {
severity: "high",
handled: true,
metadata: { flow: "quickstart" },
});
}Use the standalone JS SDK when you want direct HTTP ingestion from the webview:
import { initTauriWatch, installGlobalHandlers, logInfo } from "@alkkmia/tauri-watch-sdk";
initTauriWatch({
appId: "my-tauri-app",
apiKey: "YOUR_TAURIWATCH_API_KEY",
endpoint: "https://tauri-watch.cloud.alkkmia.com",
environment: "production",
releaseVersion: "1.0.0",
});
installGlobalHandlers();
await logInfo("App started");5. Verify Events
Trigger a log or error, then open:
https://tauri-watch.cloud.alkkmia.com/eventsFor a self-hosted local stack, replace the dashboard URL with your local dashboard URL.
Current `tauri add` Status
npm run tauri add tauri-watch is not supported yet. Tauri's automatic add flow is optimized for official ecosystem plugins. For now, use the manual install above.