Loading...
Loading...
Compare original and translation side by side
grepai watchgrepai watchcd /your/project
grepai watch🔍 GrepAI Watch
Scanning files...
Found 245 files
Processing chunks...
████████████████████████████████ 100%
Indexed 1,234 chunks
Watching for changes...Ctrl+Ccd /your/project
grepai watch🔍 GrepAI Watch
正在扫描文件...
找到245个文件
正在处理代码片段...
████████████████████████████████ 100%
已索引1,234个代码片段
正在监控变更...Ctrl+Cgrepai watch --background🔍 GrepAI Watch (background)
Daemon started with PID 12345
Log file: ~/.grepai/daemon.loggrepai watch --background🔍 GrepAI Watch (background)
守护进程已启动,PID为12345
日志文件: ~/.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 --status✅ GrepAI 守护进程正在运行
PID: 12345
启动时间: 2025-01-28 10:30:00
项目路径: /path/to/project
统计信息:
- 已索引文件数: 245
- 代码片段数: 1,234
- 最后更新时间: 2分钟前grepai watch --stop✅ Daemon stopped (PID 12345)grepai watch --stop✅ 守护进程已停止(PID 12345)| Command | Description |
|---|---|
| Start daemon in foreground |
| Start daemon in background |
| Check daemon status |
| Stop running daemon |
| 命令 | 描述 |
|---|---|
| 前台启动守护进程 |
| 后台启动守护进程 |
| 检查守护进程状态 |
| 停止运行中的守护进程 |
undefinedundefinedundefinedundefined| Value | Behavior |
|---|---|
| More responsive, more reindexing |
| Balanced (default) |
| Less responsive, fewer reindexing |
| 数值 | 行为 |
|---|---|
| 响应更快,重新索引更频繁 |
| 平衡模式(默认) |
| 响应较慢,重新索引次数更少 |
.gitignore.gitignoreScanning files...
Found 10,245 files
Processing chunks...
████████████████░░░░░░░░░░░░░░░░ 50% (5,122/10,245)正在扫描文件...
找到10,245个文件
正在处理代码片段...
████████████████░░░░░░░░░░░░░░░░ 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 |
| 代码库规模 | 文件数 | 耗时(Ollama) | 耗时(OpenAI) |
|---|---|---|---|
| 小型 | 100 | ~30秒 | ~10秒 |
| 中型 | 1,000 | ~5分钟 | ~1分钟 |
| 大型 | 10,000 | ~30分钟 | ~5分钟 |
| 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~/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~/.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-watchundefinedundefinedundefinedundefinedundefinedundefinedundefinedundefinedgrepai 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 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 Ollamagrepai watch --stop
grepai watch --backgroundgrepai init
grepai watchollama serve # 针对Ollamarm .grepai/index.gob
grepai watchrm .grepai/index.gob
grepai watchecho 65536 | sudo tee /proc/sys/fs/inotify/max_user_watchesecho 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)grepai status✅ GrepAI 状态正常
项目路径: /path/to/project
配置文件: .grepai/config.yaml
嵌入提供商: Ollama (nomic-embed-text)
存储后端: GOB (.grepai/index.gob)
索引信息:
- 文件数: 245
- 代码片段数: 1,234
- 索引大小: 12.5 MB
- 最后更新时间: 2025-01-28 10:30:00
守护进程状态: 运行中(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✅ 监控守护进程已激活
模式: 后台
PID: 12345
项目路径: /path/to/project
初始索引信息:
- 已扫描文件数: 245
- 已创建代码片段数: 1,234
- 耗时: 45秒
实时监控信息:
- 防抖延迟: 500ms
- 已处理事件数: 23
- 最后事件时间: 5分钟前
下一步操作:
- 运行'grepai search "query"'进行搜索
- 运行'grepai watch --status'检查状态
- 运行'grepai watch --stop'停止守护进程