grepai-init by yoanbernabeu/grepai-skills
npx skills add https://github.com/yoanbernabeu/grepai-skills --skill grepai-init此技能涵盖 grepai init 命令和项目初始化。
grepai init 会创建什么cd /path/to/your/project
grepai init
运行 grepai init 会创建 .grepai/ 目录,包含以下内容:
.grepai/
├── config.yaml # 配置文件
├── index.gob # 向量索引(由 watch 命令创建)
└── symbols.gob # 用于 trace 的符号索引(由 watch 命令创建)
生成的 config.yaml:
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
version: 1
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
store:
backend: gob
chunking:
size: 512
overlap: 50
watch:
debounce_ms: 500
trace:
mode: fast
enabled_languages:
- .go
- .js
- .ts
- .jsx
- .tsx
- .py
- .php
- .c
- .h
- .cpp
- .hpp
- .cc
- .cxx
- .rs
- .zig
- .cs
- .pas
- .dpr
ignore:
- .git
- .grepai
- node_modules
- vendor
- target
- __pycache__
- dist
- build
| 设置项 | 默认值 | 用途 |
|---|---|---|
provider | ollama | 本地嵌入生成 |
model | nomic-embed-text | 768 维模型 |
endpoint | http://localhost:11434 | Ollama API URL |
| 设置项 | 默认值 | 用途 |
|---|---|---|
backend | gob | 本地文件存储 |
| 设置项 | 默认值 | 用途 |
|---|---|---|
size | 512 | 每个分块的令牌数 |
overlap | 50 | 上下文重叠的令牌数 |
| 设置项 | 默认值 | 用途 |
|---|---|---|
debounce_ms | 500 | 重新索引前的等待时间(毫秒) |
默认模式会排除:
.git.grepainode_modules、vendortarget、dist、build__pycache__编辑 .grepai/config.yaml 以进行自定义:
embedder:
provider: openai
model: text-embedding-3-small
api_key: ${OPENAI_API_KEY}
store:
backend: postgres
postgres:
dsn: postgres://user:pass@localhost:5432/grepai
ignore:
- .git
- .grepai
- node_modules
- "*.min.js"
- "*.bundle.js"
- coverage/
- .nyc_output/
对于单体仓库,在根目录初始化:
cd /path/to/monorepo
grepai init
或者使用工作区来创建独立的索引:
grepai workspace create my-workspace
grepai workspace add my-workspace /path/to/project1
grepai workspace add my-workspace /path/to/project2
如果需要重置:
# 删除现有配置
rm -rf .grepai
# 重新初始化
grepai init
警告: 这将删除您的索引。您需要重新运行 grepai watch。
初始化后,通过以下方式验证:
# 检查配置文件是否存在
cat .grepai/config.yaml
# 检查状态(此时会显示尚无索引)
grepai status
❌ 问题: .grepai 已存在
✅ 解决方案: 先删除它或编辑现有配置:
rm -rf .grepai && grepai init
❌ 问题: 配置已创建但 Ollama 未运行
✅ 解决方案: 在运行 grepai watch 前启动 Ollama:
ollama serve
❌ 问题: 在错误的目录进行了初始化
✅ 解决方案: 删除 .grepai 并在正确的目录重新初始化
.grepai/ 添加到 .gitignore: 索引是机器特定的# GrepAI
.grepai/
成功初始化后:
✅ GrepAI 已初始化
配置:.grepai/config.yaml
默认设置:
- 嵌入器:Ollama (nomic-embed-text)
- 存储:GOB (本地文件)
- 分块:512 令牌,50 重叠
后续步骤:
1. 确保 Ollama 正在运行:ollama serve
2. 开始索引:grepai watch
每周安装次数
260
代码仓库
GitHub 星标数
15
首次出现
2026 年 1 月 28 日
安全审计
安装于
opencode209
codex201
gemini-cli182
github-copilot182
kimi-cli170
claude-code170
This skill covers the grepai init command and project initialization.
grepai init createscd /path/to/your/project
grepai init
Running grepai init creates the .grepai/ directory with:
.grepai/
├── config.yaml # Configuration file
├── index.gob # Vector index (created by watch)
└── symbols.gob # Symbol index for trace (created by watch)
The generated config.yaml:
version: 1
embedder:
provider: ollama
model: nomic-embed-text
endpoint: http://localhost:11434
store:
backend: gob
chunking:
size: 512
overlap: 50
watch:
debounce_ms: 500
trace:
mode: fast
enabled_languages:
- .go
- .js
- .ts
- .jsx
- .tsx
- .py
- .php
- .c
- .h
- .cpp
- .hpp
- .cc
- .cxx
- .rs
- .zig
- .cs
- .pas
- .dpr
ignore:
- .git
- .grepai
- node_modules
- vendor
- target
- __pycache__
- dist
- build
| Setting | Default | Purpose |
|---|---|---|
provider | ollama | Local embedding generation |
model | nomic-embed-text | 768-dimension model |
endpoint | http://localhost:11434 | Ollama API URL |
| Setting | Default | Purpose |
|---|---|---|
backend | gob | Local file storage |
| Setting | Default | Purpose |
|---|---|---|
size | 512 | Tokens per chunk |
overlap | 50 | Overlap for context |
| Setting | Default | Purpose |
|---|---|---|
debounce_ms | 500 | Wait time before re-indexing |
Default patterns exclude:
.git.grepainode_modules, vendortarget, dist, build__pycache__Edit .grepai/config.yaml to customize:
embedder:
provider: openai
model: text-embedding-3-small
api_key: ${OPENAI_API_KEY}
store:
backend: postgres
postgres:
dsn: postgres://user:pass@localhost:5432/grepai
ignore:
- .git
- .grepai
- node_modules
- "*.min.js"
- "*.bundle.js"
- coverage/
- .nyc_output/
For monorepos, init at the root:
cd /path/to/monorepo
grepai init
Or use workspaces for separate indices:
grepai workspace create my-workspace
grepai workspace add my-workspace /path/to/project1
grepai workspace add my-workspace /path/to/project2
If you need to reset:
# Remove existing config
rm -rf .grepai
# Re-initialize
grepai init
Warning: This deletes your index. You'll need to re-run grepai watch.
After init, verify with:
# Check config exists
cat .grepai/config.yaml
# Check status (will show no index yet)
grepai status
❌ Problem: .grepai already exists ✅ Solution: Delete it first or edit existing config:
rm -rf .grepai && grepai init
❌ Problem: Config created but Ollama not running ✅ Solution: Start Ollama before running grepai watch:
ollama serve
❌ Problem: Wrong directory initialized ✅ Solution: Remove .grepai and init in correct directory
.grepai/ to .gitignore: Index is machine-specific# GrepAI
.grepai/
After successful initialization:
✅ GrepAI Initialized
Config: .grepai/config.yaml
Default settings:
- Embedder: Ollama (nomic-embed-text)
- Storage: GOB (local file)
- Chunking: 512 tokens, 50 overlap
Next steps:
1. Ensure Ollama is running: ollama serve
2. Start indexing: grepai watch
Weekly Installs
260
Repository
GitHub Stars
15
First Seen
Jan 28, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
opencode209
codex201
gemini-cli182
github-copilot182
kimi-cli170
claude-code170
React 组合模式指南:Vercel 组件架构最佳实践,提升代码可维护性
106,200 周安装
Google ADK 速查表 - Python ADK SDK API 参考与开发指南
1,500 周安装
GSAP插件使用指南:ScrollTo、Flip、Draggable等核心插件详解与注册教程
1,700 周安装
ADK 评估指南:AI 智能体评估、测试与优化全流程详解 | Google ADK 开发
1,400 周安装
统一语言工具:自动提取领域术语,创建规范术语表,提升团队沟通效率
1,600 周安装
OKX CEX 交易 CLI - 现货、合约、期权订单管理与自动化交易工具
1,600 周安装
last30days:AI研究助手,分析Reddit、X、YouTube等平台30天内热门话题趋势
1,600 周安装