npx skills add ...
npx skills add yoanbernabeu/grepai-skills --skill grepai-init
Initialize GrepAI in a project. Use this skill when setting up GrepAI for the first time in a codebase.
npx skills add yoanbernabeu/grepai-skills --skill grepai-init
This skill covers the grepai init command and project initialization.
grepai init createsRunning grepai init creates the .grepai/ directory with:
The generated config.yaml:
| 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:
For monorepos, init at the root:
Or use workspaces for separate indices:
If you need to reset:
Warning: This deletes your index. You'll need to re-run grepai watch.
After init, verify with:
❌ Problem: .grepai already exists
✅ Solution: Delete it first or edit existing config:
❌ Problem: Config created but Ollama not running
✅ Solution: Start Ollama before running grepai watch:
❌ Problem: Wrong directory initialized
✅ Solution: Remove .grepai and init in correct directory
.grepai/ to .gitignore: Index is machine-specificAfter successful initialization:
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
- buildembedder:
provider: openai
model: text-embedding-3-small
api_key: ${OPENAI_API_KEY}store:
backend: postgres
postgres:
dsn: postgres://user:pass@localhost:5432/grepaiignore:
- .git
- .grepai
- node_modules
- "*.min.js"
- "*.bundle.js"
- coverage/
- .nyc_output/cd /path/to/monorepo
grepai initgrepai workspace create my-workspace
grepai workspace add my-workspace /path/to/project1
grepai workspace add my-workspace /path/to/project2# Remove existing config
rm -rf .grepai
# Re-initialize
grepai init# Check config exists
cat .grepai/config.yaml
# Check status (will show no index yet)
grepai statusrm -rf .grepai && grepai initollama serve# GrepAI
.grepai/✅ 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