关于 screenpipe-cli
Screenpipe CLI 用于管理名为 pipes 的定时 AI 自动化,也可管理集成和发布 pipe。本技能介绍配置、运行、测试及排查 pipes 和连接的命令。
主要功能
- 01列出、启用、停用和运行 pipe
- 02从 GitHub 或本地路径安装 pipe
- 03查看 pipe 执行日志
- 04管理并测试服务连接
- 05将 pipe 发布到商店
适用场景
- 01安排重复运行的 AI 自动化
- 02测试 pipe 并查看日志
- 03配置或验证集成
- 04将 pipe 发布到商店
安装
复制下面的命令,在终端中运行。
npx skills add https:/ / github.com/ screenpipe/ screenpipe --skill screenpipe-cli安装后在 Claude Code 中输入/screenpipe-cli确认已加载。
详细介绍
Screenpipe CLI
使用 bun x screenpipe@latest 运行 CLI 命令。无需单独安装。
重要:始终在干净的临时目录中运行 bun x 命令,以避免 node_modules 冲突:
cd "$(mktemp -d)" && bun x screenpipe@latest <command>
Shell
- 所有平台 →
bash(在 Windows 上会自动使用捆绑的 git-portable bash)
管道管理
管道是基于 Markdown 的 AI 自动化任务,按计划运行。每个管道都位于 ~/.screenpipe/pipes/<name>/pipe.md。
命令
bun x screenpipe@latest pipe list # List all pipes (compact table)
bun x screenpipe@latest pipe enable <name> # Enable a pipe
bun x screenpipe@latest pipe disable <name> # Disable a pipe
bun x screenpipe@latest pipe run <name> # Run once immediately (for testing)
bun x screenpipe@latest pipe logs <name> # View execution logs
bun x screenpipe@latest pipe install <url-or-path> # Install from GitHub or local path
bun x screenpipe@latest pipe delete <name> # Delete a pipe
bun x screenpipe@latest pipe models list # View AI model presets
创建管道
创建 ~/.screenpipe/pipes/<name>/pipe.md,其中包含 YAML frontmatter 和提示词:
---
schedule: every 30m
enabled: true
preset: ["Primary", "Fallback"]
---
Your prompt instructions here. The AI agent executes this on schedule.
## What to do
1. Query screenpipe search API for recent activity
2. Process results
3. Output summary / send notification
计划语法:every 30m、every 1h、every day at 9am、every monday at 9am,或 cron:*/30 * * * *、0 9 * * *
配置字段:schedule、enabled(布尔值)、preset(字符串或数组,例如 "Oai" 或 ["Primary", "Fallback"])、history(布尔值——将上一次输出作为上下文)
每次执行前,Screenpipe 都会添加一个上下文标头,其中包含时间范围、时区、操作系统和 API URL。无需模板变量。
创建后:
bun x screenpipe@latest pipe install ~/.screenpipe/pipes/my-pipe
bun x screenpipe@latest pipe enable my-pipe
bun x screenpipe@latest pipe run my-pipe # terminal-only; in-app chat uses the workflow below
在应用内聊天中测试
Bash 中有意不提供云端 JWT。不要暴露或恢复它,也不要使用独立的 pipe run。请通过经过身份验证的桌面运行时进行测试:
api="${SCREENPIPE_LOCAL_API_URL:-http://localhost:3030}"
auth="Authorization: Bearer $SCREENPIPE_LOCAL_API_KEY"
curl -sS -X POST -H "$auth" "$api/pipes/my-pipe/run"
curl -sS -H "$auth" "$api/pipes/my-pipe/logs"
{"success":true} 表示运行已启动,并不表示运行成功。轮询以查找新的终端日志。只有在 success: true 后才进行绑定;否则报告其 stderr,并保持 Live View 不变。
编辑配置
直接编辑 ~/.screenpipe/pipes/<name>/pipe.md 中的 frontmatter,或使用 API:
curl -X POST http://localhost:3030/pipes/<name>/config \
-H "Content-Type: application/json" \
-d '{"config": {"schedule": "every 1h", "enabled": true}}'
规则
- 使用
pipe list(不要使用--json)——表格输出更精简 - 切勿转储完整的管道 JSON——可能超过 15MB
- 调试时先检查日志:
pipe logs <name> - 在应用内聊天之外,先使用
pipe run <name>,再等待计划运行;应用内聊天则使用上述经过身份验证的运行时
连接管理
通过 CLI 管理集成(Telegram、Slack、Discord、Email、Todoist、Teams)。
命令
bun x screenpipe@latest connection list # List all connections + status
bun x screenpipe@latest connection list --json # JSON output
bun x screenpipe@latest connection get <id> # Show status + non-secret settings
bun x screenpipe@latest connection get <id> --json # JSON output
bun x screenpipe@latest connection set <id> key=val # Save credentials
bun x screenpipe@latest connection test <id> # Test a connection
bun x screenpipe@latest connection remove <id> # Remove credentials
示例
# Set up Telegram
bun x screenpipe@latest connection set telegram bot_token=123456:ABC-DEF chat_id=5776185278
# Set up Slack webhook
bun x screenpipe@latest connection set slack webhook_url=https://hooks.slack.com/services/...
# Verify it works
bun x screenpipe@latest connection test telegram
# Check what's connected
bun x screenpipe@latest connection list
连接 ID:telegram、slack、discord、email、todoist、teams、google-calendar、openclaw
凭据存储在本地,connection get 不会打印凭据。
各集成的详细信息:不要根据此技能猜测 API 结构。运行 connection list 查看带有说明的本地端点。connection get <id> 只返回状态和非机密设置。
将管道发布到商店
screenpipe pipe publish <pipe-name>
读取 ~/.screenpipe/pipes/<pipe-name>/pipe.md,从 YAML frontmatter 中提取标题、描述、图标和类别,并发布到 screenpipe 管道商店。需要身份验证(SCREENPIPE_API_KEY 环境变量或 ~/.screenpipe/auth.json)。