grepai-installation

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

GrepAI 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
undefined

Add 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 automatically
grepai version

**优势:**
- 使用`brew upgrade grepai`自动更新
- 使用`brew uninstall grepai`干净卸载
- 自动管理依赖

Method 2: Shell Script (Linux/macOS)

方法2:Shell脚本(Linux/macOS)

Universal installation script:
bash
undefined
通用安装脚本:
bash
undefined

Download 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 permissions
grepai version

**脚本功能:**
1. 检测操作系统和架构
2. 下载对应的二进制文件
3. 安装到`/usr/local/bin/`目录
4. 设置可执行权限

Method 3: PowerShell (Windows)

方法3:PowerShell(Windows)

Native Windows installation:
powershell
undefined
Windows原生安装方式:
powershell
undefined

Run 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 CurrentUser
grepai version

**注意:** 你可能需要调整执行策略:
```powershell
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser

Method 4: Build from Source

方法4:从源码构建

For developers or custom builds:
bash
undefined
适用于开发者或自定义构建场景:
bash
undefined

Clone the repository

Clone the repository

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
undefined

Check 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
undefined
grepai --help
undefined

Updating GrepAI

更新GrepAI

Check for Updates

检查更新

bash
grepai update --check
bash
grepai update --check

Perform Update

执行更新

bash
undefined
bash
undefined

Auto-update (downloads and installs latest)

Auto-update (downloads and installs latest)

grepai update
grepai update

Or via Homebrew

Or via Homebrew

brew upgrade grepai
undefined
brew upgrade grepai
undefined

Uninstalling

卸载

Homebrew

Homebrew方式

bash
brew uninstall grepai
bash
brew uninstall grepai

Manual

手动方式

bash
undefined
bash
undefined

Remove 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
undefined
rm -rf ~/.grepai
undefined

Next Steps

后续步骤

After installation:
  1. Install Ollama for local embeddings (see
    grepai-ollama-setup
    skill)
  2. Initialize a project with
    grepai init
  3. Start indexing with
    grepai watch
安装完成后:
  1. 安装Ollama以获取本地嵌入功能(请查看
    grepai-ollama-setup
    技能)
  2. 使用
    grepai init
    初始化项目
  3. 使用
    grepai watch
    开始索引

Common Installation Issues

常见安装问题

Problem:
command not found: grepai
Solution: Ensure
/usr/local/bin
is in your PATH:
bash
export PATH="$PATH:/usr/local/bin"
Problem: Permission denied during installation ✅ Solution: Use
sudo
for the installation command or install to a user directory
Problem: Homebrew tap not found ✅ Solution: Add the tap first:
bash
brew tap yoanbernabeu/tap
brew install grepai
问题:
command not found: grepai
解决方案: 确保
/usr/local/bin
在你的PATH中:
bash
export PATH="$PATH:/usr/local/bin"
问题: 安装过程中出现权限拒绝 ✅ 解决方案: 在安装命令前添加
sudo
,或安装到用户目录
问题: Homebrew tap未找到 ✅ 解决方案: 先添加tap:
bash
brew tap yoanbernabeu/tap
brew install grepai

Output 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