百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
G

grepai

> 开发工具
开源

用于 AI 代理的语义搜索和调用图 (100% 本地)

1.8K stars0 点赞2 次浏览
访问官网GitHub

工具介绍

用于 AI 代理的语义搜索和调用图 (100% 本地)

grepai 是一款以隐私为先的 CLI,用于语义代码搜索。它使用向量嵌入来理解代码的含义,从而支持使用自然语言查询找到相关代码,即使命名约定不同。

  • 根据意图搜索 — 问 "身份验证逻辑", 找到 handleUserSession
  • 跟踪调用图 — 在更改函数之前,了解谁调用了该函数
  • 100% 本地 - 你的代码永远不会离开你的机器
  • 始终保持最新 — 文件监视器会自动保持索引的最新状态
  • AI 代理程序已准备好 — 可与 Claude 代码、Cursor 以及开箱即用的风帆运动一起使用
  • MCP 服务器 - 您的 AI 代理可以直接调用 grepai 作为工具

安装

Homebrew (macOS):

bash
brew install yoanbernabeu/tap/grepai

Linux/macOS:

bash
curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | sh

Windows (PowerShell):

powershell
irm https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.ps1 | iex

需要嵌入提供商 - Ollama (默认)、LM Studio 或 OpenAI。 Ollama (推荐):

bash
ollama pull nomic-embed-text

快速入门

bash
grepai init                        # Initialize in your project
grepai watch                       # Start indexing daemon
grepai search "error handling"     # Search semantically
grepai trace callers "Login"       # Find who calls a function

Shell 补全

grepai 支持对命令、标志和动态值(工作空间名称、项目名称、提供程序、后端)的自动补全。 Zsh(添加到 ~/.zshrc):

bash
eval "$(grepai completion zsh)"

Oh-My-Zsh 插件:

bash
mkdir -p ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/grepai
grepai completion zsh > ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/grepai/_grepai
# Then add "grepai" to plugins=(...) in ~/.zshrc

Bash:

bash
# Linux
grepai completion bash > /etc/bash_completion.d/grepai

# macOS (requires bash-completion@2)
grepai completion bash > $(brew --prefix)/etc/bash_completion.d/grepai

**鱼

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Caiclaude-codeclicode-search

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具