CLI · Repository search · Andrew Gallant and contributors
ripgrep
Search code and text from the terminal, with explicit control over ignored files, hidden files, regular expressions and output format.
Excluded files create blind spots. Default search skips hidden, ignored and binary content in the tested fixture. A clean result is meaningful only for the scope actually searched.
Understand the tool
What it does.
ripgrep is the rg command: a recursive text search tool that understands common ignore files and can restrict searches by file type or pattern. It returns matching lines or filenames, which makes it useful for finding a symbol, checking a migration or giving another tool a precise set of files.
Why use it?
Use it when the first task is locating evidence in a repository. A small search rooted in the right directory is easy to inspect and repeat. Its default exclusions keep ordinary searches focused, but they also mean that an empty result does not prove a string is absent from every file.
A useful fit for
- Finding code references
- Checking a renamed setting
- Building a bounded list of files to inspect
From need to output
Ways to put it to work.
These are suggested workflows based on the documented capabilities. They are not recorded runtime results.
Use case 01
Locate a configuration setting
A setting is changing and a developer needs to find where it is read.
- Start in the intended repository and search the exact setting name.
- Limit the file types or directories when the results are too broad.
- Inspect each relevant match before proposing a replacement.
Intended outputA traceable list of references for a focused change.
Use case 02
Check a migration for leftovers
A deprecated identifier should disappear from maintained source files.
- Define which directories and generated files belong in the check.
- Search with a fixed string and record the exit status.
- Explicitly include hidden or ignored files only when the scope calls for them.
Intended outputA repeatable check with clear coverage boundaries.
A concrete starting point
Find TODO markers in Python source
Searches Python files under src and includes line numbers. The example is illustrative and was not executed in the fixture suite.
rg --line-number --fixed-strings --glob '*.py' 'TODO' src/What this can change
Reads matching source files and prints their contents. Normal search does not rewrite files; output may include private code or values.
This example has not been executed for this review. Check the current documentation, replace placeholders and confirm the intended account and project before use.
Before you start
Setup and access.
What you’ll need
- An installed rg binary
- Read access to the chosen directory
- A defined search scope and a literal string or regular expression
- Authentication
- No account is required for local search; operating-system file permissions govern access.
- Can read
- Files in the selected paths after ignore and type rules
- Ignore rules and optional configuration
- Can write or change
- Search output; surrounding shell redirection can write result files
- Network and data flow
- No service is required for ordinary local search
- Approval and control
- Search scope is controlled by flags and configuration. Broadening it with --hidden or --no-ignore can expose files intentionally excluded from normal work.
Check your environment
Compatibility, costs and license.
Compatibility notes
- Windows, macOS and Linux
- Default regex engine plus optional PCRE2 support in suitable builds
Costs and account requirements
The CLI is freely available under its published open-source license choice.
Current pricing or plan information ↗MIT OR Unlicense
Users may choose either license as described by the project.
Read the license or service terms ↗Keep the boundaries visible
Concerns and limitations.
Excluded files create blind spots
Default search skips hidden, ignored and binary content in the tested fixture. A clean result is meaningful only for the scope actually searched.
Search output can reveal secrets
Expanded searches may include local configuration, credentials or copied data. Restrict paths and review output before sharing it.
Where it may fall short
- ripgrep searches text; it does not establish whether code is reachable or a secret is valid.
- Regex options and encoding assumptions can change results; no speed comparison was measured here.
Observed behavior · 2026-10-18
Runtime and security findings.
Default search returned only the visible text file. Explicit flags included hidden and ignored files, and --text enabled the binary fixture. Invalid regex and no-match results had different exit codes.
These checks cover the conditions below. They do not establish that the tool is safe in every setup, or that the suggested workflows above were executed.
What we found
Observed in this evaluation · low severity under stated conditions
Search coverage changes with flags
The default fixture search returned one file. --hidden --no-ignore returned three text files, and a separate --text command found the binary fixture. A default no-match result cannot establish absence across those excluded files.
In practice: Record the intended paths and exclusion rules alongside any migration or audit claim.
Documented concern · medium severity under stated conditions
Broader search can reveal excluded material
Hidden and ignore rules commonly exclude local configuration and generated content. Overriding them expands what can appear in search output, even though ordinary search does not rewrite files.
In practice: Broaden scope deliberately and review results before copying them into shared logs or model context.
Version, environment and fixture
- Version or deployment
- 15.2.0 (rev e89fff89ac); PCRE2 10.45
- Tested target
- https://github.com/BurntSushi/ripgrep/releases/download/15.2.0/ripgrep-15.2.0-x86_64-pc-windows-msvc.zip
- Artifact identity
- SHA-256 71b2fef860abe467217a538ff31de02f5258807c0129f771846f87bd029aafc5 of the downloaded ZIP archive. Recorded to identify the tested artifact; no independent signature or provenance audit was performed.
- Environment and fixture
- Windows 11 x64; Python 3.12.10 harness. Raw timestamps use UTC.
- Fresh per-tool home, config, cache and temporary directories. Child environments used allowlisted OS/runtime paths without inherited account credentials. Only synthetic local files were used.
- Configuration isolation is a test control, not an operating-system sandbox.
Checks and results
6 recorded checks. Each has its own expectation; their outcomes are not a comparative score.
Pinned binary versionMet expectation
- Method
Command argument array: ["rg", "--version"].- Expected
- Print ripgrep version and engine details.
- Observed
- Exit 0. ripgrep 15.2.0 (rev e89fff89ac) features:+pcre2 simd(compile):+SSE2,-SSSE3,-AVX2 simd(runtime):+SSE2,+SSSE3,+AVX2 PCRE2 10.45 is available (JIT is available)
Default search exclusionsMet expectation
- Method
Create visible.txt="needle visible\n", ignored.txt="needle ignored\n", .hidden.txt="needle hidden\n", .ignore="ignored.txt\n", and binary.bin with bytes 00 followed by UTF-8 "needle binary\n". Escape sequences here describe newline and NUL bytes. Command argument array: ["rg", "--no-config", "--files-with-matches", "needle", "."].- Expected
- Return only visible.txt.
- Observed
- Exit 0. .\visible.txt
Explicit hidden and ignored filesMet expectation
- Method
Create visible.txt="needle visible\n", ignored.txt="needle ignored\n", .hidden.txt="needle hidden\n", .ignore="ignored.txt\n", and binary.bin with bytes 00 followed by UTF-8 "needle binary\n". Escape sequences here describe newline and NUL bytes. Command argument array: ["rg", "--no-config", "--hidden", "--no-ignore", "--files-with-matches", "needle", "."].- Expected
- Return visible.txt, ignored.txt and .hidden.txt; keep binary content excluded.
- Observed
- Exit 0. .\.hidden.txt .\ignored.txt .\visible.txt
Explicit binary-as-text searchMet expectation
- Method
Create visible.txt="needle visible\n", ignored.txt="needle ignored\n", .hidden.txt="needle hidden\n", .ignore="ignored.txt\n", and binary.bin with bytes 00 followed by UTF-8 "needle binary\n". Escape sequences here describe newline and NUL bytes. Command argument array: ["rg", "--no-config", "--text", "--files-with-matches", "needle", "binary.bin"].- Expected
- Return binary.bin when --text is specified.
- Observed
- Exit 0. binary.bin
Reject an incomplete regexMet expectation
- Method
Create visible.txt="needle visible\n", ignored.txt="needle ignored\n", .hidden.txt="needle hidden\n", .ignore="ignored.txt\n", and binary.bin with bytes 00 followed by UTF-8 "needle binary\n". Escape sequences here describe newline and NUL bytes. Command argument array: ["rg", "--no-config", "[", "visible.txt"].- Expected
- Return exit 2 and an unclosed-character-class error.
- Observed
- Exit 2. rg: regex parse error: (?:[) ^ error: unclosed character class
Distinguish no match from errorMet expectation
- Method
Create visible.txt="needle visible\n", ignored.txt="needle ignored\n", .hidden.txt="needle hidden\n", .ignore="ignored.txt\n", and binary.bin with bytes 00 followed by UTF-8 "needle binary\n". Escape sequences here describe newline and NUL bytes. Command argument array: ["rg", "--no-config", "absent", "visible.txt"].- Expected
- Return exit 1 without matches.
- Observed
- Exit 1. Standard output and standard error were empty.
Practical caveats
- --no-config prevented user ripgrep settings from changing these checks. The fixture used .ignore, not a real repository.
- These are behavior checks on tiny files, not a search-speed benchmark or a secret-detection assessment.
What this evaluation does not establish
- Large repositories, performance, adversarial regular expressions, PCRE2 behavior, symlinks and external preprocessors.
- Completeness of any real secret scan or production search; only the named synthetic file classes were exercised.
Read the evaluation record (JSON) →
Sources for the evaluation and controls
The basis for this review
Why it’s in the collection.
Adds repository search alongside JSON processing: a practical way to locate evidence before an agent or developer edits code. Its inclusion rests on a distinct daily task, not a measured speed advantage. The original catalog order is preserved; this is an editorial position, not a measured adoption or security rank.
The number is an editorial starting order within the cli tools collection. It does not measure popularity, speed, reliability or safety.
Why we added it
Adds repository and text search with useful ignore-file and hidden-file boundaries that can be tested locally.
Selection evidence checked .
- Repository interest
- 69,223 GitHub stars at this snapshot ↗
Interest in the source repository; not a count of verified users or installations.
- Repository activity
- Last push reported by GitHub: . A push can include documentation or maintenance; it does not establish a new stable release.
- Release signal
- 15.2.0 ↗ · published . This selection signal can differ from the exact runtime tested above.
- A single dated repository-interest/release snapshot; not measured adoption, growth, effectiveness or security.
- Repository interest and release activity do not establish reliability, model quality or safety. The evaluation names the exact version and conditions tested.
What we reviewed
- Official documentation, repository, license and release identity
- Practical access boundaries and a separate bounded runtime evaluation
The evaluation above lists the current runtime coverage and untested behavior.
Reviewed Oct 18, 2026. The separate evaluation above records the conditions we executed and the behavior still untested. Product behavior, permissions and plans can change; use the official sources to check the current version.
Follow the evidence
Official sources.
- ripgrep repository and defaults ↗github.com
- User guide and search scope ↗github.com
- License choice ↗github.com
- Evaluated 15.2.0 release ↗github.com