Skip to content
Skills Library
Programming · Automation

grepai-init

/grepai-init

Initialize GrepAI in a project. Use this skill when setting up GrepAI for the first time in a codebase.

Licence
MIT
Last repository change
30.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
1
Scripts
0
HTML comments
0
URLs in SKILL.md
2
Deprecation

No signals detected. Repository changed on 30.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

Initialize GrepAI in a project. Use this skill when setting up GrepAI for the first time in a codebase.

Original author description

Initialize GrepAI in a project. Use this skill when setting up GrepAI for the first time in a codebase.

How it works

  1. When to Use This Skill
  2. Basic Usage
  3. What Init Creates
  4. Default Configuration
  5. Understanding Default Settings
  6. Customizing After Init
  7. Init in Monorepos
  8. Re-Initialization
  9. Verifying Initialization
  10. Common Issues
Original SKILL.md headings · 259 lines, 632 words
SKILL.md preview
---
name: grepai-init
description: Initialize GrepAI in a project. Use this skill when setting up GrepAI for the first time in a codebase.
---

# GrepAI Init

This skill covers the `grepai init` command and project initialization.

## When to Use This Skill

- Setting up GrepAI in a new project
- Understanding what `grepai init` creates
- Customizing initial configuration
- Troubleshooting initialization issues

## Basic Usage

```bash
cd /path/to/your/project
grepai init
```

## What Init Creates

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)
```

## Default Configuration

The generated `config.yaml`:

```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:
  enabled_languages:
    - .go
    - .js
    - .ts
    - .jsx
    - .tsx
    - .vue
    - .py
    - .php
    - .lua
    - .gd
    - .rb
    - .c
    - .h
    - .cpp
    - .hpp
    - .cc
    - .cxx
    - .hxx
    - .rs
    - .zig
    - .cs
    - .java
    - .fs
    - .fsx
    - .fsi
    - .pas
    - .dpr

ignore:
  - .git
  - .grepai
  - node_modules
  - vendor
  - target
  - __pycache__
  - dist
  - build
```

## Understanding Default Settings

### Embedder Settings

| Setting | Default | Purpose |
|---------|---------|---------|
| `provider` | `ollama` | Local embedding generation |
| `model` | `nomic-embed-text` | 768-dimension model |
| `endpoint` | `http://localhost:11434` | Ollama API URL |

### Store Settings

| Setting | Default | Purpose |
|---------|---------|---------|
| `backend` | `gob` | Local file storage |

### Chunking Settings

| Setting | Default | Purpose |
|---------|---------|---------|
| `size` | `512` | Tokens per chunk |
| `overlap` | `50` | Overlap for context |

### Watch Settings

| Setting | Default | Purpose |
|---------|---------|---------|
| `debounce_ms` | `500` | Wait time before re-indexing |

### Ignore Patterns

Default patterns exclude:
- Version control: `.git`
- GrepAI data: `.grepai`
- Dependencies: `node_modules`, `vendor`
- Build outputs: `target`, `dist`, `build`
- Cache: `__pycache__`

## Customizing After Init

Edit `.grepai/config.yaml` to customize:

### Change Embedding Provider

```yaml
embedder:
  provider: openai
  model: text-embedding-3-small
  # no api_key: read from OPENAI_API_KEY (official endpoint only)
```

### Change Storage Backend

```yaml
store:
  backend: postgres
  postgres:
    dsn: postgres://user:pass@localhost:5432/grepai
```

### Add Custom Ignore Patterns

```yaml
ignore:
  - .git
  - .grepai
  - node_modules
  - "*.min.js"
  - "*.bundle.js"
  - coverage/
  - .nyc_output/
```

## Init in Monorepos

For monorepos, init at the root:

```bash
cd /path/to/monorepo
grepai init
```

Or use workspaces for separate indices:

```bash
grepai workspace create my-workspace
grepai workspace add my-workspace /path/to/project1
grepai workspace add my-workspace /path/to/project2
```

## Re-Initialization

If you need to reset:

```bash
# Remove existing config
rm -rf .grepai

# Re-initialize
grepai init
```

**Warning:** This deletes your index. You'll need to re-run `grepai watch`.

## Verifying Initialization

After init, verify with:

```bash
# Check config exists
cat .grepai/config.yaml

# Check status (will show no index yet)
grepai status
```

## Common Issues

❌ **Problem:** `.grepai` already exists
✅ **Solution:** Delete it first or edit existing config:
```bash
rm -rf .grepai && grepai init
```

❌ **Problem:** Config created but Ollama not running
✅ **Solution:** Start Ollama before running `grepai watch`:
```bash
ollama serve
```

❌ **Problem:** Wrong directory initialized
✅ **Solution:** Remove `.grepai` and init in correct directory

## Best Practices

1. **Init at project root:** Where your main code lives
2. **Add `.grepai/` to `.gitignore`:** Index is machine-specific
3. **Customize ignore patterns:** Exclude generated/vendored code
4. **Review config after init:** Adjust for your stack

## Example .gitignore Addition

```gitignore
# GrepAI
.grepai/
```

## Output Format

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
```

Versions

The database has no other skills named grepai-init.

Database snapshot: 13.11.2026 · package version 2b00027fad86 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 95grepai-troubleshooting
    Troubleshooting guide for GrepAI. Use this skill to diagnose and fix common issues.
  • 100grepai-config-reference
    Complete configuration reference for GrepAI. Use this skill when you need to understand all available configuration options.
  • 100grepai-repo-setup
    Set up or diagnose GrepAI for one Git repository in an existing shared workspace. Use when the user asks to onboard a repository, check project registration and search, or diagnose provider, index, or MCP versus CLI access errors.
  • 100greppy-workspace
    Set up, diagnose, or maintain cross-repository code reuse with shared local GrepAI search and optional source-backed Karakeep records. Use when the user asks for a shared code-search workspace, automatic repository discovery, or bounded reuse-record maintenance. Not for…
  • 100grepai
    Semantic code search and call-graph tracing. Use for intent questions ('where is authentication handled?'), exploring unfamiliar code, or tracing callers/callees — as a ranking layer on top of exact-match Grep, not a replacement for it.
  • 100phx-init
    Initialize plugin in a project — install Iron Laws, auto-activation; Use when setting up or updating the plugin.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.