ripgrep

Search text patterns recursively across codebases with regex and ignore rules.

1|1|Updated Apr 9, 2024
One-click install
npx skills add https://github.com/navikt/helved-utbetaling --skill ripgrep-navikt
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: ripgrep
Source: https://github.com/navikt/helved-utbetaling/tree/main/.agents/skills/ripgrep
Command: npx skills add https://github.com/navikt/helved-utbetaling --skill ripgrep-navikt

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Ripgrep quickly finds text patterns across large codebases and documents, outperforming traditional grep and ignoring ignored files by default, saving time during code reviews, debugging, and document analysis.

Core Features & Use Cases

  • Fast recursive search across directories with regex support and respect for .gitignore.
  • Flexible filtering by file type and patterns, support for multiline search with -U, and fast scanning of large files.
  • Use case: Locate occurrences of a function, error message, or configuration setting across an entire project, including code, docs, and logs.

Quick Start

Search your project with rg 'pattern' to quickly locate all matching lines across files.

Frequently Asked Questions about ripgrep

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I search for a text pattern across a large codebase while respecting .gitignore rules?

Ripgrep performs fast recursive search across directories using regex support and automatically respects .gitignore rules. It outperforms traditional grep by skipping ignored files, saving time during code reviews, debugging, and document analysis.

What is the best way to search for multiline text patterns in code and documents?

Ripgrep supports flexible filtering by file type and patterns, including multiline search with the -U option. This allows you to efficiently locate complex text sequences spanning multiple lines across large codebases and documents.

Can I filter text search results by specific file types and use case-insensitive matching?

Yes, ripgrep provides flexible filtering by file type and patterns, along with support for case-insensitive search. These options allow you to target specific files and match patterns precisely across your project.

Does ripgrep outperform traditional grep when scanning large files for regex patterns?

Ripgrep quickly finds text patterns across large codebases and documents, outperforming traditional grep. It is optimized for fast recursive searching and full-text matching, efficiently scanning large files to locate functions, error messages, or configuration settings.

How do I locate an error message or configuration setting across an entire project?

Run ripgrep with your search pattern to quickly locate all matching lines across files. It efficiently scans code, docs, and logs to find occurrences of functions, error messages, or configuration settings across the entire project.