Grep Tool - Search Inside Files with AI

Searches the contents of files for text patterns using ripgrep, a high-performance regex engine. Finds matching lines across multiple files, returning the file path, line number, and matching content. Uses smart-case (case-insensitive unless your pattern contains uppercase), respects .gitignore, and supports file type filtering and directory scoping.

What It Does

Searches the contents of files for text patterns using ripgrep, a high-performance regex engine. Finds matching lines across multiple files, returning the file path, line number, and matching content. Uses smart-case (case-insensitive unless your pattern contains uppercase), respects .gitignore, and supports file type filtering and directory scoping.

Why It Matters

When you need to find where a function is defined, track down an error message, locate a configuration value, or understand how a variable is used across a codebase - Grep is the tool. It gives the AI the ability to search through your code the way a developer would, but faster.

Example Prompts

Find everywhere we import the UserService class in this project
Search for any hardcoded API keys or secrets in the codebase
Find all TODO comments across all source files
Show me every file that references the DATABASE_URL environment variable
Find all functions that take more than 3 parameters in src/

Example Output

Grep: 'import.*UserService' in src/ Found 6 matches in 4 files: src/api/users.ts:3 import { UserService } from '../services/UserService' src/api/admin.ts:5 import { UserService } from '../services/UserService' src/tests/user.test.ts:2 import { UserService } from '../../services/UserService' ...

Safety & Control

Grep is a read-only search that only reads file contents for pattern matching - it doesn't modify any files. It requires your approval before searching. Results are limited to directories you've allowed in Chapeta's safety settings. Be mindful that search results may reveal sensitive content in files.

vs Other AI Apps

ChatGPT and Claude have no ability to search your codebase. You have to manually find relevant code and paste it into the conversation. Chapeta's Grep tool lets the AI search your files directly - it can find function definitions, trace variable usage, locate error messages, and understand codebases without you doing the legwork.

Start using Grep in Chapeta