cgrep
« Back to VersTracker
Description:
Context-aware grep for source code
Type: Formula  |  Latest Version: 9.0.0@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: grep search developer-tools code-analysis command-line
Install: brew install cgrep
About:
cgrep is a command-line tool that provides context-aware searching capabilities for source code files. Unlike standard grep, it understands code structure and syntax, allowing for more precise matches based on language-specific patterns. It supports multiple programming languages and offers features like semantic search and regex matching tailored for developers.
Key Features:
  • Context-aware pattern matching that understands code syntax
  • Support for multiple programming languages including C, C++, Python, and Java
  • Semantic search capabilities beyond simple regex
  • Colorized output and integration with development workflows
  • Lightweight and fast performance
Use Cases:
  • Finding function definitions and usages across large codebases
  • Refactoring code by identifying specific patterns in context
  • Code review and analysis to understand program flow
  • Quick navigation in unfamiliar source code repositories
Alternatives:
  • grep – Standard grep lacks context-awareness and code structure understanding
  • ack – ack is optimized for code searching but cgrep offers more advanced semantic features
  • ripgrep – ripgrep is faster for simple searches but cgrep provides better code comprehension
License: GPL-2.0-or-later
Dependencies: gmp, pcre
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, sonoma, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Nov 9, 2025 1:41pm 0 VERSION_BUMP 02507784
Oct 10, 2025 12:15pm 0 VERSION_BUMP a6cf3644
Sep 13, 2025 10:00am 0 VERSION_BUMP 5919f920
Nov 17, 2024 8:34pm 0 VERSION_BUMP 078e7534