YC (S26) | Open Computer History | Continuously record your company computer work, map your workflows, help you find work worth automating, and power your agents' context
Rust agentsagiaiai-memoryaudio-recordingcomputer-visionhermeshermes-agentllmlocal-ailocal-firstmachine-learningmcpmultimodalopenclawprivacyrewindscreen-recordingspeech-to-textycombinator
feat: finalize onboarding in app + screenpipe setup
Louis Beaumont1c1497e564aa
diff --git a/.editorconfig b/.editorconfigdeleted file mode 100644index 69047571b..000000000--- a/.editorconfig+++ /dev/null@@ -1,18 +0,0 @@-[*]-charset = utf-8-end_of_line = lf-indent_style = space-max_line_length = 160-insert_final_newline = true-trim_trailing_whitespace = false--[*.{rs,py,toml}]-tab_width = 4-indent_size = 4-indent_style = space--[*.{js,mjs,jsx,ts,tsx,sh,rb,yml,css,json}]-tab_width = 2-indent_size = 2-indent_style = space-diff --git a/screenpipe-app-tauri/app/page.tsx b/screenpipe-app-tauri/app/page.tsxindex 20a369d3c..a39b45941 100644--- a/screenpipe-app-tauri/app/page.tsx+++ b/screenpipe-app-tauri/app/page.tsx@@ -24,14 +24,13 @@ import { Tabs, TabsContent, TabsList, TabsTrigger } from "@/components/ui/tabs";import { SearchChat } from "@/components/search-chat";import { Separator } from "@/components/ui/separator";import Onboarding from "@/components/onboarding";+import { useOnboarding } from "@/lib/hooks/use-onboarding";+export default function Home() {const { settings } = useSettings();const posthog = usePostHog();const { toast } = useToast();-- // useEffect(() => {- // checkForAppUpdates({ toast });- // }, [toast]);+ const { showOnboarding, setShowOnboarding } = useOnboarding();useEffect(() => {if (settings.userId) {@@ -42,7 +41,7 @@ export default function Home() {return (<main className="flex min-h-screen flex-col items-center"><NotificationHandler />- <Onboarding />+ {showOnboarding && <Onboarding />}{/* <UpdateNotification checkIntervalHours={3} /> */}{/* <ScreenpipeInstanceChecker /> */}<Header />diff --git a/screenpipe-app-tauri/app/providers.tsx b/screenpipe-app-tauri/app/providers.tsxindex d33cc9c53..ecd98b4c1 100644--- a/screenpipe-app-tauri/app/providers.tsx+++ b/screenpipe-app-tauri/app/providers.tsx@@ -4,6 +4,7 @@ import posthog from "posthog-js";import { PostHogProvider } from "posthog-js/react";import { useEffect } from "react";import { initOpenTelemetry } from "@/lib/opentelemetry";+import { OnboardingProvider } from "@/lib/hooks/use-onboarding";export function Providers({ children }: { children: React.ReactNode }) {useEffect(() => {@@ -19,5 +20,9 @@ export function Providers({ children }: { children: React.ReactNode }) {}}, []);- return <PostHogProvider client={posthog}>{children}</PostHogProvider>;+ return (+ <OnboardingProvider>+ <PostHogProvider client={posthog}>{children}</PostHogProvider>+ </OnboardingProvider>+ );}diff --git a/screenpipe-app-tauri/components/header.tsx b/screenpipe-app-tauri/components/header.tsxindex 082b02cf0..7e3a757bb 100644--- a/screenpipe-app-tauri/components/header.tsx+++ b/screenpipe-app-tauri/components/header.tsx@@ -19,10 +19,12 @@ import {DropdownMenuItem,DropdownMenuTrigger,} from "@/components/ui/dropdown-menu";-import { MessageSquare, Heart, Menu, Bell } from "lucide-react";+import { MessageSquare, Heart, Menu, Bell, Play } from "lucide-react";import { open } from "@tauri-apps/plugin-shell";import { InboxMessages, Message } from "@/components/inbox-messages";import { useState, useRef, useEffect } from "react";+import Onboarding from "@/components/onboarding";+import { useOnboarding } from "@/lib/hooks/use-onboarding";function IconNewChat() {return (@@ -56,6 +58,8 @@ export default function Header() {setMessages(messages.filter((msg) => msg.id !== id));};+ const { setShowOnboarding } = useOnboarding();+return (<div><div className="absolute left-8 top-4">@@ -64,6 +68,7 @@ export default function Header() {<TooltipTrigger asChild><Buttonvariant="secondary"+ className="cursor-pointer"onClick={() => {location.reload();}}@@ -94,7 +99,7 @@ export default function Header() {</div></div><div className="flex space-x-4 absolute top-4 right-4">- <HealthStatus className="mt-3" />+ <HealthStatus className="mt-3 cursor-pointer" /><MeetingHistory /><PipeDialog /><Settings />@@ -102,6 +107,7 @@ export default function Header() {<Buttonvariant="ghost"size="icon"+ className="cursor-pointer"onClick={() => setShowInbox(!showInbox)}><Bell className="h-[1.2rem] w-[1.2rem]" />@@ -109,13 +115,14 @@ export default function Header() {</Button><DropdownMenu><DropdownMenuTrigger asChild>- <Button variant="ghost" size="icon">+ <Button variant="ghost" size="icon" className="cursor-pointer"><Menu className="h-[1.2rem] w-[1.2rem]" /><span className="sr-only">menu</span></Button></DropdownMenuTrigger><DropdownMenuContent className="mr-4" align="end"><DropdownMenuItem+ className="cursor-pointer"onClick={() =>open("mailto:[email protected]?subject=Screenpipe%20Feedback&body=Please%20enter%20your%20feedback%20here...%0A%0A...%20or%20let's%20chat?%0Ahttps://cal.com/louis030195/screenpipe"@@ -126,6 +133,7 @@ export default function Header() {<span>send feedback</span></DropdownMenuItem><DropdownMenuItem+ className="cursor-pointer"onClick={() =>open("https://twitter.com/intent/tweet?text=here's%20how%20i%20use%20@screen_pipe%20...%20%5Bscreenshot%5D%20an%20awesome%20tool%20for%20..."@@ -135,6 +143,13 @@ export default function Header() {<Heart className="mr-2 h-4 w-4" /><span>support us</span></DropdownMenuItem>+ <DropdownMenuItem+ className="cursor-pointer"+ onClick={() => setShowOnboarding(true)}+ >+ <Play className="mr-2 h-4 w-4" />+ <span>show onboarding</span>+ </DropdownMenuItem></DropdownMenuContent></DropdownMenu></div>diff --git a/screenpipe-app-tauri/components/onboarding.tsx b/screenpipe-app-tauri/components/onboarding.tsxindex fccea765d..246a1accd 100644--- a/screenpipe-app-tauri/components/onboarding.tsx+++ b/screenpipe-app-tauri/components/onboarding.tsx@@ -12,6 +12,7 @@ import OnboardingDevConfig from "@/components/onboarding/dev-configuration";import OnboardingSelection from "@/components/onboarding/usecases-selection";import OnboardingInstructions from "@/components/onboarding/explain-instructions";import OnboardingExperimentalFeatures from "@/components/onboarding/features-experimental";+import { useOnboarding } from "@/lib/hooks/use-onboarding";const setFirstTimeUserFlag = async () => {await localforage.setItem("isFirstTimeUser", false);@@ -30,126 +31,128 @@ type SlideKey =| "experimentalFeatures";const slideFlow: Record<- SlideKey, {+ SlideKey,+ {next: (selectedOptions?: string[],selectedPreference?: string | null,- selectedPersonalization?: string | null,+ selectedPersonalization?: string | null) => SlideKey | null;prev: (selectedOptions?: string[],selectedPreference?: string | null,- selectedPersonalization?: string | null,+ selectedPersonalization?: string | null) => SlideKey | null;}> = {- intro: { // introduction video of screenpipe+ intro: {+ // introduction video of screenpipenext: () => "status",prev: () => null,},- status: { // status of screenpipe (blockage or not)- next: () => "selection",- prev: () => "intro",- },- selection: { // selection (four options)+ status: {+ // status of screenpipe (blockage or not)+ next: () => "selection",+ prev: () => "intro",+ },+ selection: {+ // selection (four options)next: (selectedOptions) => {- if (!Array.isArray(selectedOptions)- || selectedOptions.length === 0)+ if (!Array.isArray(selectedOptions) || selectedOptions.length === 0)return null;- if (selectedOptions.includes("personalUse"))- return "personalize";- if (selectedOptions.includes("professionalUse"))- return "apiSetup";- if (selectedOptions.includes("developmentlUse"))- return "devOrNonDev";- if (selectedOptions.includes("otherUse"))- return "devOrNonDev";- return "instructions";+ return "devOrNonDev";},prev: () => "status",},- personalize: { // personalize (with ai or without ai)+ personalize: {+ // personalize (with ai or without ai)next: (selectedOptions, __, selectedPersonalization) => {- if (selectedPersonalization === "withAI")- return "apiSetup";- if (selectedOptions?.includes("personalUse")- && selectedPersonalization === "withoutAI")+ if (selectedPersonalization === "withAI") return "apiSetup";+ if (+ selectedOptions?.includes("personalUse") &&+ selectedPersonalization === "withoutAI"+ )return "devOrNonDev";- return "instructions"- },+ return "instructions";+ },prev: () => "selection",},- apiSetup: { // api setup & validation+ apiSetup: {+ // api setup & validationnext: () => "instructions",prev: (selectedOptions) => {- if (selectedOptions?.length === 1 && selectedOptions?.includes("professionalUse")) {+ if (+ selectedOptions?.length === 1 &&+ selectedOptions?.includes("professionalUse")+ ) {return "selection";- }- return "personalize"+ }+ return "personalize";},},- devOrNonDev: { // dev or no dev+ devOrNonDev: {+ // dev or no devnext: (selectedOptions, selectedPreference, selectedPersonalization) => {- if (selectedOptions?.includes("personalUse")- && selectedPersonalization === "withoutAI"- && selectedPreference === "nonDevMode")+ if (+ selectedOptions?.includes("personalUse") &&+ selectedPersonalization === "withoutAI" &&+ selectedPreference === "nonDevMode"+ )return "instructions";- if (selectedPreference === "devMode")- return "devConfig"- return "personalize"- },+ if (selectedPreference === "devMode") return "devConfig";+ return "personalize";+ },prev: () => "selection",},- devConfig: { // dev configuration- next: () => "pipes",- prev: () => "devOrNonDev"+ devConfig: {+ // dev configuration+ next: () => "pipes",+ prev: () => "devOrNonDev",},- pipes: { // explain about pipes to dev- next: () => "instructions",+ pipes: {+ // explain about pipes to dev+ next: () => "instructions",prev: () => "devConfig",},- instructions: { // instructions for every type of user- next: () => "experimentalFeatures",+ instructions: {+ // instructions for every type of user+ next: () => "experimentalFeatures",prev: (selectedOptions, selectedPreference, selectedPersonalization) => {- if (selectedPreference === "devMode")- return "pipes";- if (selectedOptions?.includes("personalUse"))- return "personalize";- if (selectedOptions?.includes("professionalUse"))- return "apiSetup";- if (selectedOptions?.includes("developmentlUse")- && selectedPreference === "nonDevMode"- && selectedPersonalization === "withoutAI")- return "personalize";- if (selectedOptions?.includes("developmentlUse")- || selectedOptions?.includes("otherUse")- && selectedPersonalization === "withAI")- return "apiSetup";+ if (selectedPreference === "devMode") return "pipes";+ if (selectedOptions?.includes("personalUse")) return "personalize";+ if (selectedOptions?.includes("professionalUse")) return "personalize";+ if (selectedOptions?.includes("developmentlUse")) return "personalize";+ if (selectedPersonalization === "withAI") return "apiSetup";return "devOrNonDev";- }+ },},- experimentalFeatures: { // experimental features- next: () => null,+ experimentalFeatures: {+ // experimental features+ next: () => null,prev: () => "instructions",},};const Onboarding: React.FC = () => {const { toast } = useToast();- const [isOpen, setIsOpen] = useState(false);const [currentSlide, setCurrentSlide] = useState<SlideKey>("intro");- const [selectedOptions, setSelectedOptions] = useState<string[]>([]); // use case selection (four options)- const [selectedPersonalization, setSelectedPersonalization] = useState<string | null >(null); // with ai or without ai- const [selectedPreference, setSelectedPreference] = useState<string | null >(null); // dev or non dev+ const [selectedOptions, setSelectedOptions] = useState<string[]>([]); // use case selection (four options)+ const [selectedPersonalization, setSelectedPersonalization] = useState<+ string | null+ >(null); // with ai or without ai+ const [selectedPreference, setSelectedPreference] = useState<string | null>(+ null+ ); // dev or non devconst [error, setError] = useState<string | null>(null);const [isVisible, setIsVisible] = useState(false);+ const { showOnboarding, setShowOnboarding } = useOnboarding();useEffect(() => {setIsVisible(true);}, [currentSlide]);useEffect(() => {- if (isOpen) {+ if (showOnboarding) {const hideCloseButton = () => {const closeButton = document.querySelector(".lucide-x");if (closeButton) {@@ -158,13 +161,13 @@ const Onboarding: React.FC = () => {};setTimeout(hideCloseButton, 100);}- }, [isOpen]);+ }, [showOnboarding]);useEffect(() => {const checkFirstTimeUser = async () => {const isFirstTime = await localforage.getItem<boolean>("isFirstTimeUser");if (isFirstTime === null) {- setIsOpen(true);+ setShowOnboarding(true);}};checkFirstTimeUser();@@ -184,9 +187,12 @@ const Onboarding: React.FC = () => {const nextSlide = slideFlow[currentSlide].next(selectedOptions,selectedPreference,- selectedPersonalization,+ selectedPersonalization);- if (currentSlide === "selection" && (!selectedOptions || selectedOptions.length === 0)) {+ if (+ currentSlide === "selection" &&+ (!selectedOptions || selectedOptions.length === 0)+ ) {setError("please select at least one option before proceeding!");return;}@@ -199,14 +205,14 @@ const Onboarding: React.FC = () => {return;}if (nextSlide) {- setIsVisible(false)+ setIsVisible(false);setTimeout(() => {setCurrentSlide(nextSlide);setError(null);}, 300);} else {- setError("Please validate selection")- }+ setError("Please validate selection");+ }};const handlePrevSlide = () => {@@ -215,7 +221,7 @@ const Onboarding: React.FC = () => {const prevSlide = slideFlow[currentSlide].prev(selectedOptions,selectedPreference,- selectedPersonalization,+ selectedPersonalization);if (prevSlide) {setError(null);@@ -233,42 +239,40 @@ const Onboarding: React.FC = () => {setError(null);};- const handleDialogClose = (isOpen: boolean) => {- if (!isOpen && currentSlide) {- return;+ const handleDialogClose = (open: boolean) => {+ if (!open && currentSlide) {+ setShowOnboarding(open);}- setIsOpen(isOpen);};const handleEnd = async () => {- setIsOpen(false);+ setShowOnboarding(false);await setFirstTimeUserFlag();- window.location.reload();};return (- <Dialog open={isOpen} onOpenChange={handleDialogClose}>- <DialogContent className="max-w-3xl h-[580px] max-h-[80vh]">+ <Dialog open={showOnboarding} onOpenChange={handleDialogClose}>+ <DialogContent className="max-w-4xl h-[640px] max-h-[100vh]"><div className="relative w-full h-full overflow-hidden">{currentSlide === "intro" && (- <OnboardingIntro+ <OnboardingIntroclassName={`transition-opacity duration-300- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}- handleNextSlide={handleNextSlide}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}+ handleNextSlide={handleNextSlide}/>)}{currentSlide === "status" && (<OnboardingStatusclassName={`transition-opacity duration-300- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handlePrevSlide={handlePrevSlide}- handleNextSlide={handleNextSlide}+ handleNextSlide={handleNextSlide}/>)}{currentSlide === "selection" && (<OnboardingSelectionclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleOptionClick={handleOptionClick}selectedOptions={selectedOptions}handlePrevSlide={handlePrevSlide}@@ -278,7 +282,7 @@ const Onboarding: React.FC = () => {{currentSlide === "personalize" && (<OnboardingPersonalizeclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleOptionClick={setSelectedPersonalization}selectedPersonalization={selectedPersonalization}handlePrevSlide={handlePrevSlide}@@ -288,7 +292,7 @@ const Onboarding: React.FC = () => {{currentSlide === "apiSetup" && (<OnboardingAPISetupclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleNextSlide={handleNextSlide}handlePrevSlide={handlePrevSlide}/>@@ -296,7 +300,7 @@ const Onboarding: React.FC = () => {{currentSlide === "devOrNonDev" && (<OnboardingDevOrNonDevclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleOptionClick={setSelectedPreference}selectedPreference={selectedPreference}handlePrevSlide={handlePrevSlide}@@ -306,7 +310,7 @@ const Onboarding: React.FC = () => {{currentSlide === "devConfig" && (<OnboardingDevConfigclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleNextSlide={handleNextSlide}handlePrevSlide={handlePrevSlide}/>@@ -314,7 +318,7 @@ const Onboarding: React.FC = () => {{currentSlide === "pipes" && (<OnboardingPipesclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleNextSlide={handleNextSlide}handlePrevSlide={handlePrevSlide}/>@@ -322,7 +326,7 @@ const Onboarding: React.FC = () => {{currentSlide === "instructions" && (<OnboardingInstructionsclassName={`transition-opacity duration-300 ease-in-out- ${isVisible ? 'opacity-100 ease-out' : 'opacity-0 ease-in'}`}+ ${isVisible ? "opacity-100 ease-out" : "opacity-0 ease-in"}`}handleNextSlide={handleNextSlide}handlePrevSlide={handlePrevSlide}/>@@ -330,7 +334,7 @@ const Onboarding: React.FC = () => {{currentSlide === "experimentalFeatures" && (<OnboardingExperimentalFeaturesclassName={`transition-opacity duration-300- ${isVisible ? 'opacity-100' : 'opacity-0'}`}+ ${isVisible ? "opacity-100" : "opacity-0"}`}handleNextSlide={handleEnd}handlePrevSlide={handlePrevSlide}/>@@ -342,4 +346,3 @@ const Onboarding: React.FC = () => {};export default Onboarding;-diff --git a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsxindex daaaf0f0d..4214a987b 100644--- a/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx+++ b/screenpipe-app-tauri/components/onboarding/dev-configuration.tsx@@ -33,37 +33,48 @@ const OnboardingDevConfig: React.FC<OnboardingDevConfigProps> = ({windows: [{label: "to start using the screenpipe cli,",- description: "to use the screenpipe cli, open your cmd with admin privileges and navigate to '%LOCALAPPDATA%\\screenpipe' or run this command to view all setup arguments",- command: "cd %LOCALAPPDATA%\\screenpipe && ./\screenpipe.exe -h # shows list of arguments",+ description:+ "to use the screenpipe cli, open your cmd with admin privileges and navigate to '%LOCALAPPDATA%\\screenpipe' or run this command to view all setup arguments",+ command:+ "cd %LOCALAPPDATA%\\screenpipe && ./screenpipe.exe -h # shows list of arguments",},{label: "starting screenpipe with custom arguments,",- description: "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",- command: "screenpipe --ignored-windows settings # ignore the windows named settings",+ description:+ "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",+ command:+ "screenpipe --ignored-windows settings # ignore the windows named settings",},],macos: [{label: "to start using the screenpipe cli,",- description: "to use the screenpipe cli, open your terminal and navigate to '/Applications/screenpipe.app/Contents/MacOS/' or run this command to view all setup arguments",- command: "cd /Applications/screenpipe.app/Contents/MacOS/ && screenpipe -h # shows help",+ description:+ "to use the screenpipe cli, open your terminal and navigate to '/Applications/screenpipe.app/Contents/MacOS/' or run this command to view all setup arguments",+ command:+ "cd /Applications/screenpipe.app/Contents/MacOS/ && screenpipe -h # shows help",},{label: "starting screenpipe with custom arguments",- description: "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",+ description:+ "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",command: "screenpipe --list-monitors # list monitors",},],linux: [{label: "to start using the screenpipe cli,",- description: "open your terminal and navigate to the installation directory (usually /usr/local/bin) or run this command, this will show all arguments to setup screenpipe as you prefer.",- command: "cd /usr/local/bin/ && screenpipe -h # shows list of arguments",+ description:+ "open your terminal and navigate to the installation directory (usually /usr/local/bin) or run this command, this will show all arguments to setup screenpipe as you prefer.",+ command:+ "cd /usr/local/bin/ && screenpipe -h # shows list of arguments",},{label: "starting screenpipe with custom arguments",- description: "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",- command: "screenpipe --ignored-windows kitty # ignore the windows named kitty",+ description:+ "after reviewing the cli arguments, choose your setup options and start screenpipe with your preference. replace arguments as needed. for example:",+ command:+ "screenpipe --ignored-windows kitty # ignore the windows named kitty",},],};@@ -137,6 +148,10 @@ const OnboardingDevConfig: React.FC<OnboardingDevConfigProps> = ({<ArrowUpRight className="inline w-4 h-4 ml-1 " /></a></div>+ <p className="text-xs text-muted-foreground text-center mt-2">+ note: if you use dev mode, you will have to start and maintain the+ recording process yourself in the terminal+ </p><OnboardingNavigationclassName="mt-6"handlePrevSlide={handlePrevSlide}diff --git a/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsx b/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsxindex 144a577d6..c0735a773 100644--- a/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsx+++ b/screenpipe-app-tauri/components/onboarding/dev-or-non-dev.tsx@@ -6,6 +6,7 @@ import { useSettings } from "@/lib/hooks/use-settings";import { Card, CardContent } from "@/components/ui/card";import { DialogHeader, DialogTitle } from "@/components/ui/dialog";import OnboardingNavigation from "@/components/onboarding/navigation";+import { invoke } from "@tauri-apps/api/core";interface OnboardingDevOrNonDevProps {className?: string;@@ -20,38 +21,49 @@ const DEV_OPTIONS = [key: "nonDevMode",icon: UserRound,title: "standard mode",- description: "let screenpipe handle the backend automatically, ensuring a hands-free experience where complex operations are managed with precision and efficiency.",+ description:+ "let screenpipe handle the backend automatically, ensuring a hands-free experience where complex operations are managed with precision and efficiency.",},{key: "devMode",icon: Wrench,title: "dev mode",- description: "in development mode, gain full control over screenpipe, configure backend processes via cli, enabling you an advanced customization and independent testing.",+ description:+ "in development mode, gain full control over screenpipe, configure backend processes via cli, enabling you an advanced customization and independent testing.",},];const CardItem: React.FC<{isSelected: boolean;onClick: () => void;- option: typeof DEV_OPTIONS[number];+ option: (typeof DEV_OPTIONS)[number];}> = ({ option, isSelected, onClick }) => {const { icon: Icon, title, description } = option;return (<div className="relative group h-[270px]">- <div className={`absolute h-full !mt-[-5px] inset-0 rounded-lg transition-all duration-300 ease-out group-hover:before:opacity-100 group-hover:before:scale-100+ <div+ className={`absolute h-full !mt-[-5px] inset-0 rounded-lg transition-all duration-300 ease-out group-hover:before:opacity-100 group-hover:before:scale-100before:absolute before:inset-0 before:rounded-lg before:border-2 before:border-black dark:before:border-white before:opacity-0 before:scale-95 before:transition-all- before:duration-300 before:ease-out ${isSelected ? "before:!border-none" : "" }`}+ before:duration-300 before:ease-out ${+ isSelected ? "before:!border-none" : ""+ }`}/><CardclassName={`p-4 h-[270px] !mt-[-5px] hover:bg-accent cursor-pointer bg-white dark:bg-gray-800 transition-all relative z-[1] duration-300 ease-out group-hover:scale-[0.98]- ${isSelected ? "bg-accent transition-transform relative border-2 border-black dark:border-white" : "" }`}+ ${+ isSelected+ ? "bg-accent transition-transform relative border-2 border-black dark:border-white"+ : ""+ }`}onClick={onClick}><CardContent className="flex flex-col w-[250px] justify-start"><Icon className="w-12 h-12 mx-auto" /><h2 className="font-semibold text-xl text-center mt-1">{title}</h2>- <span className="prose-sm prose mt-0 text-balance">{description}</span>+ <span className="prose-sm prose mt-0 text-balance">+ {description}+ </span></CardContent></Card></div>@@ -65,7 +77,6 @@ const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({handleNextSlide,handlePrevSlide,}) => {-const { toast } = useToast();const { settings, updateSettings } = useSettings();const [localSettings, setLocalSettings] = useState(settings);@@ -73,36 +84,45 @@ const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({const handleNextWithPreference = async (option: string) => {try {if (option === "devMode") {- await updateSettings({ devMode: true })+ await updateSettings({ devMode: true });setLocalSettings({ ...localSettings, devMode: true });- toast({- title: "success",- description: "dev mode enabled successfully",- variant: "default"- })- } else if (option === "nonDevMode") {- await updateSettings({ devMode: false });- setLocalSettings({...localSettings, devMode: false});- toast({- title: "success",- description: "screenpipe backend is in standard mode",- variant: "default"- })- }- } catch (error: any) {toast({- title: "error",- description: error,- variant: "destructive"- })+ title: "success",+ description: "dev mode enabled successfully",+ variant: "default",+ });+ } else if (option === "nonDevMode") {+ await updateSettings({ devMode: false });+ setLocalSettings({ ...localSettings, devMode: false });+ toast({+ title: "success",+ description: "screenpipe backend is in standard mode",+ variant: "default",+ });+ // TODO: should give better user feedback+ await invoke("spawn_screenpipe");}+ } catch (error: any) {+ toast({+ title: "error",+ description: error,+ variant: "destructive",+ });+ }};return (- <div className={`${className} w-full flex justify-center flex-col relative`}>+ <div+ className={`${className} w-full flex justify-center flex-col relative`}+ ><DialogHeader className="mt-1 px-2"><div className="w-full !mt-[-10px] inline-flex justify-center">- <img src="/128x128.png" alt="screenpipe-logo" width="72" height="72" />+ <img+ src="/128x128.png"+ alt="screenpipe-logo"+ width="72"+ height="72"+ /></div><DialogTitle className="text-center !mt-[-2px] font-bold text-[32px] text-balance flex justify-center">select your preference@@ -122,7 +142,7 @@ const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({))}</div><span className="absolute bottom-12 text-muted-foreground prose-sm text-center block w-full z-[-1]">- <Info className="inline w-4 h-4 mb-[1px]" /> dev mode is for experts!+ <Info className="inline w-4 h-4 mb-[1px]" /> dev mode is for experts!</span><OnboardingNavigationclassName="mt-9"@@ -131,8 +151,8 @@ const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({handlePrevSlide={handlePrevSlide}handleNextSlide={async () => {if (selectedPreference) {- await handleNextWithPreference(selectedPreference)- }+ await handleNextWithPreference(selectedPreference);+ }handleNextSlide();}}/>@@ -141,4 +161,3 @@ const OnboardingDevOrNonDev: React.FC<OnboardingDevOrNonDevProps> = ({};export default OnboardingDevOrNonDev;-diff --git a/screenpipe-app-tauri/components/onboarding/explain-instructions.tsx b/screenpipe-app-tauri/components/onboarding/explain-instructions.tsxindex 26dcadd57..d9131558c 100644--- a/screenpipe-app-tauri/components/onboarding/explain-instructions.tsx+++ b/screenpipe-app-tauri/components/onboarding/explain-instructions.tsx@@ -21,7 +21,6 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({handlePrevSlide,handleNextSlide,}) => {-return (<div className={`${className} w-full flex justify-center flex-col`}><DialogHeader className="px-2">@@ -46,16 +45,14 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({</div><div className="mt-2 w-full flex justify-around flex-col"><div className="mx-4 mb-2">- <h2 className="font-semibold text-md">- search functionality:- </h2>+ <h2 className="font-semibold text-md">search functionality:</h2><p className="text-muted-foreground text-[14px]"><span className="font-medium text-nowrap text-[14px] prose mr-1">on screenpipe's main menu,- </span>- you'll find a search bar to query the 24/7 captured data.- it filters out pii and lets you select specific results for- ai summarization and processing, providing valuable insights.+ </span>+ you'll find a search bar to query the 24/7 captured data. it+ lets you select specific results for ai summarization and chatting,+ providing valuable insights.</p></div><div className="flex justify-center">@@ -63,15 +60,13 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({<div className="h-[1px] w-[80%] rounded-full bg-gradient-to-r from-slate-500/30 to-transparent"></div></div><div className="mx-4 mb-2">- <h2 className="font-medium text-md">- status menu:- </h2>+ <h2 className="font-medium text-md">status menu:</h2><p className="text-muted-foreground text-[14px]"><span className="font-medium text-nowrap text-[14px] prose mr-1">- screenpipe status menu serves- </span>- as a health and process monitor and allows you to- adjust advanced preferences for backend processes+ screenpipe status menu serves+ </span>+ as a health and process monitor and allows you to adjust advanced+ preferences for backend processes</p></div><div className="flex justify-center">@@ -79,15 +74,13 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({<div className="h-[1px] w-[80%] rounded-full bg-gradient-to-r from-slate-500/30 to-transparent"></div></div><div className="mx-4 mb-2">- <h2 className="font-medium text-md">- settings menu:- </h2>+ <h2 className="font-medium text-md">settings menu:</h2><p className="text-muted-foreground text-[14px]"><span className="font-medium text-nowrap text-[14px] prose mr-1">the settings menu,- </span>- is where you can configure various options like monitor- recorder settings and ai preferences. this section lets you customize how+ </span>+ is where you can configure various options like monitor recorder+ settings and ai preferences. this section lets you customize howscreenpipe interacts with llms</p></div>@@ -102,37 +95,23 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({<p className="text-muted-foreground text-[14px]"><span className="font-medium text-nowrap text-[14px] prose mr-1">this features of screenpipe- </span>- tracks your meetings by analyzing specific keywords and generates summaries for you using ai & llms .+ </span>+ tracks your meetings by analyzing specific keywords and generates+ summaries for you using ai & llms .+ </p>+ </div>+ <div className="mx-4">+ <h2 className="font-medium text-md">pipe store (experimental):</h2>+ <p className="text-muted-foreground text-[14px]">+ <span className="font-medium text-nowrap text-[14px] prose mr-1">+ this features of screenpipe+ </span>+ extend your 24/7 data through plugins you can install in seconds,+ create, share and sell your own.</p></div></div>- <span className="absolute bottom-12 text-muted-foreground prose-sm text-center block w-full ">- <TooltipProvider>- <Tooltip>- <TooltipTrigger asChild>- <span>- <Info className="inline w-4 h-4 mb-[1.5px] mr-1" />hover on these- '<HelpCircle className="mb-1 inline h-4 w-4 cursor-default" />'- for more info- </span>- </TooltipTrigger>- <TooltipContent side="right">- <a- onClick={() =>- open(- "https://docs.screenpi.pe/",- )- }- href="#"- className="mt-4 text-muted-foreground text-sm mr-auto ml-auto !text-center hover:underline"- >- checkout our docs to learn more- </a>- </TooltipContent>- </Tooltip>- </TooltipProvider>- </span>+<OnboardingNavigationclassName="mt-8"handlePrevSlide={handlePrevSlide}@@ -145,4 +124,3 @@ const OnboardingInstructions: React.FC<OnboardingInstructionsProps> = ({};export default OnboardingInstructions;-diff --git a/screenpipe-app-tauri/components/onboarding/status.tsx b/screenpipe-app-tauri/components/onboarding/status.tsxindex cd3a8f28b..118d3f537 100644--- a/screenpipe-app-tauri/components/onboarding/status.tsx+++ b/screenpipe-app-tauri/components/onboarding/status.tsx@@ -1,11 +1,13 @@-{/*TODO: setup screenpipe status <10-10-24, @tribhuwan-kumar>*/}+{+ /*TODO: setup screenpipe status <10-10-24, @tribhuwan-kumar>*/+}-import React from "react";-import { ArrowUpRight } from "lucide-react";-import { open } from "@tauri-apps/plugin-shell";+import React, { useState, useEffect } from "react";+import { ArrowUpRight, Check } from "lucide-react";import { DialogHeader, DialogTitle } from "@/components/ui/dialog";import OnboardingNavigation from "@/components/onboarding/navigation";import { spinner } from "@/components/spinner";+import { Command } from "@tauri-apps/plugin-shell";interface OnboardingStatusProps {className?: string;@@ -18,9 +20,86 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({handlePrevSlide,handleNextSlide,}) => {+ const [status, setStatus] = useState<string | null>(null);++ useEffect(() => {+ let isMounted = true;+ let child: Awaited<ReturnType<Command<any>["spawn"]>> | null = null;++ const checkStatus = async () => {+ try {+ const command = Command.sidecar("screenpipe", ["setup"]);++ const timeoutPromise = new Promise(+ (_, reject) =>+ setTimeout(+ () => reject(new Error("Status check timed out")),+ 900000+ ) // 15 minutes+ );++ const outputPromise = new Promise<string>((resolve, reject) => {+ command.on("close", (data) => {+ if (data.code !== 0) {+ reject(new Error(`Command failed with code ${data.code}`));+ }+ });+ command.on("error", (error) => reject(new Error(error)));+ command.stdout.on("data", (line) => {+ console.log(line);+ if (line.includes("screenpipe setup complete")) {+ resolve("ok");+ }+ });+ });++ child = await command.spawn();++ try {+ await new Promise((resolve) => setTimeout(resolve, 2000)); // add 2s delay for fast connections+ const result = await Promise.race([outputPromise, timeoutPromise]);+ if (isMounted) {+ setStatus(result as string);+ }+ } catch (error) {+ console.error("Error or timeout:", error);+ if (isMounted) {+ setStatus("error");+ }+ }+ } catch (error) {+ console.error("Error checking status:", error);+ if (isMounted) {+ setStatus("error");+ }+ }+ };++ checkStatus();++ return () => {+ isMounted = false;+ if (child) {+ child.kill().catch(console.error);+ }+ };+ }, []);++ const handleNext = () => {+ setStatus(null);+ handleNextSlide();+ };++ const handlePrev = () => {+ setStatus(null);+ handlePrevSlide();+ };+return (- <div className={`${className} w-full flex justify-center flex-col`}>- <DialogHeader className="px-2">+ <div+ className={`${className} w-full flex justify-center flex-col items-center`}+ >+ <DialogHeader className="px-2 w-full max-w-md"><div className="w-full inline-flex !mt-[-10px] justify-center"><imgsrc="/128x128.png"@@ -30,28 +109,54 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({/></div><DialogTitle className="text-center !mt-[-3px] font-bold text-[30px] text-balance flex justify-center">- wait we are checking the status of screenpipe+ setting up screenpipe</DialogTitle><h1 className="font-medium text-center !mt-[-1px] text-md prose">- hold on+ this may take a few minutes depending on your internet connection</h1>++ <div className="mt-4 text-sm text-zinc-600 mx-auto">+ <p className="mb-2 text-center">how screenpipe works:</p>+ <ul className="list-disc list-inside text-left">+ <li>core recording process runs in the background</li>+ <li>gui interface for easy interaction</li>+ <li>can also be used as a standalone cli tool</li>+ <li>captures screens & mics 24/7</li>+ <li>extracts text (ocr) & speech-to-text</li>+ <li>saves data locally for privacy</li>+ </ul>+ </div>++ <p className="text-xs text-center text-zinc-500 mt-2">+ if encountering any issues, you can proceed to the next step and it+ will setup screenpipe when starting the recording process+ </p></DialogHeader>- <svg- fill="none"- stroke="currentColor"- strokeWidth="1.5"- viewBox="0 0 24 24"- strokeLinecap="round"- strokeLinejoin="round"- xmlns="http://www.w3.org/2000/svg"- className="size-5 animate-spin stroke-zinc-400"- >- <path d="M12 3v3m6.366-.366-2.12 2.12M21 12h-3m.366 6.366-2.12-2.12M12 21v-3m-6.366.366 2.12-2.12M3 12h3m-.366-6.366 2.12 2.12"></path>- </svg>+ {status === null ? (+ <svg+ fill="none"+ stroke="currentColor"+ strokeWidth="1.5"+ viewBox="0 0 24 24"+ strokeLinecap="round"+ strokeLinejoin="round"+ xmlns="http://www.w3.org/2000/svg"+ className="size-5 animate-spin stroke-zinc-400 mx-auto mt-4"+ >+ <path d="M12 3v3m6.366-.366-2.12 2.12M21 12h-3m.366 6.366-2.12-2.12M12 21v-3m-6.366.366 2.12-2.12M3 12h3m-.366-6.366 2.12 2.12"></path>+ </svg>+ ) : status === "ok" ? (+ <div className="flex flex-col items-center mt-4">+ <Check className="size-5 stroke-zinc-400" />+ <p className="text-sm text-zinc-600 mt-2">screenpipe setup complete. ai models downloaded.</p>+ </div>+ ) : (+ <p className="text-center mt-4">{status}</p>+ )}<OnboardingNavigation- className="mt-8"- handlePrevSlide={handlePrevSlide}- handleNextSlide={handleNextSlide}+ className="mt-8 w-full max-w-md"+ handlePrevSlide={handlePrev}+ handleNextSlide={handleNext}prevBtnText="previous"nextBtnText="next"/>@@ -60,4 +165,3 @@ const OnboardingStatus: React.FC<OnboardingStatusProps> = ({};export default OnboardingStatus;-diff --git a/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx b/screenpipe-app-tauri/components/onboarding/usecases-selection.tsxindex d9b1359cf..ac765b06d 100644--- a/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx+++ b/screenpipe-app-tauri/components/onboarding/usecases-selection.tsx@@ -8,6 +8,7 @@ import {SlidersHorizontal,} from "lucide-react";import OnboardingNavigation from "@/components/onboarding/navigation";+import posthog from "posthog-js";interface OnboardingSelectionProps {className?: string;@@ -22,30 +23,33 @@ const OPTIONS = [key: "personalUse",icon: UserRound,label: "personal use",- description: "daily summary & educational material organization",+ description:+ "personal knowledge management, productivity, custom dev, etc.",},{key: "professionalUse",icon: BriefcaseBusiness,label: "professional use",- description: "productivity tracking & meeting summaries",+ description:+ "out of the box productivity, meeting summaries, automation, etc.",},{key: "developmentlUse",icon: Wrench,label: "development purpose",- description: "automate data capture & create ai-powered workflows",+ description:+ "integrate in your business product, build on top, resell, etc.",},{key: "otherUse",icon: SlidersHorizontal,label: "other",- description: "",+ description: "", // TODO editable},];const SelectionItem: React.FC<{- option: typeof OPTIONS[number];+ option: (typeof OPTIONS)[number];isSelected: boolean | undefined;onClick: () => void;}> = ({ option, isSelected, onClick }) => {@@ -53,12 +57,17 @@ const SelectionItem: React.FC<{return (<divclassName={`w-[90%] flex items-center border prose prose-sm rounded-lg m-[10px] px-4 py-[10px] hover:bg-accent cursor-pointer- ${isSelected ? "bg-primary text-primary-foreground transition duration-300 hover:bg-primary/90" : ""}`}+ ${+ isSelected+ ? "bg-primary text-primary-foreground transition duration-300 hover:bg-primary/90"+ : ""+ }`}onClick={onClick}><span className="float-left"><Icon className="inline h-4 w-4 mr-2" />- {label} {description && <span className="text-[12px]">({description})</span>}+ {label}{" "}+ {description && <span className="text-[12px]">({description})</span>}</span>{isSelected && <CircleCheck className="inline h-4 w-4 ml-auto" />}</div>@@ -72,18 +81,34 @@ const OnboardingSelection: React.FC<OnboardingSelectionProps> = ({handleNextSlide,handlePrevSlide,}) => {+ const handleNext = () => {+ // Track selected options in Posthog+ posthog.capture("onboarding_usecases_selected", {+ selected_options: selectedOptions,+ });++ // Call the original handleNextSlide function+ handleNextSlide();+ };+return (- <div className={className}>+ <div className={`${className} flex flex-col h-full`}><DialogHeader className="flex justify-center items-center"><div className="w-full !mt-[-10px] inline-flex justify-center">- <img src="/128x128.png" alt="screenpipe-logo" width="72" height="72" />+ <img+ src="/128x128.png"+ alt="screenpipe-logo"+ width="72"+ height="72"+ /></div><DialogTitle className="font-bold text-[30px] text-balance">what are you planning to use the screenpipe for?</DialogTitle></DialogHeader>+<div className="flex relative mt-8 justify-center items-center flex-col">- <span className="text-[15px] w-full ml-24 text-left text-muted-foreground">+ <span className="text-[15px] w-full text-center text-muted-foreground mb-2">you can select multiple options:</span>{OPTIONS.map((option) => (@@ -96,9 +121,9 @@ const OnboardingSelection: React.FC<OnboardingSelectionProps> = ({))}</div><OnboardingNavigation- className="mt-9"+ className="mt-auto"handlePrevSlide={handlePrevSlide}- handleNextSlide={handleNextSlide}+ handleNextSlide={handleNext}prevBtnText="previous"nextBtnText="next"/>@@ -107,4 +132,3 @@ const OnboardingSelection: React.FC<OnboardingSelectionProps> = ({};export default OnboardingSelection;-diff --git a/screenpipe-app-tauri/lib/hooks/use-onboarding.tsx b/screenpipe-app-tauri/lib/hooks/use-onboarding.tsxnew file mode 100644index 000000000..3e1e149b5--- /dev/null+++ b/screenpipe-app-tauri/lib/hooks/use-onboarding.tsx@@ -0,0 +1,30 @@+import React, { createContext, useState, useContext } from "react";++interface OnboardingContextType {+ showOnboarding: boolean;+ setShowOnboarding: (show: boolean) => void;+}++const OnboardingContext = createContext<OnboardingContextType | undefined>(+ undefined+);++export const OnboardingProvider: React.FC<{ children: React.ReactNode }> = ({+ children,+}) => {+ const [showOnboarding, setShowOnboarding] = useState(false);++ return (+ <OnboardingContext.Provider value={{ showOnboarding, setShowOnboarding }}>+ {children}+ </OnboardingContext.Provider>+ );+};++export const useOnboarding = () => {+ const context = useContext(OnboardingContext);+ if (context === undefined) {+ throw new Error("useOnboarding must be used within an OnboardingProvider");+ }+ return context;+};diff --git a/screenpipe-app-tauri/scripts/pre_build.js b/screenpipe-app-tauri/scripts/pre_build.jsindex 26d60a796..d96c49a80 100644--- a/screenpipe-app-tauri/scripts/pre_build.js+++ b/screenpipe-app-tauri/scripts/pre_build.js@@ -123,10 +123,13 @@ async function copyDenoBinary() {let denoSrc, denoDest1, denoDest2;if (platform === 'windows') {// Check both potential installation locations- const chocoPath = 'C:\\ProgramData\\chocolatey\\lib\\deno\\tools';+ const chocoPathTools = 'C:\\ProgramData\\chocolatey\\lib\\deno\\tools\\deno.exe';+ const chocoPathDirect = 'C:\\ProgramData\\chocolatey\\lib\\deno\\deno.exe';- if (await fs.exists(chocoPath)) {- denoSrc = chocoPath;+ if (await fs.exists(chocoPathTools)) {+ denoSrc = chocoPathTools;+ } else if (await fs.exists(chocoPathDirect)) {+ denoSrc = chocoPathDirect;} else {console.error('deno binary not found in expected locations');return;@@ -295,7 +298,7 @@ if (platform == 'windows') {// Setup FFMPEGif (!(await fs.exists(config.ffmpegRealname))) {- await $`${wgetPath} --tries=5 --retry-connrefused --waitretry=10 --secure-protocol=auto --no-check-certificate --show-progress ${config.windows.ffmpegUrl} -O ${config.windows.ffmpegName}.7z`+ await $`${wgetPath} --tries=10 --retry-connrefused --waitretry=10 --secure-protocol=auto --no-check-certificate --show-progress ${config.windows.ffmpegUrl} -O ${config.windows.ffmpegName}.7z`await $`'C:\\Program Files\\7-Zip\\7z.exe' x ${config.windows.ffmpegName}.7z`await $`mv ${config.windows.ffmpegName} ${config.ffmpegRealname}`await $`rm -rf ${config.windows.ffmpegName}.7z`diff --git a/screenpipe-app-tauri/src-tauri/Cargo.toml b/screenpipe-app-tauri/src-tauri/Cargo.tomlindex 3fc387fb4..f56562a16 100644--- a/screenpipe-app-tauri/src-tauri/Cargo.toml+++ b/screenpipe-app-tauri/src-tauri/Cargo.toml@@ -1,6 +1,6 @@[package]name = "screenpipe-app"-version = "0.3.6"+version = "0.3.7"description = ""authors = ["you"]license = ""diff --git a/screenpipe-app-tauri/src-tauri/capabilities/main.json b/screenpipe-app-tauri/src-tauri/capabilities/main.jsonindex b6f831ac9..bb0e8393f 100644--- a/screenpipe-app-tauri/src-tauri/capabilities/main.json+++ b/screenpipe-app-tauri/src-tauri/capabilities/main.json@@ -135,8 +135,20 @@}]},+ {+ "identifier": "shell:allow-spawn",+ "allow": [+ {+ "name": "screenpipe",+ "cmd": "screenpipe",+ "args": ["setup"],+ "sidecar": true+ }+ ]+ },"cli:default","shell:default",+ "shell:allow-spawn","dialog:default","updater:default","os:default",@@ -147,4 +159,4 @@"process:default","store:default"]-}\ No newline at end of file+}diff --git a/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json b/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.jsonindex 905fbb503..ec4c29e69 100644--- a/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json+++ b/screenpipe-app-tauri/src-tauri/gen/schemas/capabilities.json@@ -1 +1 @@-{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:event:allow-listen","core:event:default","process:allow-restart","process:allow-exit","notification:default","core:resources:default","core:menu:default","core:tray:default","shell:default","store:default","store:allow-create-store","store:allow-get","store:allow-set","store:allow-save","store:allow-load","shell:allow-open","fs:allow-watch","fs:allow-open","fs:default","fs:allow-read-file","fs:allow-read-dir","fs:allow-read","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-read-text-file","fs:allow-create","fs:allow-mkdir",{"identifier":"fs:scope","allow":[{"path":"$XDG_DATA_HOME","requireLiteralLeadingDot":false},{"path":"$XDG_DATA_HOME/**","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/*","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/*","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/**","requireLiteralLeadingDot":false},{"path":"$APPDATA/*","requireLiteralLeadingDot":false},{"path":"$APPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPCONFIG/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$HOME/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$APP/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/data/**","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/pipes/**","requireLiteralLeadingDot":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","purge","-y"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},"cli:default","shell:default","dialog:default","updater:default","os:default","os:allow-arch","os:allow-hostname","os:allow-os-type","core:path:default","process:default","store:default"]}}\ No newline at end of file+{"migrated":{"identifier":"migrated","description":"permissions that were migrated from v1","local":true,"windows":["main"],"permissions":["core:event:allow-listen","core:event:default","process:allow-restart","process:allow-exit","notification:default","core:resources:default","core:menu:default","core:tray:default","shell:default","store:default","store:allow-create-store","store:allow-get","store:allow-set","store:allow-save","store:allow-load","shell:allow-open","fs:allow-watch","fs:allow-open","fs:default","fs:allow-read-file","fs:allow-read-dir","fs:allow-read","fs:allow-write-file","fs:read-dirs","fs:allow-copy-file","fs:allow-exists","fs:allow-read-text-file","fs:allow-create","fs:allow-mkdir",{"identifier":"fs:scope","allow":[{"path":"$XDG_DATA_HOME","requireLiteralLeadingDot":false},{"path":"$XDG_DATA_HOME/**","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/*","requireLiteralLeadingDot":false},{"path":"$LOCALAPPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/*","requireLiteralLeadingDot":false},{"path":"$APPLOCALDATA/**","requireLiteralLeadingDot":false},{"path":"$APPDATA/*","requireLiteralLeadingDot":false},{"path":"$APPDATA/**","requireLiteralLeadingDot":false},{"path":"$APPCONFIG/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/*","requireLiteralLeadingDot":false},{"path":"$RESOURCE/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$HOME/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/*","requireLiteralLeadingDot":false},{"path":"$APP/*","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/data/**","requireLiteralLeadingDot":false},{"path":"$HOME/.screenpipe/pipes/**","requireLiteralLeadingDot":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["-c",{"validator":"\\S+"}],"cmd":"sh","name":"exec-sh","sidecar":false}]},{"identifier":"shell:allow-execute","allow":[{"args":["pipe","purge","-y"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},{"identifier":"shell:allow-spawn","allow":[{"args":["setup"],"cmd":"screenpipe","name":"screenpipe","sidecar":true}]},"cli:default","shell:default","shell:allow-spawn","dialog:default","updater:default","os:default","os:allow-arch","os:allow-hostname","os:allow-os-type","core:path:default","process:default","store:default"]}}\ No newline at end of filediff --git a/screenpipe-server/src/bin/screenpipe-server.rs b/screenpipe-server/src/bin/screenpipe-server.rsindex 52d707367..6d8f8eb1e 100644--- a/screenpipe-server/src/bin/screenpipe-server.rs+++ b/screenpipe-server/src/bin/screenpipe-server.rs@@ -12,8 +12,7 @@ use futures::{pin_mut, stream::FuturesUnordered, StreamExt};use highlightio::Highlight;use log::{debug, error, info};use screenpipe_audio::{- default_input_device, default_output_device, list_audio_devices, parse_audio_device,- AudioDevice, DeviceControl,+ default_input_device, default_output_device, list_audio_devices, parse_audio_device, vad_engine::SileroVad, whisper::WhisperModel, AudioDevice, DeviceControl};use screenpipe_core::find_ffmpeg_path;use screenpipe_server::{@@ -77,6 +76,18 @@ async fn main() -> anyhow::Result<()> {handle_pipe_command(subcommand, &pipe_manager).await?;return Ok(());}+ Command::Setup => {+ // this command just download models and stuff (useful to have specific step to display in UI)++ // ! should prob skip if deepgram?+ WhisperModel::new(&cli.audio_transcription_engine.into()).unwrap();+ // ! assuming silero is used+ SileroVad::new().await.unwrap();++ println!("screenpipe setup complete");+ // TODO: ffmpeg sidecar thing here+ return Ok(());+ }}}diff --git a/screenpipe-server/src/cli.rs b/screenpipe-server/src/cli.rsindex 984b93db3..5357faf53 100644--- a/screenpipe-server/src/cli.rs+++ b/screenpipe-server/src/cli.rs@@ -238,7 +238,8 @@ pub enum Command {#[command(subcommand)]subcommand: PipeCommand,},- // ... (other top-level commands if any)+ /// Setup screenpipe environment+ Setup,}