grepai-installation
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseGrepAI Installation
GrepAI安装
This skill covers all methods to install GrepAI on any platform.
本技能涵盖了在任意平台上安装GrepAI的所有方法。
When to Use This Skill
何时使用本技能
- Installing GrepAI for the first time
- Upgrading an existing GrepAI installation
- Building GrepAI from source
- Verifying a successful installation
- 首次安装GrepAI
- 升级已有的GrepAI安装版本
- 从源码构建GrepAI
- 验证安装是否成功
Prerequisites
前提条件
- macOS/Linux: Terminal access
- Windows: PowerShell
- From source: Go 1.24+ installed
- macOS/Linux: 终端访问权限
- Windows: PowerShell
- 从源码构建: 已安装Go 1.24+
Installation Methods
安装方法
Method 1: Homebrew (macOS - Recommended)
方法1:Homebrew(macOS - 推荐)
The easiest way to install on macOS:
bash
undefined在macOS上安装的最简单方式:
bash
undefinedAdd the tap and install
Add the tap and install
brew install yoanbernabeu/tap/grepai
brew install yoanbernabeu/tap/grepai
Verify installation
Verify installation
grepai version
**Advantages:**
- Automatic updates with `brew upgrade grepai`
- Clean uninstall with `brew uninstall grepai`
- Manages dependencies automaticallygrepai version
**优势:**
- 使用`brew upgrade grepai`自动更新
- 使用`brew uninstall grepai`干净卸载
- 自动管理依赖Method 2: Shell Script (Linux/macOS)
方法2:Shell脚本(Linux/macOS)
Universal installation script:
bash
undefined通用安装脚本:
bash
undefinedDownload and run the installer
Download and run the installer
Verify installation
Verify installation
grepai version
**What the script does:**
1. Detects your OS and architecture
2. Downloads the appropriate binary
3. Installs to `/usr/local/bin/`
4. Sets executable permissionsgrepai version
**脚本功能:**
1. 检测操作系统和架构
2. 下载对应的二进制文件
3. 安装到`/usr/local/bin/`目录
4. 设置可执行权限Method 3: PowerShell (Windows)
方法3:PowerShell(Windows)
Native Windows installation:
powershell
undefinedWindows原生安装方式:
powershell
undefinedRun in PowerShell (Admin recommended)
Run in PowerShell (Admin recommended)
Verify installation
Verify installation
grepai version
**Note:** You may need to adjust execution policy:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUsergrepai version
**注意:** 你可能需要调整执行策略:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUserMethod 4: Build from Source
方法4:从源码构建
For developers or custom builds:
bash
undefined适用于开发者或自定义构建场景:
bash
undefinedClone the repository
Clone the repository
git clone https://github.com/yoanbernabeu/grepai.git
cd grepai
git clone https://github.com/yoanbernabeu/grepai.git
cd grepai
Build the binary
Build the binary
make build
make build
Install globally
Install globally
sudo mv ./bin/grepai /usr/local/bin/
sudo mv ./bin/grepai /usr/local/bin/
Verify installation
Verify installation
grepai version
**Requirements:**
- Go 1.24 or later
- Make (optional, can use `go build` directly)grepai version
**要求:**
- Go 1.24或更高版本
- Make(可选,可直接使用`go build`)Verifying Installation
验证安装
After installation, verify everything works:
bash
undefined完成安装后,验证是否正常工作:
bash
undefinedCheck version
Check version
grepai version
grepai version
Output: grepai version 0.24.0
Output: grepai version 0.24.0
Check available commands
Check available commands
grepai --help
undefinedgrepai --help
undefinedUpdating GrepAI
更新GrepAI
Check for Updates
检查更新
bash
grepai update --checkbash
grepai update --checkPerform Update
执行更新
bash
undefinedbash
undefinedAuto-update (downloads and installs latest)
Auto-update (downloads and installs latest)
grepai update
grepai update
Or via Homebrew
Or via Homebrew
brew upgrade grepai
undefinedbrew upgrade grepai
undefinedUninstalling
卸载
Homebrew
Homebrew方式
bash
brew uninstall grepaibash
brew uninstall grepaiManual
手动方式
bash
undefinedbash
undefinedRemove binary
Remove binary
sudo rm /usr/local/bin/grepai
sudo rm /usr/local/bin/grepai
Optionally remove config directories
Optionally remove config directories
rm -rf ~/.grepai
undefinedrm -rf ~/.grepai
undefinedNext Steps
后续步骤
After installation:
- Install Ollama for local embeddings (see skill)
grepai-ollama-setup - Initialize a project with
grepai init - Start indexing with
grepai watch
安装完成后:
- 安装Ollama以获取本地嵌入功能(请查看技能)
grepai-ollama-setup - 使用初始化项目
grepai init - 使用开始索引
grepai watch
Common Installation Issues
常见安装问题
❌ Problem:
✅ Solution: Ensure is in your PATH:
command not found: grepai/usr/local/binbash
export PATH="$PATH:/usr/local/bin"❌ Problem: Permission denied during installation
✅ Solution: Use for the installation command or install to a user directory
sudo❌ Problem: Homebrew tap not found
✅ Solution: Add the tap first:
bash
brew tap yoanbernabeu/tap
brew install grepai❌ 问题:
✅ 解决方案: 确保在你的PATH中:
command not found: grepai/usr/local/binbash
export PATH="$PATH:/usr/local/bin"❌ 问题: 安装过程中出现权限拒绝
✅ 解决方案: 在安装命令前添加,或安装到用户目录
sudo❌ 问题: Homebrew tap未找到
✅ 解决方案: 先添加tap:
bash
brew tap yoanbernabeu/tap
brew install grepaiOutput Format
输出格式
After successful installation:
✅ GrepAI installed successfully
Version: 0.24.0
Location: /usr/local/bin/grepai
Next steps:
1. Install Ollama: brew install ollama
2. Initialize project: grepai init
3. Start indexing: grepai watch安装成功后:
✅ GrepAI installed successfully
Version: 0.24.0
Location: /usr/local/bin/grepai
Next steps:
1. Install Ollama: brew install ollama
2. Initialize project: grepai init
3. Start indexing: grepai watch