|
110
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 24992
drwxr-xr-x 66 lukas staff 2112 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 25768
drwxr-xr-x 68 lukas staff 2176 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 230328 6 May 20:42 1778089358286_m1.jpg
-rw-r--r-- 1 lukas staff 162589 6 May 20:42 1778089360293_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ open compact_monitor_1_1778089220643.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
110
|
|
109
|
QuickTime PlayerFileEditViewWindowHelp97% <48-z QuickTime PlayerFileEditViewWindowHelp97% <48-zshWed 6 May 20:43:52L881DOCKER1-rw-r--r--lukasstaff166491lukasstaff155839-rw-r--r---rw-r--r---rw-r--r---rw-r--r-lukasstaff162622lukasstaff189289lukasstaff227256lukasstaff162471lukasstaff159690-rw-r--r---W-r---=-rw-r--r---rw-r--r--lukasstaff228402lukasstaff162494lukasstaff228391lukasstaff162695lukasstaff228420-rw-r--r---rw-r--r---rw-r--r---rw-r--r---rw-r--r---rw-r--r---rw-r--r---rw-r--r---rw-r--r--lukasstaff162684lukasstaff228407lukasstaff162545lukasstaff228407lukasstaff162483lukasstaff228420lukasstaff1625361lukasstaff228372lukasstaff162683lukasstaff-rw-r--r---rw-r--r---rw-r--r---rw-r--r--lukasstaff2284121624941lukasstaff228380lukasstaff162606lukasstaff228380lukasstaff162611-rw-r--r---W-r---=-rW=re=r=--rw-r--r-1lukasstaff228353lukasstaff162480lukasstaff228332lukasstaff162502lukasstaff228372-rw-r--r---rw-r--r--lukasstaff162571lukasstaff2284161lukasstaff162636-rw-r--r---rw-r--r---rw-r--r---rw-r--r---rw-r--r---V=----lukasstaff228362lukasstaff162564lukasstaff228392lukasstaff162605lukasstaff2303281lukasstaff162589lukasstaff1038222-rw-r-1lukasstaff327159lukas@Lukas-Kovaliks-MacBook-Pro-Jiminnylukas@Lukas-Kovaliks-MacBook-Pro-JiminnyDEV (docker)₴82APP (-zsh)*3-zsh846May20:311778088699449_m2. jpg6May20:311778088699457_ml. jpg6May20:311778088702773_m2.jpg6May20:311778088703280_m1.jpg66May20:321778088745343_m1. jpgMay20:321778088745907_m2.jpg6May20:326May20:341778088767221_ml. jpg1778088862349_m1.jpg6 May20:341778088862922_m2. jpg6May20:341778088895443_m1.jpg6May20:341778088897069_m2.jpg6May20:351778088926328_m1.jpg6May20:351778088927793_m2.jpg6May20:351778088957089_m1.jpg6May20:351778088958635_m2. jpg6May20:361778088987860_m1.jpg6May20:361778088989374_m2.jpg6May20:361778089018527_m1.jpg6 May20:376 May20:371778089020270_m2-gipg1778089049194_m1.jpg6 May20:371778089050974_m2.jpg6 May20:386May20:381778089079866_m1. jpg1778089081721_m2.jpg6May20:381778089110848_ml.jpg6May20:381778089112768_m2. jpg6May20:391778089141520_m1.jpg6May20:391778089143498_m2. jpg6May20:391778089172629_m1.jpg6May20:391778089174323_m2.jpgMay20:401778089203288_m1.jpg6May20:401778089205370_m2.jpg6May20:401778089234520_m1.jpg6May20:401778089236266_m2.jpg6May20:411778089265485_m1.jpg6May20:411778089267383_m2. jpg6May20:411778089296562_m1.jpg6May20:411778089298295_m2. jpg6May20:421778089327270_m1.jpg66May20:421778089329081_m2.jpgMay20:421778089358286_m1.jpg6May20:421778089360293_m2.jpg6May20:40compact_monitor_1_1778089220643.mp46May20:40compact_monitor_2_1778089221749.mp4~/.screenpipe/data/data/2026-05-06 $ open~/.screenpipe/data/data/2026-05-06 $ Dcompact_monitor_1_1778089220643.mp4screenpipe*• ₴5-zsh...
|
iTerm2
|
NULL
|
NULL
|
109
|
|
108
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
02:01
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOLN M 43:50Actionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
108
|
|
107
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
02:01
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime PlayerFileEditViewWindowHelpA97% <4Wed 6 May 20:43:49compact_monitor_1_1778089220643.mp4 v-zshX3-zsh-rw-DEV (docker)-rw--rw-I-rw-i-rw-!-rW-I-rw-!-rw-I-rw--rw--rW-I-rw-!-rw-1DOCKER"SNAS_DATA/STARGET_DATE/"2»>"SLOG_FILE"RSYNC_DUR=SCC S(date +%s) - RSYNC_START ))COPIED_FILES=S(Ls "SNAS_DATA/STARGET_DATE* | wc -1 l tr -d * *)SRC_FILES-S(ls "SDATA_SRC" | wc -1 l tr -d * ')COPIED_SIZE-S(du -sh "SNAS_DATA/STARGET_DATE" | cut -f1)if [ "SCOPIED_FILES" -eq"SSRC_FILES" ]; thenprintf "\r%-36s / %dm%02ds(%s files, %s)\n* \*rsync STARGET_DATE/ + NAS" \"S(( RSYNC_DUR / 60 ))" "S(( RSYNC_DUR % 60 ))"\"SCOPIED_FILES" "SCOPIED_SIZE" | tee -a "SLOG_FILE"printf "\rAPP (-zsh)else-rw-i-rw-ifi%-365 x %s /%s files\n""rsync STARGET_DATE/ → NAS" "SCOPIED_FILES" "SSRC_FILES" I tee -a "SLOG_FILE"-rw-else-rw-iprintf "%-36s %s\n" "rsync STARGET_DATE/ → NAS" "skipped (no source dir)"-rw-1fi-rw--rw-lSUMMARY-ГW-TOTAL_ELAPSED=S(C S(date +%s) - SCRIPT_START ))-rw-DB_SIZE=S(du -sh "SNAS_DB" | cut -f1)-rw-Iecho-rw-i-rw-!109"Archive DB size:SDB_SIZE"10g"Total time:S(( TOTAL_ELAPSED / 60 ))MS(( TOTAL_ELAPSED % 60 ))s*-rw-i1og"Sync complete for STARGET_DATE"-rw-i109".ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $ 11-rw--rw-ltotaldrwxr-xr-x2 lukasstaff646 May20:22-ГW-drwx94 lukas-rw-istaff30086 May20:27-rw-1lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $ cd ..lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $cd ~/.screenpipe-rw-ilukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ 11-rw-ltotal-rw-i9424drwxr-xr-x8 lukasstaff256-rw-i6 May20:2702:00drwx---~--+94lukasstaff30086 May20:27-rw-| drwxr-xr-x5lukasstaff1606 Маy20:28data-rw-il-rw-r--r--lukasstaff5816326 May20:27-rw-l-rw-r--r--lukasstaff327686 May20:27db.sqlitelukasstaff331251220:28db.sqlite-shm-ГW--rw-r--r--16 May-rw-idrwxr-xr-x825620:27db.sqlite-wallukasstaff6 Maypipesluka:-rw-r--r--1lukasstaff95666 Мay20:28screenpipe.2026-05-06.0.10gLukakas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipeX4screenpipe• *5-zshX6»02:10...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
107
|
|
106
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
01:39
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime PlayerFileEditViewWindowHelpcompact_monitor_1_1778089220643.mp4 v-zshX3-zsh-rw-DEV (docker)-rw--rw-I-rw-i-rw-!-rW-I-rw-!-rw-I-rw--rw--rW-I-rw-!-rw-1DOCKER"SNAS_DATA/STARGET_DATE/"2»>"SLOG_FILE"RSYNC_DUR=SCC S(date +%s) - RSYNC_START ))COPIED_FILES=S(Ls "SNAS_DATA/STARGET_DATE* | wc -1 l tr -d * *)SRC_FILES-S(ls "SDATA_SRC" | wc -1 l tr -d * ')COPIED_SIZE-S(du -sh "SNAS_DATA/STARGET_DATE" | cut -f1)if [ "SCOPIED_FILES" -eq"SSRC_FILES" ]; thenprintf "\r%-36s / %dm%02ds(%s files, %s)\n* \*rsync STARGET_DATE/ + NAS" \"S(( RSYNC_DUR / 60 ))" "S(( RSYNC_DUR % 60 ))"\"SCOPIED_FILES" "SCOPIED_SIZE" | tee -a "SLOG_FILE"printf "\rAPP (-zsh)else-rw-i-rw-ifi%-365 x %s /%s files\n""rsync STARGET_DATE/ → NAS" "SCOPIED_FILES" "SSRC_FILES" I tee -a "SLOG_FILE"-rw-else-rw-iprintf "%-36s %s\n" "rsync STARGET_DATE/ → NAS" "skipped (no source dir)"-rw-1fi-rw--rw-lSUMMARY-rW-TOTAL_ELAPSED=S(C S(date +%s) - SCRIPT_START ))-rw-DB_SIZE=S(du -sh "SNAS_DB" | cut -f1)-rw-Iecho-rw-i-rw-!109"Archive DB size:SDB_SIZE"10g"Total time:S(( TOTAL_ELAPSED / 60 ))MS(( TOTAL_ELAPSED % 60 ))s*-rw-i1og"Sync complete for STARGET_DATE"-rw-i109".ukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $ 11-rw--rw-ltotaldrwxr-xr-x2 lukasstaff646 May20:22-rW-drwx94 lukas-rw-istaff30086 May20:27-rw-1lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipe $ cd ..lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $cd ~/.screenpipe-rw-ilukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ l1-rw-ltotal-rw-i9424drwxr-xr-x8 lukasstaff256-rw-i6 May20:2701:39drwx---~--+94lukasstaff30086 May20:27-rw-| drwxr-xr-x5lukasstaff1606 Маy20:28data-rw-il-rw-r--r--lukasstaff5816326 May20:27-rw-l-rw-r--r--lukasstaff327686 May20:27db.sqlitelukasstaff331251220:28db.sqlite-shm-rW--rw-r--r--16 May-rw-idrwxr-xr-x825620:27db.sqlite-wallukasstaff6 Maypipesluka:-rw-r--r--1lukasstaff95666 Мay20:28screenpipe.2026-05-06.0.10gLukakas@Lukas-Kovaliks-MacBook-Pro-Jiminny~/.screenpipeX4screenpipeA97% <4Wed 6 May 20:43:48X5-zshX6»02:10...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
106
|
|
105
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
01:27
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOLOSOEOEActionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
105
|
|
104
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:25
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOL43:44Actionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
104
|
|
103
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:24
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime Player•FileEditViewWindowHelp40compact_monitor_1_1778089220643.mp4 ~screenpipe"-zsh-rw--rw--rw--rw-i-rw-!-rW-I-rw-!-rw-I-rw--rw-l-rW--rw-!-rw-I-rw-i-rw--ГW--rw-i-rw-|-rw-i-rw-!-rW--rw--rw-I-rw-i-rw-l-rw-i-rw-I-rw--rw-l-rW-I-rw-!-rw-IDOCKERX1X2APP (-zsh)settingaudio chunk durationportaudio disabledvision disabledpause on DRM contentaudio enginevad enginedata directorydebug modetelemetryuse pii removaluse all monitorsignored windowsincluded windowscloud syncauto-destruct piddeepgram keyapi authencrypt secretsretention daysretention modelanguagesmonitorsaudio devicesDEV (docker)value30 seconds3030falsefalsefalseParakeetSilero/Users/lukas/.screenpipefalsetruetruetrue["Boosteroid"]disabled0not setenableddisabledmedia-only (keep transcripts)all languagesid: 1id: 2-rw-!-ГW--rw-MacBook Pro Microphone (input)System Audio (output)00:24-rw-are using local processing. alldata stays onyoucomputer.-rw--rw-lwarning: telemetry is enabled.only error-leveldata will be sent.to disable, use the --disable-telemetry flag.-rw-iluka!check latest changes here: https://github.com/screenpipe/screenpipe/releasesluka: 2026-05-06T20:27:34.6383847INFO screenpipe: starting UI event captureX4Gscreenpipe*97% <4Wed 6 May 20:43:431X1-zshX6X5Qu you‹ › x»02:10...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
103
|
|
102
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:34
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime PlayerFileEditViewWindowHelpAcompact_monitor_1_1778089220643.mp4 v-zshX3-rw--ГW--rw-r--r--rw--rw-r--r---rw-I-rw-r--r--rw-i-rw-r--r---rw-!-rw-r--r--DOCKERDEV (docker)APP (-zsh)lukasstaff20842417Apr 21:06lukasstaffscreenpipe.2026-04-17.0.10g6198318Apr 14:45screenpipe.2026-04-18.0.1og1lukasstaff35980020Apr18:52lukasstaff68367121Apr20:18screenpipe.2026-04-20.0.10gscreenpipe.2026-04-21.0.10g1 lukasstaff28476322Apr19:101lukasstaff1763862314:01screenpipe.2026-04-22.0.logstaffAprscreenpipe.2026-04-23.0.10g-rw-i-rw-r--r--lukas276189lukas22:35-rw-I-rw-r--r--staff24Aprscreenpipe.2026-04-24.0.1og6879425Apr19:40-rw--rw-r--r--1 lukasstaff7554326 Apr22:56screenpipe.2026-04-25.0.10gscreenpipe.2026-04-26.0.10g-rw--rw-r--r--1 lukasstaff60781127Apr20:42-ГW--rw-r--r--1lukasstaff39609428Aprscreenpipe.2026-04-27.0.1og22:23-rw-i-rwxr-xr-xe1 lukasstaff1499425screenpipe.2026-04-28.0.10gApr 18:50-rw-1-rw-r--r--®1 lukasstaffscreenpipe_sync.sh348236 May 18:58sync. log-rw-iukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh-rw-#!/bin/bash-rw-screenpipe_sync.sh-rw-Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).-rw-I# Also copies the day's video/frame data folder to the NAS.-rw--rw--ГW--rw--rw-iUsage:./screenpipe_sync.sh/screenpipe_sync.sh 2026-04-15./screenpipe_sync.sh today# syncs yesterday (default)# syncs a specific date#syncs today sofar-rw-i-rw-!Cron example (runs at 3am daily):0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh » /Users/lukas/.screenpipe/sync.log 2>&1-rw-iset -euo pipefail-rw--rw-CONFIG-rw--ГW-DB_SRC-"S(SCREENPIPE_DB: -SHOME/.screenpipe/db.sqlite}"NAS_MOUNT-"S-(NAS_MOUNT: -/Volumes/screenpipe}*-rw-i-rw-INAS_DB-"SNAS_MOUNT/archive.db"NAS_DATA-"SNAS_MOUNT/data"-rw-i-rw-iLOG_FILE="SHOME/.screenpipe/sync.log"-rW--rw-#HELPERS-rW-| SCRIPT_START-S(date +%s)-rw--rw-!logO {-ГW-local msg="[S(date '+%Y-%m-%d %H:XM:%5')] 5**-rw-iecho "Smsg"I tee -a "SLOG_FILE"luka:}Luka»00:33X4screenpipe*X597% <4Wed 6 May 20:43:40TX1-zshX602:10...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
102
|
|
101
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:33
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOLM43:40Actionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
101
|
|
100
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:21
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime Player•FileEditViewWindowHelp40compact_monitor_1_1778089220643.mp4 ~screenpipe"-zsh-rw--rw--rw--rw-i-rw-!-rW-I-rw-!-rw-I-rw--rw-l-rW--rw-!-rw-I-rw-i-rw--ГW--rw-i-rw-|-rw-i-rw-!-rW--rw--rw-I-rw-i-rw-l-rw-i-rw-I-rw--rw-l-rW-I-rw-!-rw-IDOCKERX1X2APP (-zsh)settingaudio chunk durationportaudio disabledvision disabledpause on DRM contentaudio enginevad enginedata directorydebug modetelemetryuse pii removaluse all monitorsignored windowsincluded windowscloud syncauto-destruct piddeepgram keyapi authencrypt secretsretention daysretention modelanguagesmonitorsaudio devicesDEV (docker)value30 seconds3030falsefalsefalseParakeetSilero/Users/lukas/.screenpipefalsetruetruetrue["Boosteroid"]disabled0not setenableddisabledmedia-only (keep transcripts)all languagesid: 1id: 2-rw-!-ГW--rw-MacBook Pro Microphone (input)System Audio (output)00:21-rw-are using local processing. alldata stays onyoucomputer.-rw--rw-lwarning: telemetry is enabled.only error-leveldata will be sent.to disable, use the --disable-telemetry flag.-rw-iluka!check latest changes here: https://github.com/screenpipe/screenpipe/releasesluka: 2026-05-06T20:27:34.6383847INFO screenpipe: starting UI event captureX4Gscreenpipe*97% <4Wed 6 May 20:43:391X1-zshX6X5Q- you‹ › x»02:10...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
100
|
|
99
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:21
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOLActionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
99
|
|
98
|
iTerm2
Shell
Edit
View
Session
Scripts
Profiles
Wi iTerm2
Shell
Edit
View
Session
Scripts
Profiles
Window
Help
Q
> 0
G
94% 142
8
Wed 6 May 20:27:39
screenpipe"
で81
DOCKER
api auth
encrypt
secrets
retention days
retention mode
DEV (docker)
#2.
APP (-zsh)
283
-zsh.
エ4
screenpipe*
885
-zsh
36
enabled
disabled
7
Q- you
<>X
media-only (keep transcripts)
languages
all languages
monitors
id: 1
id: 2
audio devices
MacBook Pro Microphone (input)
System Audio (output)
are using local processing. all
your data stays on your computer.
warning: telemetry is enabled. only error-level data will be sent.
to disable, use the --disable-telemetry flag.
check
latest changes here: https://github.com/screenpipe/screenpipe/releases
2026-05-0620:27:34.638384Z
INFO
screenpipe: starting UI event capture
2026-05-06720:27:34.6376792
INFO
screenpipe_core: :pipes:
pipe scheduler started (generation 2)
2026-05-06T20:27:34.649154Z
INFO
screenpipe_engine:: power: :manager:
initial
power profile: Performance
Con_ac=true, battery=Some(94))
2026-05-06120:27:34.6527942
WARN
screenpipe: pi
agent install failed: bun not found - install from https://bun.sh
2026-05-06120:27:34.6558392
INFO
screenpipe_engine: :ui_recorder: Starting UI event capture
2026-05-06T20:27:34.6738772
INFO
screenpipe_engine::ui_recorder: UI recording session started: 54869993-7b4b-491f-b717-2a583517f9c5
2026-05-06T20:27:34.673910Z
INFO
screenpipe_engine:: calendar_speaker_id: speaker identification: started (user_name=<not set>)
2026-05-0620:27:34.6740572
INFO
screenpipe_engine: hot_frame_cache: hot_frame_cache: warming from DB (2026-05-05 17:27:34.674056 UTC to 2026-05-06 17:27:34.674056 UTC
2026-05-06120:27:34.6748922
INFO
2026-05-06T20:27:34.675788Z
INFO
screenpipe_engine: meeting_detector: meeting v2: detection loop started (base_interval=5s, profiles=12)
2026-05-0620:27:34.686546Z
INFO
screenpipe_engine: hot_frame_cache: hot_frame_cache: warmed with 0 frame entries, coverage from 2026-05-05 17:27:34.674056 UTC
screenpipe_engine::server: Server listening on [IP_ADDRESS]:3030
2026-05-06120:27:34.6913712
INFO
screenpipe_connect: mdns: mdns: advertising screenpipe on port 3030
2026-05-06T20:27:36.270608Z
INFO
screenpipe_engine: vision_manager::manager: Starting vision recording
2026-05-06T20:27:36.270669Z
INFO
screenpipe_engine: :vision_manager::manager: Starting event-driven capture for
2026-05-06T20:27:36.270714Z
INFO
screenpipe_engine:: event_driven_capture: event-driven capture started for monitor 1 (device: monitor_1)
2026-05-0620:27:36.932583Z
INFO
screenpipe_engine: vision_manager: :manager: Starting vision recording for monitor 2 (3008×1253)
2026-05-06T20:27:36.9328527
INFO
screenpipe_engine:: vision_manager: managfr: Starting event-driven capture for monitor 2 (device: monitor_2)
2026-05-0620:27:36.9328827
INFO
screenpipe_engine:: vision_manager::manager: VisionManager started with 2/2 monitor(s)
2026-05-06120:27:36.9328992
INFO
screenpipe_engine:: vision_manager: monitor_watcher: Starting monitor watcher (event-driven via CGDisplayRegisterReconfigurationCallback, 60s bac
kstop poll)
2026-05-0620:27:36.932901Z
2026-05-06720:27:39.1582812
INFO
INFO
screenpipe_engine:: event_driven_capture: event-driven capture started for monitor 2 (device: monitor_2)
sck_rs:: stream_manager:
persistent SCK stream started for display 1 1440x900, 2fps, 3 excluded)
Analyse Image
rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:04
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
98
|
|
97
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:03
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOL432OSOEOEActionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
97
|
|
96
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:02
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime PlayerFileEditViewWindowHelpG97% <4Wed 6 May 20:43:32compact_monitor_1_1778089220643.mp4 vscreenpipe"1X1-rw--ГW--rw-i-rw-1-rw-i-rw-!-rW-I-rw-i-rw-i-rw--rw-l-rW--rw-!-rw-1DOCKERapi authencrypt secretsretention daysretention modeDEV (docker)X2APP (-zsh)X3-zshX4screenpipe*X5-zshX6enableddisabled7Qu you‹ › xmedia-only (keep transcripts)languagesall languagesmonitorsid: 1id: 2audio devicesMacBook Pro Microphone (input)System Audio (output)-rw--rw--rw-are using local processing. alldata staysyoucomputer.-rw-1-rw-i-rw-lwarning: telemetry is enabled.only error-leveldata will be sent.to disable, use the --disable-telemetry flag.-rW--rw-check latest changes here: https://github.com/screenpipe/screenpipe/releases-rw-I2026-05-06T20:27:34.638384ZINFOscreenpipe:starting UI event capture2026-05-06T20:27:34.6376792INFO-rw-iscreenpipe_core::pipes: pipe scheduler started (generation 2)2026-05-06T20:27:34.649154ZINFOscreenpipe_engine::power::manager:-rw-t2026-05-06T20:27:34.6527942WARN-rW-screenpipe: piinitial power profile: Performance (on_ac=true, battery=Some(94))agentinstall failed: bun not found - install from https://bun.sh2026-05-06T20:27:34.655839ZINFO-rw-iscreenpipe_engine::ui_recorder: Starting UI event capture2026-05-06T20:27:34.6738772-rw-IINFO2026-05-06T20:27:34673910ZINFOscreenpipe_engine::ui_recorder: UI recording session started: 54869993-7b4b-491f-b717-2a583517f9c5screenpipe_engine::calendar_speaker_id: speaker identification: started (user_name=<not set>)-rw-2026-05-06T20:27:346740572-rw-iINFOscreenpipe_engine::hot_frame_cache: hot_frame_cache: warming from DB (2026-05-05 17:27:34.674056 UTC to 2026-05-06 17:27:34.674056 UTC)-ГW-2026-05-06T20:27:34.674892ZINFOscreenpipe_engine::meeting_detector: meeting v2: detection loop started (base_interval-5s, profiles=12)2026-05-06T20:27:34..6757882INFO2026-05-06T20:27:34686546ZINFOscreenpipe_engine::hot_frame_cache: hot_frame_cache: warmed with 0 frame entries, coverage from 2026-05-05 17:27:34.674056 UTC-rw-i2026-05-06T20:27:34691371ZINFOscreenpipe_engine::server:Server listening on [IP_ADDRESS]:3030-rw-1screenpipe_connect: :mdns:mdns: advertisina screenpipe onDort 30302026-05-06T20:27:36-rw-!:270608ZINFOscreenpipe_engine::viston_1440x900)2026-05-06T20:27:36.270669Zscreenpipe_engine::viston• 1 (device: monitor_1)-ГW-2026-05-06120:27:36.2707142-rw-iscreenpipe_engine::event_d(device: monitor_1)2026-05-06T20:27:36.932583Zscreenpipe_engine::viston_(3008x1253)-rw-| 2026-05-06T20:27:36.932852Zscreenpipe_engine::vision_manager::managf: Starting event-driven capture for monitor 2 (device: monitor_2)- rw-i2026-05-06T20:27:36.932882Zscreenpipe_engine::vision_manager::manager: VisionManager started with 2/2 monitor(s)-rw-l2026-05-06T20:27:36.932899Zscreenpipe_engine::vision_manager::monitor_watcher: Starting monitor watcher (event-driven via CGDisplayRegisterReconfigurationCallback, 60s bac-ГW-kstop poll)-rw-!2026-05-06T20:27:36.932901Zluka: 2026-05-06T20:27:39.158281ZINFOscreenpipe_engine::event_driven_capture: event-driven capture started for monitor 2 (device: monitor_2)INFO sck_rs::stream_manager: persistent SCK stream started for display 1 (1440x900, 2fps, 3 excluded)luka...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
96
|
|
95
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:00
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOLW6MaY 20:43:30Actionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
95
|
|
94
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:00
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime PlayerFileEditViewWindowHelpA97% <4Wed 6 May 20:43:29compact_monitor_1_1778089220643.mp4 vscreenpipe"1X1-rw--ГW--rw-i-rw-1-rw-i-rw-!-rW-I-rw-i-rw-i-rw--rw-l-rW--rw-!-rw-1DOCKERapi authencrypt secretsretention daysretention modeDEV (docker)X2APP (-zsh)X3-zshX4screenpipe*X5-zshX6enableddisabled7Q- you‹ › xmedia-only (keep transcripts)languagesall languagesmonitorsid: 1id: 2audio devicesMacBook Pro Microphone (input)System Audio (output)-rw--rw--rw-are using local processing. alldata stayscomputer.-rw-1-rw-i-rw-lwarning: telemetry is enabled.only error-leveldata will be sent.to disable, use the --disable-telemetry flag.-rW--rw-check latest changes here: https://github.com/screenpipe/screenpipe/releases-rw-I2026-05-06T20:27:34.638384ZINFOscreenpipe:starting UI event capture2026-05-06T20:27:34.6376792INFO-rw-iscreenpipe_core::pipes: pipe scheduler started (generation 2)2026-05-06T20:27:34.649154ZINFOscreenpipe_engine::power::manager:-rw-t2026-05-06T20:27:34.6527942WARN-ГW-screenpipe: piinitial power profile: Performance (on_ac=true, battery=Some(94))install failed: bun not found - install from https://bun.sh2026-05-06T20:27:34.655839ZINFO-rw-iscreenpipe_engine::ui_recorder: Starting UI event capture2026-05-06T20:27:34.6738772-rw-IINFO2026-05-06T20:27:34673910ZINFOscreenpipe_engine::ui_recorder: UI recording session started: 54869993-7b4b-491f-b717-2a583517f9c5screenpipe_engine::calendar_speaker_id: speaker identification: started (user_name=<not set>)-rw-2026-05-06T20:27:346740572-rw-iINFOscreenpipe_engine::hot_frame_cache: hot_frame_cache: warming from DB (2026-05-05 17:27:34.674056 UTC to 2026-05-06 17:27:34.674056 UTC)-ГW-2026-05-06T20:27:34.674892ZINFOscreenpipe_engine::meeting_detector: meeting v2: detection loop started (base_interval-5s, profiles=12)2026-05-06T20:27:34.6757882INFO2026-05-06T20:27:34686546ZINFOscreenpipe_engine::hot_frame_cache: hot_frame_cache: warmed with 0 frame entries, coverage from 2026-05-05 17:27:34.674056 UTC-rw-i2026-05-06T20:27:34691371ZINFOscreenpipe_engine::server:Server listening on [IP_ADDRESS]:3030-rw-1screenpipe_connect: :mdns:mdns: advertisina screenpipe on port 30302026-05-06T20:27:36-rw-!:270608ZINFOscreenpipe_engine::viston_1440x900)2026-05-06T20:27:36.270669ZINFOscreenpipe_engine::viston-ГW-2026-05-06120:27:36.2707142INFO-rw-iscreenpipe_engine::event_d00:002026-05-06T20:27:36.932583ZINFOscreenpipe_engine::viston_-rw-| 2026-05-06T20:27:36.932852ZINFOscreenpipe_engine::vision_manager::managf: Starting event-driven capture for monitor 2 (device: monitor_2)- rw-i2026-05-06T20:27:36.932882Zscreenpipe_engine::vision_manager::manager: VisionManager started with 2/2 monitor(s)-rw-l2026-05-06T20:27:36.932899Zscreenpipe_engine::vision_manager::monitor_watcher: Starting monitor watcher (event-driven via CGDisplayRegisterReconfigurationCallback, 60s bac-ГW-kstop poll)-rw-!2026-05-06T20:27:36.932901Zluka: 2026-05-06T20:27:39.158281ZINFOscreenpipe_engine::event_driven_capture: event-driven capture started for monitor 2 (device: monitor_2)INFO sck_rs::stream_manager: persistent SCK stream started for display 1 (1440x900, 2fps, 3 excluded)luka...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
94
|
|
93
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:02
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
DMSAC.MILVAll 4DMsloastApp[no preview availablel11 | 10:00 AMIMonday. May 4th-7 Jira Cloud@ 15 Monday@Nikolay Ivanov transitioned aBug you are watching from Code...Wednesday, April 29thAneliva AngelovaWednesdayStoyan Tanev6 DMWednesdavнаша стоананTuesday. April 28th?1 Stefka StoyanovaApr 28thтия тикети е добре да влезнат вдругия спринт ли? сложете някакви...Ves@ Thread in DM: исках да те...смени го в Circle Cl env на новиятокен който си напларилApr 28thStefka Stoyano… Replied Apr 28thAOMIпnuaтна oтлуска СStetka Stovanova and …... Aor 28thl•• 0‹→ сN& Adelina Petrova "Pull requests • screenpipe/screenpipe • GitHubMessagesLo Add canvasUr Files# Hostinger login | Sign in to Hostinger accountне, само стр се тракватLogin - Nginx Proxy ManagerLukas Kovalik IN 1:15 PM* Screenpipe - ArchiveAdelina Petrova "T 1:42 PMpagesLukas Kovalik "T 1:43 PMЯСНО@ SQLite Web: archive.db©SQLite Web: db.sqliteAdelina Petrova 5:06 PMда не ои проолема да е заради това кю: QUEUE,DELAYANew TabLukas Kovalik * 5:06 PMscreenpipe/,claude/skills at main • screenpipe/screenpза това искам да дооавя логовеAdelina Petrova 5:07 PMUAVDA MO CTAUG SUA rA MaVUOLI?има ли риск за нещоLukas Kovalik " 5:08 PMвсишност нама опашка тукаAdelina Petrova " 5:12 PM• сега, няма ли ла сложи евента в това кю и ла цака изпьл.Lukas Kovalik *T 5:21 PMла, ше оставя detault изпь лнениеLukas Kovalik 1K 5-26 PMпо поинцип го направих като nudge-created че те не са о!•и глелам че и този event няма никойAdelina Petrova" 5:33PMспорел мен пробвай без това кюLukas Kovalik * 5:33 PMhttps://run.userpilot.io/events/tracked_event/10run.userpilot.ioUserpilotUserpilot helos product teams deliver personalized in-appgrowth metrics at every stage of the user lournev.не е това обаче, гледам че всички си минават през сьщиAdelina Petrova * 5:40 PMами эко можеш сложи тогава лог да го видимAdelina Petrova has paused their notificationsMessage Adelina Petrova " VacationingAaO Not Secure http:/[IP_ADDRESS]:8768/audio_transcriptions_fts_idx/audio_tagsaualo transcriptionsaudio_transcriptions_fts (v)audio_transcriptions_audio_transcriptions_.audio_transcriptions_...elementselements_fts (v)elements_fts_configelements_fts_dataelements_fts_idxframesframes_fts (")frames_fts_configframes_fts_dataframes_fts_idxmeetingsmemoriesmemories_fts (v)memories_fts_configmemories_fts_datamemories_fts_idxocr_textpipe_executionspipe_scheduler_statesecretsspeaker_embeddingsspeakerssqlite_sequencesqlite_statlsalite_statatagsui_eventsui_events_fts (v)ui_events_fts_configui_events_fts_dataui_events_fts_idxvideo_chunksvision_tagsCREATE TABLE 'audio_transcriptions_fts_idx' (segid,term,PRIMARY KEY(segid, term)ColumnsColumnData typesegidpgnoIndexesNameColumnsSQLite database browser v0.7.2, powered by Flask and Peewee. © 2026 Charles LeiferToggle helper tablesAllow nullUniquePrimary keySOLW6MaY 20:43:27OSOEOEActionsread-onlyread-onlyread-onlyDrop?...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
93
|
|
92
|
rewind
play/pause
fast forward
More Controls
toggl rewind
play/pause
fast forward
More Controls
toggle full screen
show external playback menu
show external playback menu
show media selection menu
toggle picture-in-picture playback
show action menu
share
show chapter menu
zoom
zoom
playback speed
00:36
toggle elapsed time, timecode and framecount
02:10
toggle duration and remaining time
document actions
compact_monitor_1_1778089220643.mp4
QuickTime PlayerFileEditViewWindowHelpAcompact_monitor_1_1778089220643.mp4 v-zsh-rw--ГW--rw-r--r--rw--rw-r--r---rw-I-rw-r--r--rw-i-rw-r--r---rw-!-rw-r--r--DOCKERDEV (docker)APP (-zsh)X3lukasstaff20842417Apr 21:06lukasstaffscreenpipe.2026-04-17.0.10g6198318Apr 14:45screenpipe.2026-04-18.0.1og1lukasstaff35980020Apr18:52lukasstaff68367121Apr20:18screenpipe.2026-04-20.0.10gscreenpipe.2026-04-21.0.10g1 lukasstaff28476322Apr19:101lukasstaff1763862314:01screenpipe.2026-04-22.0.logstaffAprscreenpipe.2026-04-23.0.10g-rw-i-rw-r--r--lukas276189lukas22:35-rw-I-rw-r--r--staff24Aprscreenpipe.2026-04-24.0.1og6879425Apr19:40-rw--rw-r--r--1 lukasstaff7554326 Apr22:56screenpipe.2026-04-25.0.10gscreenpipe.2026-04-26.0.10g-rw--rw-r--r--1 lukasstaff60781127Apr20:42-ГW--rw-r--r--1lukasstaff39609428Aprscreenpipe.2026-04-27.0.1og22:23-rw-i-rwxr-xr-xe1 lukasstaff1499425screenpipe.2026-04-28.0.10gApr 18:50-rw-1-rw-r--r--®1 lukasstaffscreenpipe_sync.sh348236 May 18:58sync. log-rw-iukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh-rw-#!/bin/bash-rw-screenpipe_sync.sh-rw-Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).-rw-I# Also copies the day's video/frame data folder to the NAS.-rw--rw--ГW--rw--rw-iUsage:./screenpipe_sync.sh/screenpipe_sync.sh 2026-04-15./screenpipe_sync.sh today# syncs yesterday (default)# syncs a specific date#syncs today sofar-rw-i-rw-!Cron example (runs at 3am daily):0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh » /Users/lukas/.screenpipe/sync.log 2>&1-rw-iset -euo pipefail-rw--rw-CONFIG-rw--ГW-DB_SRC-"S(SCREENPIPE_DB: -SHOME/.screenpipe/db.sqlite}"NAS_MOUNT-"S-(NAS_MOUNT: -/Volumes/screenpipe}*-rw-i-rw-INAS_DB-"SNAS_MOUNT/archive.db"NAS_DATA-"SNAS_MOUNT/data"-rw-i-rw-iLOG_FILE="SHOME/.screenpipe/sync.log"-rW--rw-#HELPERS-rW-| SCRIPT_START-S(date +%s)-rw--rw-!logO {-ГW-local msg="[S(date '+%Y-%m-%d %H:XM:%5')] 5**-rw-iecho "Smsg"I tee -a "SLOG_FILE"luka:}Luka00:36X4screenpipe*X597% <4Wed 6 May 20:43:25TX1-zshX602:10...
|
QuickTime Player
|
compact_monitor_1_1778089220643.mp4
|
NULL
|
92
|
|
91
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 24992
drwxr-xr-x 66 lukas staff 2112 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 25768
drwxr-xr-x 68 lukas staff 2176 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 230328 6 May 20:42 1778089358286_m1.jpg
-rw-r--r-- 1 lukas staff 162589 6 May 20:42 1778089360293_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
91
|
|
90
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 24992
drwxr-xr-x 66 lukas staff 2112 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 25768
drwxr-xr-x 68 lukas staff 2176 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 230328 6 May 20:42 1778089358286_m1.jpg
-rw-r--r-- 1 lukas staff 162589 6 May 20:42 1778089360293_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
90
|
|
89
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 24992
drwxr-xr-x 66 lukas staff 2112 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
89
|
|
88
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 24992
drwxr-xr-x 66 lukas staff 2112 6 May 20:42 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
-rw-r--r-- 1 lukas staff 228402 6 May 20:34 1778088862349_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:34 1778088862922_m2.jpg
-rw-r--r-- 1 lukas staff 228391 6 May 20:34 1778088895443_m1.jpg
-rw-r--r-- 1 lukas staff 162695 6 May 20:34 1778088897069_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:35 1778088926328_m1.jpg
-rw-r--r-- 1 lukas staff 162684 6 May 20:35 1778088927793_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:35 1778088957089_m1.jpg
-rw-r--r-- 1 lukas staff 162545 6 May 20:35 1778088958635_m2.jpg
-rw-r--r-- 1 lukas staff 228407 6 May 20:36 1778088987860_m1.jpg
-rw-r--r-- 1 lukas staff 162483 6 May 20:36 1778088989374_m2.jpg
-rw-r--r-- 1 lukas staff 228420 6 May 20:36 1778089018527_m1.jpg
-rw-r--r-- 1 lukas staff 162536 6 May 20:37 1778089020270_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:37 1778089049194_m1.jpg
-rw-r--r-- 1 lukas staff 162683 6 May 20:37 1778089050974_m2.jpg
-rw-r--r-- 1 lukas staff 228412 6 May 20:38 1778089079866_m1.jpg
-rw-r--r-- 1 lukas staff 162494 6 May 20:38 1778089081721_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:38 1778089110848_m1.jpg
-rw-r--r-- 1 lukas staff 162606 6 May 20:38 1778089112768_m2.jpg
-rw-r--r-- 1 lukas staff 228380 6 May 20:39 1778089141520_m1.jpg
-rw-r--r-- 1 lukas staff 162611 6 May 20:39 1778089143498_m2.jpg
-rw-r--r-- 1 lukas staff 228353 6 May 20:39 1778089172629_m1.jpg
-rw-r--r-- 1 lukas staff 162480 6 May 20:39 1778089174323_m2.jpg
-rw-r--r-- 1 lukas staff 228332 6 May 20:40 1778089203288_m1.jpg
-rw-r--r-- 1 lukas staff 162502 6 May 20:40 1778089205370_m2.jpg
-rw-r--r-- 1 lukas staff 228372 6 May 20:40 1778089234520_m1.jpg
-rw-r--r-- 1 lukas staff 162571 6 May 20:40 1778089236266_m2.jpg
-rw-r--r-- 1 lukas staff 228416 6 May 20:41 1778089265485_m1.jpg
-rw-r--r-- 1 lukas staff 162636 6 May 20:41 1778089267383_m2.jpg
-rw-r--r-- 1 lukas staff 228362 6 May 20:41 1778089296562_m1.jpg
-rw-r--r-- 1 lukas staff 162564 6 May 20:41 1778089298295_m2.jpg
-rw-r--r-- 1 lukas staff 228392 6 May 20:42 1778089327270_m1.jpg
-rw-r--r-- 1 lukas staff 162605 6 May 20:42 1778089329081_m2.jpg
-rw-r--r-- 1 lukas staff 1038222 6 May 20:40 compact_monitor_1_1778089220643.mp4
-rw-r--r-- 1 lukas staff 327159 6 May 20:40 compact_monitor_2_1778089221749.mp4
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
88
|
|
87
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
87
|
|
86
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
86
|
|
85
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
85
|
|
84
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
84
|
|
83
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
83
|
|
82
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
82
|
|
81
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
81
|
|
80
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
80
|
|
79
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
79
|
|
78
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
78
|
|
77
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
77
|
|
76
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
76
|
|
75
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
75
|
|
74
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
74
|
|
73
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
73
|
|
72
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
72
|
|
71
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
71
|
|
70
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
70
|
|
69
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
69
|
|
68
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
68
|
|
67
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
67
|
|
66
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
66
|
|
65
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
65
|
|
64
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
64
|
|
63
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
63
|
|
62
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
62
|
|
61
|
Last login: Mon Apr 27 19:05:19 on ttys022
Poetry Last login: Mon Apr 27 19:05:19 on ttys022
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
Poetry could not find a pyproject.toml file in /Users/lukas or its parents
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe
17G /Users/lukas/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ du -sh ~/.screenpipe/*
4.0K /Users/lukas/.screenpipe/config.json
6.7G /Users/lukas/.screenpipe/data
11G /Users/lukas/.screenpipe/db.sqlite
32K /Users/lukas/.screenpipe/db.sqlite-shm
0B /Users/lukas/.screenpipe/db.sqlite-wal
36K /Users/lukas/.screenpipe/pipes
132K /Users/lukas/.screenpipe/screenpipe.2026-04-09.0.log
96K /Users/lukas/.screenpipe/screenpipe.2026-04-11.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-12.0.log
72K /Users/lukas/.screenpipe/screenpipe.2026-04-13.0.log
160K /Users/lukas/.screenpipe/screenpipe.2026-04-14.0.log
172K /Users/lukas/.screenpipe/screenpipe.2026-04-15.0.log
196K /Users/lukas/.screenpipe/screenpipe.2026-04-16.0.log
204K /Users/lukas/.screenpipe/screenpipe.2026-04-17.0.log
64K /Users/lukas/.screenpipe/screenpipe.2026-04-18.0.log
352K /Users/lukas/.screenpipe/screenpipe.2026-04-20.0.log
668K /Users/lukas/.screenpipe/screenpipe.2026-04-21.0.log
280K /Users/lukas/.screenpipe/screenpipe.2026-04-22.0.log
176K /Users/lukas/.screenpipe/screenpipe.2026-04-23.0.log
272K /Users/lukas/.screenpipe/screenpipe.2026-04-24.0.log
68K /Users/lukas/.screenpipe/screenpipe.2026-04-25.0.log
76K /Users/lukas/.screenpipe/screenpipe.2026-04-26.0.log
596K /Users/lukas/.screenpipe/screenpipe.2026-04-27.0.log
388K /Users/lukas/.screenpipe/screenpipe.2026-04-28.0.log
16K /Users/lukas/.screenpipe/screenpipe_sync.sh
36K /Users/lukas/.screenpipe/sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 22520352
drwxr-xr-x 30 lukas staff 960 28 Apr 09:18 .
drwx------+ 93 lukas staff 2976 6 May 19:02 ..
-rw-r--r--@ 1 lukas staff 8196 26 Apr 17:14 .DS_Store
drwxr-xr-x 3 lukas staff 96 26 Apr 19:23 .claude
-rw-r--r-- 1 lukas staff 358 16 Apr 16:49 config.json
drwxr-xr-x 167 lukas staff 5344 18 Apr 14:45 data
-rw-r--r--@ 1 lukas staff 11526176768 6 May 18:58 db.sqlite
-rw-r--r--@ 1 lukas staff 32768 6 May 18:58 db.sqlite-shm
-rw-r--r--@ 1 lukas staff 0 6 May 18:58 db.sqlite-wal
drwxr-xr-x 9 lukas staff 288 15 Apr 14:53 pipes
-rw-r--r-- 1 lukas staff 132736 9 Apr 21:27 screenpipe.2026-04-09.0.log
-rw-r--r-- 1 lukas staff 95425 11 Apr 23:14 screenpipe.2026-04-11.0.log
-rw-r--r-- 1 lukas staff 72332 12 Apr 23:55 screenpipe.2026-04-12.0.log
-rw-r--r-- 1 lukas staff 71555 13 Apr 19:50 screenpipe.2026-04-13.0.log
-rw-r--r-- 1 lukas staff 162389 14 Apr 19:31 screenpipe.2026-04-14.0.log
-rw-r--r-- 1 lukas staff 175763 15 Apr 18:55 screenpipe.2026-04-15.0.log
-rw-r--r-- 1 lukas staff 196994 16 Apr 20:33 screenpipe.2026-04-16.0.log
-rw-r--r-- 1 lukas staff 208424 17 Apr 21:06 screenpipe.2026-04-17.0.log
-rw-r--r-- 1 lukas staff 61983 18 Apr 14:45 screenpipe.2026-04-18.0.log
-rw-r--r-- 1 lukas staff 359800 20 Apr 18:52 screenpipe.2026-04-20.0.log
-rw-r--r-- 1 lukas staff 683671 21 Apr 20:18 screenpipe.2026-04-21.0.log
-rw-r--r-- 1 lukas staff 284763 22 Apr 19:10 screenpipe.2026-04-22.0.log
-rw-r--r-- 1 lukas staff 176386 23 Apr 14:01 screenpipe.2026-04-23.0.log
-rw-r--r-- 1 lukas staff 276189 24 Apr 22:35 screenpipe.2026-04-24.0.log
-rw-r--r-- 1 lukas staff 68794 25 Apr 19:40 screenpipe.2026-04-25.0.log
-rw-r--r-- 1 lukas staff 75543 26 Apr 22:56 screenpipe.2026-04-26.0.log
-rw-r--r-- 1 lukas staff 607811 27 Apr 20:42 screenpipe.2026-04-27.0.log
-rw-r--r-- 1 lukas staff 396094 28 Apr 22:23 screenpipe.2026-04-28.0.log
-rwxr-xr-x@ 1 lukas staff 14994 25 Apr 18:50 screenpipe_sync.sh
-rw-r--r--@ 1 lukas staff 34823 6 May 18:58 sync.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cat screenpipe_sync.sh
#!/bin/bash
# screenpipe_sync.sh
# Syncs Screenpipe SQLite data to a NAS archive database (append-only, no deletions).
# Also copies the day's video/frame data folder to the NAS.
#
# Usage:
# ./screenpipe_sync.sh # syncs yesterday (default)
# ./screenpipe_sync.sh 2026-04-15 # syncs a specific date
# ./screenpipe_sync.sh today # syncs today so far
#
# Cron example (runs at 3am daily):
# 0 3 * * * /Users/lukas/.screenpipe/screenpipe_sync.sh >> /Users/lukas/.screenpipe/sync.log 2>&1
set -euo pipefail
# ─── CONFIG ───────────────────────────────────────────────────────────────────
DB_SRC="${SCREENPIPE_DB:-$HOME/.screenpipe/db.sqlite}"
NAS_MOUNT="${NAS_MOUNT:-/Volumes/screenpipe}"
NAS_DB="$NAS_MOUNT/archive.db"
NAS_DATA="$NAS_MOUNT/data"
LOG_FILE="$HOME/.screenpipe/sync.log"
# ──────────────────────────────────────────────────────────────────────────────
# ─── HELPERS ──────────────────────────────────────────────────────────────────
SCRIPT_START=$(date +%s)
log() {
local msg="[$(date '+%Y-%m-%d %H:%M:%S')] $*"
echo "$msg" | tee -a "$LOG_FILE"
}
step() {
local now=$(date +%s)
local elapsed=$(( now - SCRIPT_START ))
local min=$(( elapsed / 60 ))
local sec=$(( elapsed % 60 ))
printf "\n[+%02dm%02ds] ▶ %s\n" "$min" "$sec" "$*" | tee -a "$LOG_FILE"
}
run_sqlite_heredoc() {
local label="$1"
local sql="$2"
local start=$(date +%s)
printf " %-36s " "$label"
sqlite3 "$DB_SRC" <<< "$sql" &
local pid=$!
local spin=[PASSWORD] '⠙' '⠹' '⠸' '⠼' '⠴' '⠦' '⠧' '⠇' '⠏')
local i=0
while kill -0 "$pid" 2>/dev/null; do
printf "\r %-36s %s " "$label" "${spin[$i]}"
i=$(( (i + 1) % 10 ))
sleep 0.2
done
wait "$pid"
local rc=$?
if [ $rc -ne 0 ]; then
printf "\r %-36s ✗ FAILED\n" "$label" | tee -a "$LOG_FILE"
exit $rc
fi
local dur=$(( $(date +%s) - start ))
printf "\r %-36s ✓ %dm%02ds\n" "$label" "$(( dur / 60 ))" "$(( dur % 60 ))" | tee -a "$LOG_FILE"
}
check() {
local label="$1" got="$2" expected="$3"
if [ "$got" -eq "$expected" ]; then
printf " %-20s %s / %s ✓\n" "$label:" "$got" "$expected"
else
printf " %-20s %s / %s ✗ MISMATCH\n" "$label:" "$got" "$expected"
fi
}
# ──────────────────────────────────────────────────────────────────────────────
# ─── DATE ARGUMENT ────────────────────────────────────────────────────────────
if [ "${1:-}" = "today" ]; then
TARGET_DATE=$(date +%Y-%m-%d)
elif [ -n "${1:-}" ]; then
TARGET_DATE="$1"
if ! [[ "$TARGET_DATE" =~ ^[0-9]{4}-[0-9]{2}-[0-9]{2}$ ]]; then
echo "ERROR: Invalid date format. Use YYYY-MM-DD, 'today', or no argument for yesterday."
exit 1
fi
else
TARGET_DATE=$(date -v-1d +%Y-%m-%d)
fi
log "========================================"
log "Screenpipe sync starting for: $TARGET_DATE"
log "========================================"
# ─── PREFLIGHT ────────────────────────────────────────────────────────────────
step "Preflight checks"
if [ ! -f "$DB_SRC" ]; then
log "ERROR: Source DB not found at $DB_SRC"; exit 1
fi
printf " %-20s %s (%s)\n" "Source DB:" "OK" "$(du -sh "$DB_SRC" | cut -f1)"
if [ ! -d "$NAS_MOUNT" ]; then
log "ERROR: NAS not mounted at $NAS_MOUNT"; exit 1
fi
printf " %-20s %s\n" "NAS mount:" "OK $NAS_MOUNT"
# Check if DB already synced for this date
DB_ALREADY_SYNCED=false
if [ -f "$NAS_DB" ]; then
EXISTING=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';" 2>/dev/null || echo "0")
if [ "$EXISTING" -gt "0" ]; then
log "Date $TARGET_DATE already has $EXISTING frames in archive — skipping DB sync"
DB_ALREADY_SYNCED=true
else
printf " %-20s %s (%s)\n" "Archive DB:" "exists" "$(du -sh "$NAS_DB" | cut -f1)"
fi
else
printf " %-20s %s\n" "Archive DB:" "will be created"
fi
# Source data dir for this date
DATA_SRC="$HOME/.screenpipe/data/data/$TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
DATA_SIZE=$(du -sh "$DATA_SRC" | cut -f1)
DATA_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
printf " %-20s %s (%s files, %s)\n" "Data dir:" "OK" "$DATA_FILES" "$DATA_SIZE"
else
printf " %-20s %s\n" "Data dir:" "not found — skipping file copy"
fi
# ─── DB SYNC ──────────────────────────────────────────────────────────────────
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── COUNT SOURCE ROWS ────────────────────────────────────────────────────
step "Counting source rows for $TARGET_DATE"
SRC_FRAMES=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
SRC_ELEMENTS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_UI=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
SRC_OCR=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
SRC_MEETINGS=$(sqlite3 "$DB_SRC" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start) = '$TARGET_DATE';")
printf " %-20s %s\n" "frames:" "$SRC_FRAMES"
printf " %-20s %s\n" "elements:" "$SRC_ELEMENTS"
printf " %-20s %s\n" "ui_events:" "$SRC_UI"
printf " %-20s %s\n" "ocr_text:" "$SRC_OCR"
printf " %-20s %s\n" "meetings:" "$SRC_MEETINGS"
if [ "$SRC_FRAMES" -eq "0" ]; then
log "No frames found for $TARGET_DATE — skipping DB sync"
DB_ALREADY_SYNCED=true
fi
fi
if [ "$DB_ALREADY_SYNCED" = false ]; then
# ─── INIT TABLES ──────────────────────────────────────────────────────────
step "Initialising tables, indexes, FTS"
run_sqlite_heredoc "creating tables" "
ATTACH '$NAS_DB' AS nas;
CREATE TABLE IF NOT EXISTS nas.frames AS SELECT * FROM main.frames WHERE 0;
CREATE TABLE IF NOT EXISTS nas.elements AS SELECT * FROM main.elements WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ui_events AS SELECT * FROM main.ui_events WHERE 0;
CREATE TABLE IF NOT EXISTS nas.ocr_text AS SELECT * FROM main.ocr_text WHERE 0;
CREATE TABLE IF NOT EXISTS nas.video_chunks AS SELECT * FROM main.video_chunks WHERE 0;
CREATE TABLE IF NOT EXISTS nas.meetings AS SELECT * FROM main.meetings WHERE 0;
DETACH nas;
"
run_sqlite_heredoc "creating indexes" "
ATTACH '$NAS_DB' AS nas;
CREATE INDEX IF NOT EXISTS nas.idx_frames_timestamp ON frames(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_frames_app_name ON frames(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_window_name ON frames(window_name);
CREATE INDEX IF NOT EXISTS nas.idx_frames_video_chunk_id ON frames(video_chunk_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_id ON elements(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_elements_frame_src_role ON elements(frame_id, source, role) WHERE text IS NOT NULL;
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_timestamp ON ui_events(timestamp);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_app_name ON ui_events(app_name);
CREATE INDEX IF NOT EXISTS nas.idx_ui_events_frame_id ON ui_events(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_ocr_text_frame_id ON ocr_text(frame_id);
CREATE INDEX IF NOT EXISTS nas.idx_meetings_start ON meetings(meeting_start);
CREATE INDEX IF NOT EXISTS nas.idx_video_chunks_device ON video_chunks(device_name);
DETACH nas;
"
run_sqlite_heredoc "creating FTS tables" "
ATTACH '$NAS_DB' AS nas;
CREATE VIRTUAL TABLE IF NOT EXISTS nas.elements_fts USING fts5(
text, role, frame_id UNINDEXED,
content='elements', content_rowid='id', tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.frames_fts USING fts5(
full_text, app_name, window_name, browser_url, id UNINDEXED,
tokenize='unicode61'
);
CREATE VIRTUAL TABLE IF NOT EXISTS nas.ui_events_fts USING fts5(
text_content,
app_name,
window_title,
element_name,
content='ui_events',
content_rowid='id',
tokenize='unicode61'
);
DETACH nas;
"
# ─── SYNC DATA ────────────────────────────────────────────────────────────
step "Syncing data for $TARGET_DATE"
run_sqlite_heredoc "video_chunks" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.video_chunks
SELECT * FROM main.video_chunks
WHERE id IN (
SELECT DISTINCT video_chunk_id FROM main.frames
WHERE date(timestamp) = '$TARGET_DATE' AND video_chunk_id IS NOT NULL
);
DETACH nas;
"
run_sqlite_heredoc "frames ($SRC_FRAMES rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.frames
SELECT * FROM main.frames WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ocr_text ($SRC_OCR rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ocr_text
SELECT o.* FROM main.ocr_text o
JOIN main.frames f ON o.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "ui_events ($SRC_UI rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.ui_events
SELECT * FROM main.ui_events WHERE date(timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "elements ($SRC_ELEMENTS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.elements
SELECT e.* FROM main.elements e
JOIN main.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE';
DETACH nas;
"
run_sqlite_heredoc "meetings ($SRC_MEETINGS rows)" "
ATTACH '$NAS_DB' AS nas;
INSERT OR IGNORE INTO nas.meetings
SELECT * FROM main.meetings WHERE date(meeting_start) = '$TARGET_DATE';
DETACH nas;
"
# ─── FTS UPDATE ───────────────────────────────────────────────────────────
step "Updating FTS indexes"
run_sqlite_heredoc "elements_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.elements_fts(rowid, text, role)
SELECT e.id, e.text, e.role
FROM nas.elements e
JOIN nas.frames f ON e.frame_id = f.id
WHERE date(f.timestamp) = '$TARGET_DATE'
AND e.text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "frames_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.frames_fts(rowid, full_text, app_name, window_name, browser_url, id)
SELECT id, full_text, app_name, window_name, browser_url, id
FROM nas.frames
WHERE date(timestamp) = '$TARGET_DATE'
AND full_text IS NOT NULL;
DETACH nas;
"
run_sqlite_heredoc "ui_events_fts" "
ATTACH '$NAS_DB' AS nas;
INSERT INTO nas.ui_events_fts(rowid, text_content, app_name, window_title, element_name)
SELECT id, text_content, app_name, window_title, element_name
FROM nas.ui_events
WHERE date(timestamp) = '$TARGET_DATE'
AND text_content IS NOT NULL;
DETACH nas;
"
# ─── VERIFY DB ────────────────────────────────────────────────────────────
step "Verifying DB"
V_FRAMES=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM frames WHERE date(timestamp) = '$TARGET_DATE';")
V_ELEMENTS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM elements WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_UI=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ui_events WHERE date(timestamp) = '$TARGET_DATE';")
V_OCR=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM ocr_text WHERE frame_id IN (SELECT id FROM frames WHERE date(timestamp) = '$TARGET_DATE');")
V_MEETINGS=$(sqlite3 "$NAS_DB" "SELECT COUNT(*) FROM meetings WHERE date(meeting_start)= '$TARGET_DATE';")
check "frames" "$V_FRAMES" "$SRC_FRAMES"
check "elements" "$V_ELEMENTS" "$SRC_ELEMENTS"
check "ui_events" "$V_UI" "$SRC_UI"
check "ocr_text" "$V_OCR" "$SRC_OCR"
check "meetings" "$V_MEETINGS" "$SRC_MEETINGS"
fi
# ─── COPY DATA FOLDER ─────────────────────────────────────────────────────────
# Always runs regardless of DB sync status
step "Copying data folder for $TARGET_DATE"
if [ -d "$DATA_SRC" ]; then
mkdir -p "$NAS_DATA/$TARGET_DATE"
RSYNC_START=$(date +%s)
printf " %-36s " "rsync $TARGET_DATE/ → NAS"
rsync -a --ignore-existing \
"$DATA_SRC/" \
"$NAS_DATA/$TARGET_DATE/" \
2>>"$LOG_FILE"
RSYNC_DUR=$(( $(date +%s) - RSYNC_START ))
COPIED_FILES=$(ls "$NAS_DATA/$TARGET_DATE" | wc -l | tr -d ' ')
SRC_FILES=$(ls "$DATA_SRC" | wc -l | tr -d ' ')
COPIED_SIZE=$(du -sh "$NAS_DATA/$TARGET_DATE" | cut -f1)
if [ "$COPIED_FILES" -eq "$SRC_FILES" ]; then
printf "\r %-36s ✓ %dm%02ds (%s files, %s)\n" \
"rsync $TARGET_DATE/ → NAS" \
"$(( RSYNC_DUR / 60 ))" "$(( RSYNC_DUR % 60 ))" \
"$COPIED_FILES" "$COPIED_SIZE" | tee -a "$LOG_FILE"
else
printf "\r %-36s ✗ %s / %s files\n" \
"rsync $TARGET_DATE/ → NAS" "$COPIED_FILES" "$SRC_FILES" | tee -a "$LOG_FILE"
fi
else
printf " %-36s %s\n" "rsync $TARGET_DATE/ → NAS" "skipped (no source dir)"
fi
# ─── SUMMARY ──────────────────────────────────────────────────────────────────
TOTAL_ELAPSED=$(( $(date +%s) - SCRIPT_START ))
DB_SIZE=$(du -sh "$NAS_DB" | cut -f1)
echo ""
log "Archive DB size: $DB_SIZE"
log "Total time: $(( TOTAL_ELAPSED / 60 ))m$(( TOTAL_ELAPSED % 60 ))s"
log "Sync complete for $TARGET_DATE"
log "========================================"
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 0
drwxr-xr-x 2 lukas staff 64 6 May 20:22 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd ..
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~ $ cd ~/.screenpipe
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 9424
drwxr-xr-x 8 lukas staff 256 6 May 20:27 .
drwx------+ 94 lukas staff 3008 6 May 20:27 ..
drwxr-xr-x 5 lukas staff 160 6 May 20:28 data
-rw-r--r-- 1 lukas staff 581632 6 May 20:27 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:27 db.sqlite-shm
-rw-r--r-- 1 lukas staff 3312512 6 May 20:28 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 9566 6 May 20:28 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ sp-stop
screenpipe stopped
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ ll
total 21216
drwxr-xr-x 8 lukas staff 256 6 May 20:32 .
drwx------+ 94 lukas staff 3008 6 May 20:29 ..
drwxr-xr-x 18 lukas staff 576 6 May 20:31 data
-rw-r--r-- 1 lukas staff 8708096 6 May 20:31 db.sqlite
-rw-r--r-- 1 lukas staff 32768 6 May 20:32 db.sqlite-shm
-rw-r--r-- 1 lukas staff 1697472 6 May 20:32 db.sqlite-wal
drwxr-xr-x 8 lukas staff 256 6 May 20:27 pipes
-rw-r--r-- 1 lukas staff 19041 6 May 20:32 screenpipe.2026-05-06.0.log
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ ll
total 3056
drwxr-xr-x 18 lukas staff 576 6 May 20:31 .
drwxr-xr-x 8 lukas staff 256 6 May 20:32 ..
-rw-r--r-- 1 lukas staff 210738 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 218037 6 May 20:28 MacBook Pro Microphone (input)_2026-05-06_17-28-19.mp4
-rw-r--r-- 1 lukas staff 216171 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-28-49.mp4
-rw-r--r-- 1 lukas staff 216193 6 May 20:29 MacBook Pro Microphone (input)_2026-05-06_17-29-19.mp4
-rw-r--r-- 1 lukas staff 209772 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 215405 6 May 20:30 MacBook Pro Microphone (input)_2026-05-06_17-30-18.mp4
-rw-r--r-- 1 lukas staff 205064 6 May 20:31 MacBook Pro Microphone (input)_2026-05-06_17-30-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-27-47.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:28 System Audio (output)_2026-05-06_17-28-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-28-50.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:29 System Audio (output)_2026-05-06_17-29-20.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-29-49.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:30 System Audio (output)_2026-05-06_17-30-19.mp4
-rw-r--r-- 1 lukas staff 4620 6 May 20:31 System Audio (output)_2026-05-06_17-30-47.mp4
drwxr-xr-x 3 lukas staff 96 6 May 20:27 data
drwxr-xr-x 2 lukas staff 64 6 May 20:29 pending-transcriptions
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data $ cd data
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ ll
total 0
drwxr-xr-x 3 lukas staff 96 6 May 20:27 .
drwxr-xr-x 18 lukas staff 576 6 May 20:31 ..
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data $ cd 2026-05-06
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $ ll
total 17432
drwxr-xr-x 57 lukas staff 1824 6 May 20:32 .
drwxr-xr-x 3 lukas staff 96 6 May 20:27 ..
-rw-r--r-- 1 lukas staff 232466 6 May 20:27 1778088456772_m1.jpg
-rw-r--r-- 1 lukas staff 152554 6 May 20:27 1778088457434_m2.jpg
-rw-r--r-- 1 lukas staff 181543 6 May 20:27 1778088466571_m1.jpg
-rw-r--r-- 1 lukas staff 126979 6 May 20:27 1778088478583_m1.jpg
-rw-r--r-- 1 lukas staff 152544 6 May 20:28 1778088491264_m2.jpg
-rw-r--r-- 1 lukas staff 166250 6 May 20:28 1778088503148_m1.jpg
-rw-r--r-- 1 lukas staff 152522 6 May 20:28 1778088503179_m2.jpg
-rw-r--r-- 1 lukas staff 159999 6 May 20:28 1778088534192_m1.jpg
-rw-r--r-- 1 lukas staff 152579 6 May 20:28 1778088534522_m2.jpg
-rw-r--r-- 1 lukas staff 155560 6 May 20:29 1778088564250_m1.jpg
-rw-r--r-- 1 lukas staff 124040 6 May 20:29 1778088564930_m2.jpg
-rw-r--r-- 1 lukas staff 121232 6 May 20:29 1778088570551_m2.jpg
-rw-r--r-- 1 lukas staff 157568 6 May 20:29 1778088570945_m1.jpg
-rw-r--r-- 1 lukas staff 157625 6 May 20:29 1778088581767_m1.jpg
-rw-r--r-- 1 lukas staff 119295 6 May 20:29 1778088581767_m2.jpg
-rw-r--r-- 1 lukas staff 157529 6 May 20:29 1778088584166_m1.jpg
-rw-r--r-- 1 lukas staff 119415 6 May 20:29 1778088585022_m2.jpg
-rw-r--r-- 1 lukas staff 157483 6 May 20:29 1778088586312_m1.jpg
-rw-r--r-- 1 lukas staff 119430 6 May 20:29 1778088586786_m2.jpg
-rw-r--r-- 1 lukas staff 157657 6 May 20:29 1778088588816_m1.jpg
-rw-r--r-- 1 lukas staff 121321 6 May 20:29 1778088589524_m2.jpg
-rw-r--r-- 1 lukas staff 112106 6 May 20:30 1778088603330_m2.jpg
-rw-r--r-- 1 lukas staff 157634 6 May 20:30 1778088604117_m1.jpg
-rw-r--r-- 1 lukas staff 152205 6 May 20:30 1778088608499_m2.jpg
-rw-r--r-- 1 lukas staff 157651 6 May 20:30 1778088609502_m1.jpg
-rw-r--r-- 1 lukas staff 163575 6 May 20:30 1778088623310_m2.jpg
-rw-r--r-- 1 lukas staff 173535 6 May 20:30 1778088630735_m1.jpg
-rw-r--r-- 1 lukas staff 162111 6 May 20:30 1778088633155_m2.jpg
-rw-r--r-- 1 lukas staff 173763 6 May 20:30 1778088633901_m1.jpg
-rw-r--r-- 1 lukas staff 153966 6 May 20:30 1778088637729_m1.jpg
-rw-r--r-- 1 lukas staff 181815 6 May 20:30 1778088640280_m2.jpg
-rw-r--r-- 1 lukas staff 158733 6 May 20:30 1778088641897_m1.jpg
-rw-r--r-- 1 lukas staff 205244 6 May 20:30 1778088645543_m2.jpg
-rw-r--r-- 1 lukas staff 158969 6 May 20:30 1778088647024_m1.jpg
-rw-r--r-- 1 lukas staff 185029 6 May 20:30 1778088649964_m2.jpg
-rw-r--r-- 1 lukas staff 158980 6 May 20:30 1778088651015_m1.jpg
-rw-r--r-- 1 lukas staff 158729 6 May 20:30 1778088656510_m1.jpg
-rw-r--r-- 1 lukas staff 251895 6 May 20:30 1778088657626_m2.jpg
-rw-r--r-- 1 lukas staff 159037 6 May 20:31 1778088660760_m1.jpg
-rw-r--r-- 1 lukas staff 170173 6 May 20:31 1778088661602_m2.jpg
-rw-r--r-- 1 lukas staff 159039 6 May 20:31 1778088664406_m1.jpg
-rw-r--r-- 1 lukas staff 168123 6 May 20:31 1778088664871_m2.jpg
-rw-r--r-- 1 lukas staff 161993 6 May 20:31 1778088668555_m2.jpg
-rw-r--r-- 1 lukas staff 163729 6 May 20:31 1778088671392_m2.jpg
-rw-r--r-- 1 lukas staff 155859 6 May 20:31 1778088683595_m1.jpg
-rw-r--r-- 1 lukas staff 135122 6 May 20:31 1778088685154_m2.jpg
-rw-r--r-- 1 lukas staff 140146 6 May 20:31 1778088695364_m2.jpg
-rw-r--r-- 1 lukas staff 155883 6 May 20:31 1778088696205_m1.jpg
-rw-r--r-- 1 lukas staff 166491 6 May 20:31 1778088699449_m2.jpg
-rw-r--r-- 1 lukas staff 155839 6 May 20:31 1778088699457_m1.jpg
-rw-r--r-- 1 lukas staff 162622 6 May 20:31 1778088702773_m2.jpg
-rw-r--r-- 1 lukas staff 189289 6 May 20:31 1778088703280_m1.jpg
-rw-r--r-- 1 lukas staff 227256 6 May 20:32 1778088745343_m1.jpg
-rw-r--r-- 1 lukas staff 162471 6 May 20:32 1778088745907_m2.jpg
-rw-r--r-- 1 lukas staff 159690 6 May 20:32 1778088767221_m1.jpg
lukas@Lukas-Kovaliks-MacBook-Pro-Jiminny ~/.screenpipe/data/data/2026-05-06 $
DOCKER
Close Tab
DEV (docker)
Close Tab
APP (-zsh)
Close Tab
-zsh
Close Tab
screenpipe"
Close Tab
-zsh
Close Tab
⌥⌘1
-zsh...
|
iTerm2
|
-zsh
|
NULL
|
61
|