Now liveThe Skillselion MCP - thousands of ranked skills, loaded into your agent mid-task. No install.Get it →
yoanbernabeu avatar

Grepai Watch Daemon

  • 590 installs
  • 18 repo stars
  • Updated February 1, 2026
  • yoanbernabeu/grepai-skills

grepai-watch-daemon is a GrepAI skill that starts and manages the grepai watch daemon for developers who need real-time semantic code indexing and file monitoring during agent-assisted search.

About

grepai-watch-daemon configures and runs the GrepAI watch command for continuous codebase indexing. The daemon scans project source files, chunks code into roughly 512-token segments, generates embeddings through a configured provider, stores vectors in the configured backend, and monitors filesystem changes in the background. Developers reach for this skill when bootstrapping initial indexes, enabling real-time file watching, running the daemon detached, or troubleshooting stale semantic search results in GrepAI-powered agent workflows.

  • Foreground `grepai watch` with progress for full-project scan and live change monitoring
  • Background mode with PID and log path at ~/.grepai/daemon.log
  • `grepai watch --status` for PID, project path, and files/chunks statistics
  • Pipeline: scan → ~512-token chunks → embedder → vector backend → incremental updates
  • Ctrl+C stops foreground; troubleshooting guidance for indexing failures

Grepai Watch Daemon by the numbers

  • 590 all-time installs (skills.sh)
  • +4 installs in the week ending Jul 28, 2026 (Skillselion tracking)
  • Ranked #1,600 of 16,546 AI & Agent Building skills by installs in the Skillselion catalog
  • Security screen: MEDIUM risk (skills.sh audit)
  • Data as of Jul 28, 2026 (Skillselion catalog sync)
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-watch-daemon

Add your badge

Show developers this skill is listed on Skillselion. Paste this into your README.

Listed on Skillselion
Installs590
repo stars18
Security audit1 / 3 scanners passed
Last updatedFebruary 1, 2026
Repositoryyoanbernabeu/grepai-skills

How do you keep a codebase semantically indexed in real time?

Start and manage the GrepAI watch daemon so your codebase stays semantically indexed in real time while you and your agent search it.

Who is it for?

Developers using GrepAI semantic search who need always-current embeddings while editing code with an agent.

Skip if: One-off grep text searches without embeddings, or teams not using the GrepAI CLI and vector backend stack.

When should I use this skill?

A user needs to start GrepAI indexing, run grepai watch in the background, or fix stale semantic code search results.

What you get

Running GrepAI watch daemon with chunked embeddings stored in the configured vector backend and live file-change monitoring.

  • Running watch daemon
  • Updated semantic index vectors

By the numbers

  • Chunks source code into ~512-token segments

Files

SKILL.mdMarkdownGitHub ↗

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: 1. Scans all source files in your project 2. Chunks code into segments (~512 tokens) 3. Generates embeddings via your configured provider 4. Stores vectors in your configured backend 5. Monitors for file changes in real-time 6. 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

CommandDescription
grepai watchStart daemon in foreground
grepai watch --backgroundStart daemon in background
grepai watch --statusCheck daemon status
grepai watch --stopStop 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:

ValueBehavior
100More responsive, more reindexing
500Balanced (default)
1000Less 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

CodebaseFilesTime (Ollama)Time (OpenAI)
Small100~30s~10s
Medium1,000~5min~1min
Large10,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

ActionResult
Save existing fileRe-embed file chunks
Create new fileIndex new chunks
Delete fileRemove from index
Rename fileUpdate 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

1. Run in background: For continuous monitoring 2. Use workspace for monorepos: Better organization 3. Set up auto-start: launchd or systemd 4. Check logs periodically: Monitor for errors 5. 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

Related skills

FAQ

What does the GrepAI watch daemon do?

grepai-watch-daemon runs grepai watch to scan source files, chunk code near 512 tokens, generate embeddings via the configured provider, store vectors, and monitor filesystem changes in real time.

When should developers start grepai-watch-daemon?

grepai-watch-daemon applies when setting up initial semantic indexes, enabling background file monitoring, or diagnosing stale or missing GrepAI search results during active development.

Is Grepai Watch Daemon safe to install?

skills.sh reports 1 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.

AI & Agent Buildingintegrationsbackend

This week in AI coding

Five minutes, every Monday - the tools, releases and tactics for developers.

unsubscribe anytime.