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: add screenpipe-pipes skill for Pi pipe management via CLI
Louis Beaumont1821c6fbb702
diff --git a/apps/screenpipe-app-tauri/src-tauri/assets/skills/screenpipe-pipes/SKILL.md b/apps/screenpipe-app-tauri/src-tauri/assets/skills/screenpipe-pipes/SKILL.mdnew file mode 100644index 000000000..145b9159b--- /dev/null+++ b/apps/screenpipe-app-tauri/src-tauri/assets/skills/screenpipe-pipes/SKILL.md@@ -0,0 +1,164 @@+---+name: screenpipe-pipes+description: Manage screenpipe pipes — list, enable, disable, run, install, delete, view logs, and edit config. Use when the user asks about their pipes, automations, scheduled tasks, or wants to create/modify pipes.+---++# Screenpipe Pipe Management++Pipes are markdown-based automations that run on schedule or on-demand. Each pipe lives at `~/.screenpipe/pipes/<name>/pipe.md`.++## Shell: pick the right one for the OS++- **macOS/Linux** → `bash`+- **Windows** → `powershell`++## CLI Commands++The `screenpipe pipe` CLI is the preferred way to manage pipes. It outputs compact, human-readable tables.++### List all pipes++```bash+screenpipe pipe list+```++Output:+```+NAME ENABLED SCHEDULE LAST RUN+--------------------------------------------------------------+obsidian-sync running */30 * * * 2026-03-06 15:40+meeting-sync yes */10 * * * 2026-03-06 15:50+daily-logs no never+```++For full JSON (large output — avoid unless you need specific fields):+```bash+screenpipe pipe list --json+```++### Enable / Disable a pipe++```bash+screenpipe pipe enable <name>+screenpipe pipe disable <name>+```++### Run a pipe once immediately++```bash+screenpipe pipe run <name>+```++Returns stdout/stderr and success status.++### View pipe logs++```bash+screenpipe pipe logs <name>+```++Output:+```+2026-03-06 15:40:00 ✓ (12s)+2026-03-06 15:10:00 ✓ (8s)+2026-03-06 14:40:00 ✗ (3s) — connection refused+```++### Install a pipe++```bash+# From URL (GitHub raw or pipe store)+screenpipe pipe install https://github.com/user/repo/blob/main/pipe.md++# From local path+screenpipe pipe install /path/to/pipe.md+screenpipe pipe install ./my-pipe/+```++### Delete a pipe++```bash+screenpipe pipe delete <name>+```++### View AI model presets++```bash+screenpipe pipe models list+```++## Editing Pipe Config++Each pipe's config is in the YAML frontmatter of `~/.screenpipe/pipes/<name>/pipe.md`:++```yaml+---+schedule: every 30m+enabled: true+preset: Oai+history: true+---+```++### Config fields++| Field | Type | Description |+|-------|------|-------------|+| `schedule` | cron or shorthand | When to run: `*/10 * * * *`, `every 30m`, `every 2h`, `daily 9:00` |+| `enabled` | bool | Whether the pipe runs on schedule |+| `preset` | string | AI preset name (e.g., `Oai`, `Screenpipe`) — matches presets from Settings |+| `history` | bool | Whether to include previous execution output as context |++To update config, edit the frontmatter directly:++```bash+# Read current config+head -20 ~/.screenpipe/pipes/<name>/pipe.md++# Edit with sed (example: change schedule)+sed -i '' 's/^schedule:.*/schedule: every 1h/' ~/.screenpipe/pipes/<name>/pipe.md+```++Or use the API for programmatic config updates:++```bash+curl -X POST http://localhost:3030/pipes/<name>/config \+ -H "Content-Type: application/json" \+ -d '{"config": {"schedule": "every 1h", "enabled": true}}'+```++## Creating a New Pipe++Create a directory with a `pipe.md` file:++```bash+mkdir -p ~/.screenpipe/pipes/my-pipe+cat > ~/.screenpipe/pipes/my-pipe/pipe.md << 'PIPE'+---+schedule: every 1h+enabled: true+preset: Oai+---++Your task description here. The AI will execute this as instructions.++## What to do++1. Query screenpipe search API for recent activity+2. Process the results+3. Output a summary+PIPE+```++Then enable it:+```bash+screenpipe pipe enable my-pipe+```++## Rules++1. **Always use `screenpipe pipe list` (not `--json`)** to check pipe status — the table output is compact and sufficient.+2. **Never dump full pipe JSON** to the conversation — it can be 15MB+ and will exceed model limits.+3. **Edit pipe.md frontmatter** for config changes rather than using the API when possible — it's simpler and the file is the source of truth.+4. **Check logs first** when debugging a pipe: `screenpipe pipe logs <name>`.+5. **Use `screenpipe pipe run <name>`** to test changes immediately instead of waiting for the schedule.diff --git a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs b/apps/screenpipe-app-tauri/src-tauri/src/pi.rsindex a04d07898..c54d0bf57 100644--- a/apps/screenpipe-app-tauri/src-tauri/src/pi.rs+++ b/apps/screenpipe-app-tauri/src-tauri/src/pi.rs@@ -499,6 +499,10 @@ fn ensure_screenpipe_skill(project_dir: &str) -> Result<(), String> {"screenpipe-elements",include_str!("../assets/skills/screenpipe-elements/SKILL.md"),),+ (+ "screenpipe-pipes",+ include_str!("../assets/skills/screenpipe-pipes/SKILL.md"),+ ),];for (name, content) in skills {diff --git a/crates/screenpipe-core/assets/skills/screenpipe-pipes/SKILL.md b/crates/screenpipe-core/assets/skills/screenpipe-pipes/SKILL.mdnew file mode 100644index 000000000..145b9159b--- /dev/null+++ b/crates/screenpipe-core/assets/skills/screenpipe-pipes/SKILL.md@@ -0,0 +1,164 @@+---+name: screenpipe-pipes+description: Manage screenpipe pipes — list, enable, disable, run, install, delete, view logs, and edit config. Use when the user asks about their pipes, automations, scheduled tasks, or wants to create/modify pipes.+---++# Screenpipe Pipe Management++Pipes are markdown-based automations that run on schedule or on-demand. Each pipe lives at `~/.screenpipe/pipes/<name>/pipe.md`.++## Shell: pick the right one for the OS++- **macOS/Linux** → `bash`+- **Windows** → `powershell`++## CLI Commands++The `screenpipe pipe` CLI is the preferred way to manage pipes. It outputs compact, human-readable tables.++### List all pipes++```bash+screenpipe pipe list+```++Output:+```+NAME ENABLED SCHEDULE LAST RUN+--------------------------------------------------------------+obsidian-sync running */30 * * * 2026-03-06 15:40+meeting-sync yes */10 * * * 2026-03-06 15:50+daily-logs no never+```++For full JSON (large output — avoid unless you need specific fields):+```bash+screenpipe pipe list --json+```++### Enable / Disable a pipe++```bash+screenpipe pipe enable <name>+screenpipe pipe disable <name>+```++### Run a pipe once immediately++```bash+screenpipe pipe run <name>+```++Returns stdout/stderr and success status.++### View pipe logs++```bash+screenpipe pipe logs <name>+```++Output:+```+2026-03-06 15:40:00 ✓ (12s)+2026-03-06 15:10:00 ✓ (8s)+2026-03-06 14:40:00 ✗ (3s) — connection refused+```++### Install a pipe++```bash+# From URL (GitHub raw or pipe store)+screenpipe pipe install https://github.com/user/repo/blob/main/pipe.md++# From local path+screenpipe pipe install /path/to/pipe.md+screenpipe pipe install ./my-pipe/+```++### Delete a pipe++```bash+screenpipe pipe delete <name>+```++### View AI model presets++```bash+screenpipe pipe models list+```++## Editing Pipe Config++Each pipe's config is in the YAML frontmatter of `~/.screenpipe/pipes/<name>/pipe.md`:++```yaml+---+schedule: every 30m+enabled: true+preset: Oai+history: true+---+```++### Config fields++| Field | Type | Description |+|-------|------|-------------|+| `schedule` | cron or shorthand | When to run: `*/10 * * * *`, `every 30m`, `every 2h`, `daily 9:00` |+| `enabled` | bool | Whether the pipe runs on schedule |+| `preset` | string | AI preset name (e.g., `Oai`, `Screenpipe`) — matches presets from Settings |+| `history` | bool | Whether to include previous execution output as context |++To update config, edit the frontmatter directly:++```bash+# Read current config+head -20 ~/.screenpipe/pipes/<name>/pipe.md++# Edit with sed (example: change schedule)+sed -i '' 's/^schedule:.*/schedule: every 1h/' ~/.screenpipe/pipes/<name>/pipe.md+```++Or use the API for programmatic config updates:++```bash+curl -X POST http://localhost:3030/pipes/<name>/config \+ -H "Content-Type: application/json" \+ -d '{"config": {"schedule": "every 1h", "enabled": true}}'+```++## Creating a New Pipe++Create a directory with a `pipe.md` file:++```bash+mkdir -p ~/.screenpipe/pipes/my-pipe+cat > ~/.screenpipe/pipes/my-pipe/pipe.md << 'PIPE'+---+schedule: every 1h+enabled: true+preset: Oai+---++Your task description here. The AI will execute this as instructions.++## What to do++1. Query screenpipe search API for recent activity+2. Process the results+3. Output a summary+PIPE+```++Then enable it:+```bash+screenpipe pipe enable my-pipe+```++## Rules++1. **Always use `screenpipe pipe list` (not `--json`)** to check pipe status — the table output is compact and sufficient.+2. **Never dump full pipe JSON** to the conversation — it can be 15MB+ and will exceed model limits.+3. **Edit pipe.md frontmatter** for config changes rather than using the API when possible — it's simpler and the file is the source of truth.+4. **Check logs first** when debugging a pipe: `screenpipe pipe logs <name>`.+5. **Use `screenpipe pipe run <name>`** to test changes immediately instead of waiting for the schedule.diff --git a/crates/screenpipe-core/src/agents/pi.rs b/crates/screenpipe-core/src/agents/pi.rsindex a4d676cce..877a8c1fd 100644--- a/crates/screenpipe-core/src/agents/pi.rs+++ b/crates/screenpipe-core/src/agents/pi.rs@@ -117,6 +117,10 @@ impl PiExecutor {"screenpipe-elements",include_str!("../../assets/skills/screenpipe-elements/SKILL.md"),),+ (+ "screenpipe-pipes",+ include_str!("../../assets/skills/screenpipe-pipes/SKILL.md"),+ ),];for (name, content) in skills {@@ -193,6 +197,11 @@ impl PiExecutor {include_str!("../../assets/skills/screenpipe-elements/SKILL.md"),Box::new(|p: &PipePermissions| p.is_content_type_allowed("accessibility")),),+ (+ "screenpipe-pipes",+ include_str!("../../assets/skills/screenpipe-pipes/SKILL.md"),+ Box::new(|_| true), // always installed — pipe management is always available+ ),];for (name, content, should_install) in all_skills {