AIPM
Theme

AIPM package

Mgrep Code Search

@intellectronica/mgrep-code-search@1.0.0

Semantic code search using mgrep for efficient codebase exploration.

Scanned · no issues · Oct 23, 2026

GitHub stars: ★ 297

LinkedInPost

Install Skill

Pins this version in aipm.package.json and aipm-lock.json.

aipm add @intellectronica/mgrep-code-search@1.0.0

Without project tracking

Writes the skill files only. Add --no-init to skip aipm.package.json and the lockfile.

aipm add @intellectronica/mgrep-code-search@1.0.0 --no-init

How to use

Install the skill above, then run this in your AI tool:

/mgrep-code-search <your description>

About

## Overview

Source

What gets added to your project

Preview every file this package writes on install before you run the command above.

Summary

Semantic code search using mgrep for efficient codebase exploration. This skill should be used when searching or exploring codebases with more than 30 non-gitignored files and/or nested directory structures.

Skill instructions

mgrep Code Search

Overview

mgrep is a semantic search tool that enables natural language queries across code, text, PDFs, and images. It is particularly effective for exploring larger or complex codebases where traditional pattern matching falls short.

When to Use This Skill

Use mgrep when:

  • The codebase contains more than 30 non-gitignored files
  • There are nested directory structures
  • Searching for concepts, features, or intent rather than exact strings
  • Exploring an unfamiliar codebase
  • Need to understand "where" or "how" something is implemented

Use traditional grep/ripgrep when:

  • Searching for exact patterns or symbols
  • Regex-based refactoring
  • Tracing specific function or variable names

Quick Start

Indexing

Before searching, start the watcher to index the repository:

bash
bunx @mixedbread/mgrep watch

The watch command indexes the repository and maintains synchronisation with file changes. It respects .gitignore and .mgrepignore patterns.

Searching

bash
bunx @mixedbread/mgrep "your natural language query" [path]

Search Commands

Basic Search

bash
bunx @mixedbread/mgrep "where is authentication configured?"
bunx @mixedbread/mgrep "how do we handle errors in API calls?" src/
bunx @mixedbread/mgrep "database connection setup" src/lib

Search Options

OptionDescription
-m <count>Maximum results (default: 10)
-c, --contentDisplay full result content
-a, --answerGenerate AI-powered synthesis of results
-s, --syncUpdate index before searching
--no-rerankDisable relevance optimisation

Examples with Options

bash
# Get more results
bunx @mixedbread/mgrep -m 25 "user authentication flow"

# Show full content of matches
bunx @mixedbread/mgrep -c "error handling patterns"

# Get an AI-synthesised answer
bunx @mixedbread/mgrep -a "how does the caching layer work?"

# Sync index before searching
bunx @mixedbread/mgrep -s "payment processing" src/services

Workflow

  1. Start watcher (once per session or when files change significantly):

    bash
    bunx @mixedbread/mgrep watch
    
  2. Search semantically:

    bash
    bunx @mixedbread/mgrep "what you're looking for" [optional/path]
    
  3. Refine as needed using path constraints or options:

    bash
    bunx @mixedbread/mgrep -m 20 -c "refined query" src/specific/directory
    

Environment Variables

Configure defaults via environment variables:

VariablePurpose
MGREP_MAX_COUNTDefault result limit
MGREP_CONTENTEnable content display (1/true)
MGREP_ANSWEREnable AI synthesis (1/true)
MGREP_SYNCPre-search sync (1/true)

Important Notes

  • Always use bunx @mixedbread/mgrep to run commands (not npm/npx or direct installation)
  • Run bunx @mixedbread/mgrep watch before searching to ensure the index is current
  • mgrep respects .gitignore patterns automatically
  • Create .mgrepignore for additional exclusions

Loading package files…

Share this package

Add an Install with AIPM badge

Add this badge to a GitHub README so readers can open the package page and install the same version.

Install with AIPM
[![Install with AIPM](https://www.aipm-registry.com/install-with-aipm.svg)](https://www.aipm-registry.com/skills/intellectronica/mgrep-code-search/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)

Publisher

Eleanor Berger

This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.

AI assistant context

What this skill is for

@intellectronica/mgrep-code-search@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: Semantic code search using mgrep for efficient codebase exploration. This skill should be used when searching or exploring codebases with more than 30 non-gitignored files and/or nested directory structures. It provides natural language...

Install
aipm add @intellectronica/mgrep-code-search@1.0.0
Use after install
/mgrep-code-search <your description>

Tool targets

Install command by target

Add --no-init to any of these when you want the skill files without aipm.package.json or aipm-lock.json.

cursor

Run this variant when you want to install the package into cursor.

aipm add @intellectronica/mgrep-code-search@1.0.0 --target cursor --ci

claude

Run this variant when you want to install the package into claude.

aipm add @intellectronica/mgrep-code-search@1.0.0 --target claude --ci

Discussion

Comments (0)

Loading comments…

Package FAQ

Install and compatibility

How to install
Run aipm add @intellectronica/mgrep-code-search@1.0.0 in a project that has AIPM initialized.
Supported tools
@intellectronica/mgrep-code-search@1.0.0 supports All tools.

Before installing

AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.