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
docs(sync): update README for Claude Code CLI and Clawdbot integration
Louis Beaumont10362e9f4ca0
diff --git a/packages/sync/README.md b/packages/sync/README.mdindex 9a0709008..9dbc1fd7c 100644--- a/packages/sync/README.md+++ b/packages/sync/README.md@@ -1,25 +1,23 @@-# screenpipe-sync+# @screenpipe/sync**Sync your Screenpipe data to remote AI agents.**-One-liner to permanently sync your screen memory to a remote server (e.g., [Clawdbot](https://github.com/moltinginstar/moltbot), any SSH server). Your AI agent can then query your full history via SQLite.--Also extracts structured daily summaries: todos, goals, decisions, and AI insights.+One-liner to sync daily summaries to a remote server (e.g., [Clawdbot](https://github.com/clawdbot/clawdbot)). Uses Claude Code CLI for AI-powered extraction.## Quick Start```bash-# One-liner - AI summary to stdout+# AI summary to stdoutbunx @screenpipe/sync# Save daily summaries locallybunx @screenpipe/sync --output ~/Documents/brain/context --git-# Sync raw SQLite database to remote (full history!)-bunx @screenpipe/sync --db --remote user@host:~/.screenpipe/+# Sync summaries to remote server+bunx @screenpipe/sync --output /tmp/summaries --remote user@host:~/screenpipe-pkm-# Full sync: DB + daily summary-bunx @screenpipe/sync --db -r clawdbot:~/.screenpipe && bunx @screenpipe/sync -o ~/context -g+# Persistent daemon (survives reboot)+bunx @screenpipe/sync --daemon --output /tmp/summaries --remote user@host:~/clawd/screenpipe-pkm```## What It Extracts@@ -37,28 +35,27 @@ bunx @screenpipe/sync --db -r clawdbot:~/.screenpipe && bunx @screenpipe/sync -o## Example Output```markdown-# Daily Context - 2026-01-29+# Daily Context - 2026-01-31> Analyzed 480 minutes of screen activity-## π± Apps Used+## Apps Used- **VS Code**: ~180 min- **Chrome**: ~120 min- **Slack**: ~60 min-## β Todos Extracted+## Todos Extracted- Fix authentication bug in login.ts- Review PR #234 for payment integration- Send weekly update to investors-## π― Goals Mentioned+## Goals Mentioned- Ship v2.9 by Friday- Reach 50% activation rate-## π‘ AI Insights-- Heavy context switching between Slack and VS Code (17 switches/hour)+## AI Insights+- Heavy context switching between Slack and VS Code- Deep focus block from 2-4pm on auth refactor-- Late session (after 10pm) - consider sleep impact```## Options@@ -69,79 +66,83 @@ bunx @screenpipe/sync --db -r clawdbot:~/.screenpipe && bunx @screenpipe/sync -o| `-h, --hours <n>` | Hours to analyze | 12 || `-g, --git` | Auto commit & push | false || `-r, --remote <host>` | Sync via SSH | - |+| `-d, --daemon` | Install persistent sync | false |+| `--interval <secs>` | Daemon interval | 3600 |+| `--stop` | Stop daemon | - || `--json` | JSON output | markdown || `-v, --verbose` | Debug output | false |-## Environment Variables+## AI Summarization++Uses [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) if available:```bash-# AI Provider (uses first available)-export ANTHROPIC_API_KEY="sk-..." # Claude (recommended)-export OPENAI_API_KEY="sk-..." # OpenAI fallback-export OLLAMA_URL="http://localhost:11434" # Local Ollama-export OLLAMA_MODEL="llama3.2" # Ollama model--# Screenpipe-export SCREENPIPE_URL="http://localhost:3030" # Default+# Install Claude Code CLI+npm install -g @anthropic-ai/claude-code++# Verify it works+claude --version```-**AI Priority:** Claude β OpenAI β Ollama β No AI (basic summary)+Falls back to structured extraction (no AI) if CLI not found.-## Use Cases+## Clawdbot Integration-### Daily Journaling+For daily digests via Telegram:++1. **Local Mac** syncs summaries hourly:```bash-# Run at end of day-bunx @screenpipe/sync --output ~/journal --hours 16+bunx @screenpipe/sync --daemon --output /tmp/summaries --remote clawdbot:~/clawd/screenpipe-pkm+```++2. **Clawdbot** has native cron that reads files and sends digest:+```bash+# Already configured - runs at 9pm PT+sudo docker exec moltbot-gateway node dist/index.js cron list```-### Sync to Remote AI Assistant+## Use Cases++### Daily Journaling```bash-# Sync context to Clawdbot/Moltbot instance-bunx @screenpipe/sync --output ~/brain/context --git-# Remote pulls via cron+bunx @screenpipe/sync --output ~/journal --hours 16```### Weekly Review Prep```bash-# Get full weekbunx @screenpipe/sync --hours 168 --json > week.json```-### Automated Daily Sync (cron)+### Daemon Mode (Recommended)```bash-# Add to crontab-0 22 * * * ANTHROPIC_API_KEY=sk-... bunx @screenpipe/sync -o ~/context -g+# Install persistent sync - survives reboot+bunx @screenpipe/sync --daemon -r user@host:~/screenpipe-pkm++# Check status+# macOS: cat /tmp/screenpipe-sync.log+# Linux: systemctl --user status screenpipe-sync.timer++# Stop daemon+bunx @screenpipe/sync --stop```## How It Works-### Summary Mode (default)1. **Query** - Fetches OCR data from local Screenpipe API2. **Dedupe** - Removes duplicate/similar screen captures-3. **Extract** - Claude analyzes content for structured data+3. **Extract** - Claude Code CLI analyzes for structured data4. **Format** - Outputs markdown or JSON-5. **Sync** - Optionally git pushes or SCPs to remote--### DB Sync Mode (`--db`)-1. **Copy** - Copies `~/.screenpipe/db.sqlite` (your full history)-2. **Sync** - Uses rsync/scp to transfer to remote-3. **Query** - Remote can query SQLite directly--```bash-# On remote, query your full history:-sqlite3 ~/.screenpipe/db.sqlite "SELECT text FROM ocr_text WHERE text LIKE '%meeting%' LIMIT 10;"-```+5. **Sync** - SCPs to remote server## Requirements- [Screenpipe](https://github.com/mediar-ai/screenpipe) running locally- [Bun](https://bun.sh) runtime-- Anthropic API key for AI extraction (optional but recommended)+- [Claude Code CLI](https://docs.anthropic.com/en/docs/claude-code) (optional, for AI extraction)## Privacy-All processing happens locally. Screen data never leaves your machine unless you explicitly sync to a remote.+All processing happens locally. Screen data never leaves your machine unless you explicitly sync summaries to a remote.## License