Loading...
Loading...
Configure and manage the GrepAI watch daemon. Use this skill for real-time code indexing and file monitoring.
npx skill4agent add yoanbernabeu/grepai-skills grepai-watch-daemongrepai watchcd /your/project
grepai watch🔍 GrepAI Watch
Scanning files...
Found 245 files
Processing chunks...
████████████████████████████████ 100%
Indexed 1,234 chunks
Watching for changes...Ctrl+Cgrepai watch --background🔍 GrepAI Watch (background)
Daemon started with PID 12345
Log file: ~/.grepai/daemon.loggrepai watch --status✅ GrepAI Daemon Running
PID: 12345
Started: 2025-01-28 10:30:00
Project: /path/to/project
Statistics:
- Files indexed: 245
- Chunks: 1,234
- Last update: 2 minutes agogrepai watch --stop✅ Daemon stopped (PID 12345)| Command | Description |
|---|---|
| Start daemon in foreground |
| Start daemon in background |
| Check daemon status |
| Stop running daemon |
# .grepai/config.yaml
watch:
# Debounce delay in milliseconds
# Groups rapid file changes together
debounce_ms: 500| Value | Behavior |
|---|---|
| More responsive, more reindexing |
| Balanced (default) |
| Less responsive, fewer reindexing |
.gitignoreScanning files...
Found 10,245 files
Processing chunks...
████████████████░░░░░░░░░░░░░░░░ 50% (5,122/10,245)| Codebase | Files | Time (Ollama) | Time (OpenAI) |
|---|---|---|---|
| Small | 100 | ~30s | ~10s |
| Medium | 1,000 | ~5min | ~1min |
| Large | 10,000 | ~30min | ~5min |
| Action | Result |
|---|---|
| Save existing file | Re-embed file chunks |
| Create new file | Index new chunks |
| Delete file | Remove from index |
| Rename file | Update path, keep vectors |
~/Library/LaunchAgents/com.grepai.watch.plist<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.grepai.watch</string>
<key>ProgramArguments</key>
<array>
<string>/usr/local/bin/grepai</string>
<string>watch</string>
</array>
<key>WorkingDirectory</key>
<string>/path/to/your/project</string>
<key>RunAtLoad</key>
<true/>
<key>KeepAlive</key>
<true/>
</dict>
</plist>launchctl load ~/Library/LaunchAgents/com.grepai.watch.plist~/.config/systemd/user/grepai-watch.service[Unit]
Description=GrepAI Watch Daemon
After=network.target
[Service]
Type=simple
WorkingDirectory=/path/to/your/project
ExecStart=/usr/local/bin/grepai watch
Restart=always
[Install]
WantedBy=default.targetsystemctl --user enable grepai-watch
systemctl --user start grepai-watch# Background daemon logs
tail -f ~/.grepai/daemon.log
# Or with systemd
journalctl --user -u grepai-watch -f# Terminal 1: Project A
cd /path/to/project-a
grepai watch --background
# Terminal 2: Project B
cd /path/to/project-b
grepai watch --backgroundgrepai workspace create my-workspace
grepai workspace add my-workspace /path/to/project-a
grepai workspace add my-workspace /path/to/project-b
grepai watch --workspace my-workspacegrepai watch --stop
grepai watch --backgroundgrepai init
grepai watchollama serve # For Ollamarm .grepai/index.gob
grepai watchecho 65536 | sudo tee /proc/sys/fs/inotify/max_user_watchesgrepai status✅ GrepAI Status
Project: /path/to/project
Config: .grepai/config.yaml
Embedder: Ollama (nomic-embed-text)
Storage: GOB (.grepai/index.gob)
Index:
- Files: 245
- Chunks: 1,234
- Size: 12.5 MB
- Last updated: 2025-01-28 10:30:00
Daemon: Running (PID 12345)✅ Watch Daemon Active
Mode: Background
PID: 12345
Project: /path/to/project
Initial Index:
- Files scanned: 245
- Chunks created: 1,234
- Duration: 45s
Real-time Monitor:
- Debounce: 500ms
- Events processed: 23
- Last event: 5 minutes ago
Next steps:
- Run 'grepai search "query"' to search
- Run 'grepai watch --status' to check status
- Run 'grepai watch --stop' to stop daemon