Token导航 LogoToken导航TokenDH.com
研究检索可写文件github未标认证来源可访问许可证需确认审计提醒

grepai-watch-daemongrepai 手表守护进程

Agent Skill

grepai-watch-daemon 用于查找、检索和筛选相关信息,适合在 Codex、Claude、Cursor、Gemini CLI 中需要根据关键词、任务场景或来源线索快速定位候选结果时使用。可结合来源仓库、安装命令和原始 README 继续核验具体用法。安装前建议确认权限范围、维护状态,以及是否会触发联网、命令执行或文件读写。

总安装

10,208

周安装

417

GitHub Stars

16

下载量

3,269
CodexClaudeCursorGemini CLI

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

GitHub

来源数

2

许可证

unknown

最后核验

2026-05-01

来源状态

来源可访问

安装方式

通过对话安装

复制提示词发给支持本地命令或 Skills 的 AI 助手,先确认命令和权限,再让它执行。

请帮我安装这个 Agent Skill:grepai-watch-daemon(grepai 手表守护进程)
来源仓库:https://github.com/yoanbernabeu/grepai-skills
仓库路径:skills/grepai-watch-daemon
安装命令:
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-watch-daemon
安装前请先检查当前环境是否支持对应 CLI,并向我确认将要执行的命令、安装目录、联网范围和文件读写权限;确认后再执行。

命令行安装

复制命令到本机终端执行。该命令会通过 npx skills 从第三方来源获取 Skill;本站只展示命令,不托管安装包,也不自动执行。

skills.shnpx skills
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-watch-daemon

简介

用于查找、检索和筛选相关信息,适合快速定位候选结果。

  • 它根据关键词或任务场景在代码或文档中匹配内容片段。
  • 使用方式依赖具体仓库结构和搜索模式,需结合上下文调整参数。
  • 安装命令:npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-watch-daemon。
  • 注意确认权限范围和是否允许读取项目文件,避免误触敏感路径。

SKILL.md

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

适合场景

01

用户想查找某类 Agent Skill 时

02

需要根据任务场景推荐可安装能力包时

03

需要对比不同来源的安装命令和来源信息时

能力概览

能力 1

按任务关键词查找相关 Skills

能力 2

展示可复制的安装命令

能力 3

保留来源站点、仓库和原始说明,方便继续核验

能力 4

展示第三方安全扫描或审计结果

安装后应在对应宿主中按原始 README 的触发条件使用;具体调用方式请以来源页面和 README 为准。

平台分布

Codex

36.7%
按下载量换算1,200

Claude

31.87%
按下载量换算1,042

Cursor

17.22%
按下载量换算563

Gemini CLI

9.32%
按下载量换算305

安全审计

Gen Agent Trust Hub

可疑

Socket

通过

Snyk

可疑

权限和风险

可写文件

该 Skill 可能写入或修改本地文件,使用前需要确认目标目录和修改范围。

安装前确认

本站仅展示第三方公开信息,不托管安装包,不提供自动安装或运行环境。安装前应自行审查源码、依赖和命令行为。来源安全扫描存在 warning/failed 结果,不能写成本站确认安全。当前只有一个来源,正式发布前建议补源仓库或其他目录站核验。

来源信息

继续浏览同类 Skills