用于 AI 代理的语义搜索和调用图 (100% 本地)
grepai 是一款以隐私为先的 CLI,用于语义代码搜索。它使用向量嵌入来理解代码的含义,从而支持使用自然语言查询找到相关代码,即使命名约定不同。
handleUserSessionHomebrew (macOS):
brew install yoanbernabeu/tap/grepaiLinux/macOS:
curl -sSL https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.sh | shWindows (PowerShell):
irm https://raw.githubusercontent.com/yoanbernabeu/grepai/main/install.ps1 | iex需要嵌入提供商 - Ollama (默认)、LM Studio 或 OpenAI。 Ollama (推荐):
ollama pull nomic-embed-textgrepai init # Initialize in your project
grepai watch # Start indexing daemon
grepai search "error handling" # Search semantically
grepai trace callers "Login" # Find who calls a functiongrepai 支持对命令、标志和动态值(工作空间名称、项目名称、提供程序、后端)的自动补全。 Zsh(添加到 ~/.zshrc):
eval "$(grepai completion zsh)"Oh-My-Zsh 插件:
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 ~/.zshrcBash:
# 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,或尚未同步最近议题。