Global Watch Mode
Watch multiple projects across different tenants with a single command.
Setup
Create ~/.slop/global.yaml:
projects:
- tenant: acme
project: docs
ignore: ["node_modules/**", ".git/**"]
sources:
- path: ~/Projects/acme/docs
patterns: ["**/*.md"]
- path: ~/vault/acme
patterns: ["**/*.md"]
prefix: "vault"
- tenant: acme
project: api
ignore: ["node_modules/**"]
sources:
- path: ~/Projects/acme-api/docs
patterns: ["**/*.md"]
Running
# Start watching all projects
slop watch --global
# With initial sync (upload existing files first)
slop watch --global --initial-sync
# Run as background process
nohup slop watch --global --initial-sync >> ~/.slop/watch.log 2>&1 &
How It Works
- Each source directory is watched for file changes via fsnotify
- Changes are queued and uploaded in batches of 20
- Unchanged files are skipped (content hash comparison)
- Failed uploads retry with exponential backoff (max 5 min)
- Deleted files are automatically removed from the queue
- Files matching ignore patterns are never synced
Multiple Sources Per Project
A project can pull from multiple directories. Use prefix to namespace them:
sources:
- path: ~/Projects/app/docs
patterns: ["**/*.md"]
# Files land at: {project}/filename.md
- path: ~/vault/app
patterns: ["**/*.md"]
prefix: "vault"
# Files land at: {project}/vault/filename.md
Troubleshooting
Log file: ~/.slop/watch.log
Common issues:
Path contains invalid characters— paths with@(like node_modules scoped packages) are rejected. Addnode_modules/**to ignoreread error: no such file or directory— file was deleted after being queued. Automatically cleaned upRate limited— watcher pauses and auto-recovers
Check status:
slop global list # Verify config
slop global validate # Check for errors