
grepai-watch-daemon
Configure and manage the GrepAI watch daemon. Use this skill for real-time code indexing and file monitoring.
- Installs
- 696
- Last 24h
- —
- Trending rank
- —
- Security
- Not audited
Install
Works with every agent the skills CLI supports.
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-watch-daemon- 01
Install
Run the command in your project. The CLI asks which agents to install for.
- 02
Describe the task
Ask your agent for something this skill covers. It loads grepai-watch-daemon automatically when relevant.
- 03
Review the result
The agent follows the SKILL.md steps, scripts and references bundled with the skill.
SKILL.md
The instructions your agent reads when the skill is triggered.
GrepAI Watch Daemon
This skill covers the grepai watch command and daemon management for real-time code indexing.
When to Use This Skill
- Starting initial code indexing
- Setting up real-time file monitoring
- Running the daemon in background
- Troubleshooting indexing issues
What the Watch Daemon Does
The watch daemon:
- Scans all source files in your project
- Chunks code into segments (~512 tokens)
- Generates embeddings via your configured provider
- Stores vectors in your configured backend
- Monitors for file changes in real-time
- Updates the index when files change
Basic Usage
Start Watching (Foreground)
cd /your/project
grepai watch
Output:
🔍 GrepAI Watch
Scanning files...
Found 245 files
Processing chunks...
████████████████████████████████ 100%
Indexed 1,234 chunks
Watching for changes...
Press Ctrl+C to stop.
Start in Background
grepai watch --background
Output:
🔍 GrepAI Watch (background)
Daemon started with PID 12345
Log file: ~/.grepai/daemon.log
Check Daemon Status
grepai watch --status
Output:
✅ 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 ago
Stop the Daemon
grepai watch --stop
Output:
✅ Daemon stopped (PID 12345)
Command Reference
| Command | Description |
|---|---|
grepai watch | Start daemon in foreground |
grepai watch --background | Start daemon in background |
grepai watch --status | Check daemon status |
grepai watch --stop | Stop running daemon |
Configuration
Watch Settings
# .grepai/config.yaml
watch:
# Debounce delay in milliseconds
# Groups rapid file changes together
debounce_ms: 500
Debounce Explained
When you save a file, editors often write multiple times quickly. Debouncing waits for changes to settle:
| Value | Behavior |
|---|---|
100 | More responsive, more reindexing |
500 | Balanced (default) |
1000 | Less responsive, fewer reindexing |
Initial Indexing
What Gets Indexed
The daemon indexes files:
- Matching supported extensions (.go, .js, .ts, .py, etc.)
- Not in ignore patterns (node_modules, .git, etc.)
- Respecting
.gitignore
Indexing Progress
Large codebases show progress:
Scanning files...
Found 10,245 files
Processing chunks...
████████████████░░░░░░░░░░░░░░░░ 50% (5,122/10,245)
Indexing Time Estimates
| Codebase | Files | Time (Ollama) | Time (OpenAI) |
|---|---|---|---|
| Small | 100 | ~30s | ~10s |
| Medium | 1,000 | ~5min | ~1min |
| Large | 10,000 | ~30min | ~5min |
Real-Time Monitoring
After initial indexing, the daemon watches for:
- File creation
- File modification
- File deletion
- File renames
File Change Detection
Uses OS-native file watching:
- macOS: FSEvents
- Linux: inotify
- Windows: ReadDirectoryChangesW
What Triggers Reindexing
| 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 |
Background Daemon Management
Starting on System Boot
macOS (launchd)
Create ~/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>
Load:
launchctl load ~/Library/LaunchAgents/com.grepai.watch.plist
Linux (systemd)
Create ~/.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.target
Enable:
systemctl --user enable grepai-watch
systemctl --user start grepai-watch
Checking Logs
# Background daemon logs
tail -f ~/.grepai/daemon.log
# Or with systemd
journalctl --user -u grepai-watch -f
Multiple Projects
One Daemon Per Project
Run separate daemons for each project:
# Terminal 1: Project A
cd /path/to/project-a
grepai watch --background
# Terminal 2: Project B
cd /path/to/project-b
grepai watch --background
Using Workspaces
For multi-project setups:
grepai 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-workspace
Troubleshooting
Daemon Won't Start
❌ Problem: "Another daemon is already running" ✅ Solution:
grepai watch --stop
grepai watch --background
❌ Problem: "Config not found" ✅ Solution: Initialize first:
grepai init
grepai watch
❌ Problem: "Embedder connection failed" ✅ Solution: Start your embedding provider:
ollama serve # For Ollama
Indexing Issues
❌ Problem: Files not being indexed ✅ Solution: Check ignore patterns in config, ensure file extension is supported
❌ Problem: Indexing very slow ✅ Solutions:
- Use OpenAI for faster cloud embeddings
- Add more ignore patterns
- Increase chunking size
❌ Problem: Index seems outdated ✅ Solution: Clear and reindex:
rm .grepai/index.gob
grepai watch
File Watch Issues
❌ Problem: Changes not detected ✅ Solutions:
- Reduce debounce_ms
- Check inotify limits (Linux):
echo 65536 | sudo tee /proc/sys/fs/inotify/max_user_watches
Best Practices
- Run in background: For continuous monitoring
- Use workspace for monorepos: Better organization
- Set up auto-start: launchd or systemd
- Check logs periodically: Monitor for errors
- Reindex after config changes: Especially after changing embedding model
Status Check
Regular health check:
grepai status
Output:
✅ 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)
Output Format
Watch daemon status:
✅ 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
FAQ
What does the grepai-watch-daemon skill do?
Configure and manage the GrepAI watch daemon. Use this skill for real-time code indexing and file monitoring.
How do I install grepai-watch-daemon?
Run npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-watch-daemon in your project. The skills CLI detects the agents you use and copies the skill into the right folder. For Claude Code you can also place the skill folder at ~/.claude/skills/grepai-watch-daemon/ (personal) or .claude/skills/grepai-watch-daemon/ (project).
Which AI agents can use grepai-watch-daemon?
Any agent that supports the open Agent Skills format (a folder with a SKILL.md file), including Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, Windsurf, Cline, OpenCode and more.
Is grepai-watch-daemon safe to install?
No partner security audit is available yet. Skills can run commands and scripts, so read the SKILL.md and any bundled files before installing.
Who maintains grepai-watch-daemon?
It is published by yoanbernabeu in yoanbernabeu/grepai-skills. It has 696 recorded installs.
More from yoanbernabeu/grepai-skills
grepai-search-basics
yoanbernabeu/grepai-skills
Basic semantic code search with GrepAI. Use this skill to learn fundamental search commands and concepts.
grepai-search-advanced
yoanbernabeu/grepai-skills
Advanced search options in GrepAI. Use this skill for JSON output, compact mode, and AI agent integration.
grepai-trace-graph
yoanbernabeu/grepai-skills
Build complete call graphs with GrepAI trace. Use this skill for recursive dependency analysis.
grepai-ollama-setup
yoanbernabeu/grepai-skills
Install and configure Ollama for local embeddings with GrepAI. Use this skill when setting up private, local embedding generation.
grepai-trace-callers
yoanbernabeu/grepai-skills
Find function callers with GrepAI trace. Use this skill to discover what code calls a specific function.
grepai-search-tips
yoanbernabeu/grepai-skills
Tips and best practices for effective GrepAI searches. Use this skill to improve search result quality.
Popular devops & cloud skills
microsoft-foundry
microsoft/azure-skills
Build, deploy, evaluate, optimize, fine-tune, and manage Microsoft Foundry agents, models, and resources end to end. USE FOR: foundry, azd ai agent, azd provision/deploy, hosted agent scaffold/develop/run/deploy/troubleshoot, prompt agent create, managed harness agent create, GitHub Copilot harness agent, create agent, update agent, add tool to agent, invoke agent, agent insights, evaluate agent, batch eval, continuous eval, continuous monitoring, agent CI/CD, optimize prompt, improve prompt, optimize agent instructions, Agent Optimizer scaffold, dataset curation from traces, deploy model, model fine-tuning (SFT/DPO/RFT), Foundry project, RBAC, role assignment, permissions, quota, capacity, region, deployment failure, AI Services, create Foundry resource, knowledge index, customize deployment, onboard, availability, training-data, grader, distillation, large file upload. DO NOT USE FOR: Azure Functions, App Service, general Azure deploy (use azure-deploy), general Azure prep (use azure
azure-diagnostics
microsoft/azure-skills
Debug Azure production issues on Azure using AppLens, Azure Monitor, resource health, and safe triage. WHEN: debug production issues, troubleshoot app service, app service high CPU, app service deployment failure, troubleshoot container apps, container app 503 or target port mismatch, troubleshoot functions, function telemetry missing or stopped after a config/connection-string change, troubleshoot AKS, VM RDP, Linux SSH, VM black screen, can't connect to VM, reset VM password, NSG or firewall blocking, kubectl cannot connect, kube-system/CoreDNS failures, pod pending, crashloop, node not ready, upgrade failures, analyze logs, KQL, insights, image pull failures, cold start issues, health probe failures, resource health, root cause of errors, troubleshoot event hubs, troubleshoot service bus, messaging SDK error, AMQP connection failure, message lock lost, lock renewal during long-running processing, service bus dead letter.
azure-prepare
microsoft/azure-skills
Prepare azd-based Azure projects for deployment: generates azure.yaml, infrastructure (Bicep/Terraform), and Dockerfiles for the Azure Developer CLI (azd) workflow. USE ONLY when the user explicitly wants to use azd as the deployment tool, or the project already has an azure.yaml file. DO NOT USE FOR: non-azd deployments, Python App Service code-only deploys (use python-appservice-deploy), or cross-cloud migration (use azure-cloud-migrate). WHEN: prepare app for azd, create azure.yaml, set up azd infrastructure, modernize app for Azure with azd, deploy with azd, function app, timer trigger, service bus trigger, event-driven function, managed identity, generate Bicep, generate Terraform, create and deploy to Azure.
azure-ai
microsoft/azure-skills
Use for Azure AI: Search, Speech, OpenAI, Document Intelligence. Helps with search, vector/hybrid search, speech-to-text, text-to-speech, transcription, OCR. WHEN: AI Search, query search, vector search, hybrid search, semantic search, speech-to-text, text-to-speech, transcribe, OCR, convert text to speech.
azure-deploy
microsoft/azure-skills
Execute Azure deployments for ALREADY-PREPARED applications that have existing .azure/deployment-plan.md and infrastructure files. DO NOT use this skill when the user asks to CREATE a new application — use azure-prepare instead. This skill runs azd up, azd deploy, terraform apply, and az deployment commands with built-in error recovery. Requires .azure/deployment-plan.md from azure-prepare and validated status from azure-validate. WHEN: "run azd up", "run azd deploy", "execute deployment", "push to production", "push to cloud", "go live", "ship it", "bicep deploy", "terraform apply", "publish to Azure", "launch on Azure". DO NOT USE WHEN: "create and deploy", "build and deploy", "create a new app", "set up infrastructure", "create and deploy to Azure using Terraform" — use azure-prepare for these.
azure-validate
microsoft/azure-skills
Pre-deployment validation for Azure readiness. Run deep checks on configuration, infrastructure (Bicep or Terraform), RBAC role assignments, managed identity permissions, and prerequisites before deploying. WHEN: validate my app, check deployment readiness, run preflight checks, verify configuration, check if ready to deploy, validate azure.yaml, validate Bicep, test before deploying, troubleshoot deployment errors, validate Azure Functions, validate function app, validate serverless deployment, verify RBAC roles, check role assignments, review managed identity permissions, what-if analysis, validate Container Apps deployment.