Skip to content

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

edit docs

Louis Beaumont5eed636c740d
diff --git a/content/docs/pages/docs/plugins.mdx b/content/docs/pages/docs/plugins.mdx
index 03d6cd82c..8e565fa0a 100644
--- a/content/docs/pages/docs/plugins.mdx
+++ b/content/docs/pages/docs/plugins.mdx
@@ -27,9 +27,9 @@ agents are quite dumb without context. screenpipe is the bridge between human co
- **rich APIs**:
- `pipe.input` for keyboard/mouse control
- `pipe.queryScreenpipe` for context
- - `pipe.streamTranscriptions` for audio transcription streaming
- - `pipe.streamVision` for OCR/Accessibility streaming
- `pipe.settings` for app settings
+ - experimental `pipe.streamTranscriptions` for audio transcription streaming (atm uses a lot of RAM, make sure to enable it in settings/CLI)
+ - experimental `pipe.streamVision` for OCR/Accessibility streaming (atm uses a lot of RAM)
- **sandboxed & cross-platform**: safe execution on all OS
- **real-time**: process screen & audio as it happens
- **cron jobs**: schedule your pipes to run at specific times, same API as Vercel
@@ -68,13 +68,13 @@ The fastest way to create a new pipe is using our CLI:
follow installation instructions & test your pipe locally
-then enable your pipe in screenpipe
-
```bash copy
-screenpipe pipe enable my-pipe
+bun dev
```
-the CLI will guide you through setting up your pipe
+you can deploy your pipe to your screenpipe app through the UI or using `screenpipe install <path>` and `screenpipe enable <id/folder of your pipe>`.
+
+when you're ready to deploy, send a PR to the [screenpipe repo](https://github.com/mediar-ai/screenpipe) to add your pipe to the store.
### available pipes
@@ -94,13 +94,4 @@ the CLI will guide you through setting up your pipe
to install a pipe from the store, just add the url of the folder in the UI and click install.
-in CLI:
-
-```bash copy
-screenpipe pipe download https://github.com/mediar-ai/screenpipe/tree/main/pipes/pipe-obsidian-time-logs
-screenpipe pipe enable pipe-obsidian-time-logs
-```
-
-
-
diff --git a/screenpipe-app-tauri/components/pipe-store.tsx b/screenpipe-app-tauri/components/pipe-store.tsx
index dca23e8da..df1832a49 100644
--- a/screenpipe-app-tauri/components/pipe-store.tsx
+++ b/screenpipe-app-tauri/components/pipe-store.tsx
@@ -16,6 +16,7 @@ import {
Puzzle,
X,
Loader2,
+ BanknoteIcon,
} from "lucide-react";
import { PipeConfigForm } from "./pipe-config-form";
import { useHealthCheck } from "@/lib/hooks/use-health-check";
@@ -268,6 +269,24 @@ const DEFAULT_PIPES = [
"identify-speakers",
];
+const checkSubscription = async (pipeId: string, userId: string) => {
+ try {
+ console.log("checking subscription for pipe:", pipeId, userId);
+ const { data, error } = await supabase
+ .from("subscriptions")
+ .select("*")
+ .eq("pipe_id", pipeId)
+ .eq("user_id", userId)
+ .single();
+
+ if (error) throw error;
+ return data;
+ } catch (error) {
+ console.error("failed to check subscription:", error);
+ return null;
+ }
+};
+
const PipeStore: React.FC = () => {
const [newRepoUrl, setNewRepoUrl] = useState("");
const [selectedPipe, setSelectedPipe] = useState<Pipe | null>(null);
@@ -531,7 +550,7 @@ const PipeStore: React.FC = () => {
);
if (freshPipe) {
console.log("freshPipe", freshPipe);
-
+
setSelectedPipe(freshPipe);
}
};
@@ -803,7 +822,7 @@ const PipeStore: React.FC = () => {
description: "The pipe configuration has been updated.",
});
- await setSelectedPipe({...selectedPipe, config: config});
+ await setSelectedPipe({ ...selectedPipe, config: config });
} catch (error) {
console.error("Failed to save config:", error);
toast({
@@ -1180,23 +1199,112 @@ const PipeStore: React.FC = () => {
</Tooltip>
</TooltipProvider>
)}
- <TooltipProvider>
- <Tooltip>
- <TooltipTrigger asChild>
- <Button
- onClick={() => handleDeletePipe(selectedPipe)}
- variant="outline"
- size="icon"
- className="h-8 w-8"
- >
- <Trash2 className="h-4 w-4" />
- </Button>
- </TooltipTrigger>
- <TooltipContent>
- <p>delete pipe</p>
- </TooltipContent>
- </Tooltip>
- </TooltipProvider>
+ <div className="flex items-center gap-2">
+ {user?.id &&
+ corePipes.find((cp) => cp.id === selectedPipe.id)
+ ?.paid && (
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ onClick={async () => {
+ try {
+ const sub = await checkSubscription(
+ selectedPipe.id,
+ user!.id!
+ );
+ if (!sub) {
+ toast({
+ title: "no active subscription found",
+ variant: "destructive",
+ });
+ return;
+ }
+
+ const res = await fetch(
+ "https://screenpi.pe/api/subscription-end",
+ {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ subscription_id: sub.id,
+ }),
+ }
+ );
+
+ if (!res.ok)
+ throw new Error(
+ "failed to end subscription"
+ );
+
+ // Remove the pipe completely
+ await fetch(
+ "http://localhost:3030/pipes/delete",
+ {
+ method: "POST",
+ headers: {
+ "Content-Type": "application/json",
+ },
+ body: JSON.stringify({
+ pipe_id: selectedPipe.id,
+ }),
+ }
+ );
+
+ toast({
+ title: "subscription ended",
+ description:
+ "access will continue for 30 days",
+ });
+
+ await reloadPipeConfig(selectedPipe);
+ } catch (error) {
+ console.error(
+ "failed to end subscription:",
+ error
+ );
+ toast({
+ title: "error ending subscription",
+ description:
+ "please try again or contact support",
+ variant: "destructive",
+ });
+ }
+ }}
+ variant="outline"
+ size="icon"
+ className="h-8 w-8"
+ >
+ <BanknoteIcon className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>end subscription</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ )}
+
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger asChild>
+ <Button
+ onClick={() => handleDeletePipe(selectedPipe)}
+ variant="outline"
+ size="icon"
+ className="h-8 w-8"
+ >
+ <Trash2 className="h-4 w-4" />
+ </Button>
+ </TooltipTrigger>
+ <TooltipContent>
+ <p>delete pipe</p>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ </div>
</div>
{corePipes.find((cp) => cp.id === selectedPipe.id)?.paid && (
@@ -1213,15 +1321,14 @@ const PipeStore: React.FC = () => {
</div>
</div>
- {selectedPipe.enabled &&
- (
- <div className="space-y-3 pt-4 border-t">
- <PipeConfigForm
- pipe={selectedPipe}
- onConfigSave={handleConfigSave}
- />
- </div>
- )}
+ {selectedPipe.enabled && (
+ <div className="space-y-3 pt-4 border-t">
+ <PipeConfigForm
+ pipe={selectedPipe}
+ onConfigSave={handleConfigSave}
+ />
+ </div>
+ )}
</div>
</div>
diff --git a/screenpipe-app-tauri/src-tauri/Cargo.lock b/screenpipe-app-tauri/src-tauri/Cargo.lock
index 94af6ed59..09e083b03 100755
--- a/screenpipe-app-tauri/src-tauri/Cargo.lock
+++ b/screenpipe-app-tauri/src-tauri/Cargo.lock
@@ -4966,7 +4966,7 @@ dependencies = [
[[package]]
name = "screenpipe-app"
-version = "0.24.2"
+version = "0.24.4"
dependencies = [
"anyhow",
"axum",