screenpipe-tauri

Add Tauri commands and generate TypeScript bindings for the screenpipe desktop app.

21.3k|2.2k|Updated Jun 19, 2024
One-click install
npx skills add https://github.com/screenpipe/screenpipe --skill screenpipe-tauri
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: screenpipe-tauri
Source: https://github.com/screenpipe/screenpipe/tree/main/.claude/skills/screenpipe-tauri
Command: npx skills add https://github.com/screenpipe/screenpipe --skill screenpipe-tauri

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Adding a new Tauri command to the screenpipe desktop app requires keeping Rust handlers, specta annotations, and generated TypeScript bindings in sync, and manual edits to invoke-handler lists cause drift and build failures.

Core Features & Use Cases

  • Command Registration Guidance: Explains the required #[tauri::command] and #[specta::specta] markers so commands are picked up by the automated tauri-helper crate.
  • Binding Generation Workflow: Documents the bun run bindings:generate, bindings:check, and typecheck commands that regenerate and verify lib/utils/tauri.ts.
  • Use Case: When adding a new #[tauri::command] handler in src-tauri/src/, follow this Skill to regenerate the TypeScript bindings, verify no drift with bindings:check, and commit Rust and tauri.ts together.

Quick Start

Add a new Tauri command to the screenpipe desktop app and regenerate the TypeScript bindings following the screenpipe-tauri workflow.

Frequently Asked Questions about screenpipe-tauri

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new Tauri command in the screenpipe desktop app?

Add both #[tauri::command] and #[specta::specta] attributes to your handler function in any src-tauri/src module, then run bun run bindings:generate from apps/screenpipe-app-tauri to regenerate lib/utils/tauri.ts. Commit the Rust code and generated bindings together.

How do I regenerate TypeScript bindings for Tauri commands?

Run bun run bindings:generate from the apps/screenpipe-app-tauri directory to write lib/utils/tauri.ts. Then run bun run bindings:check to verify no drift and bun run typecheck to validate frontend types.

Why is my Tauri command missing from the generated tauri.ts bindings?

The command is skipped when the #[specta::specta] attribute is missing from the handler. Both #[tauri::command] and #[specta::specta] markers are required for the tauri-helper crate to include the command in the generated bindings.

Should I manually edit invoke-handler lists in main.rs for Tauri commands?

No, command registration is automated via the tauri-helper crate using specta_collect_commands!() and tauri_collect_commands!() macros. Manual edits to invoke-handler or specta command lists in main.rs should not be made.

How do I check for drift between Rust commands and TypeScript bindings?

Run bun run bindings:check, which fails if the checked-in lib/utils/tauri.ts does not match the Rust code. Debug builds also auto-export bindings on startup when content changes.