GrepMadeBetter is a simple tool for phrase searching among files.
Note
The master branch contains the stable version of the project.
Current development is taking place on the dev branch.
Please switch to dev to access the latest features and updates.
GMB is a grep like CLI (command line interface) program, that searches for user-defined phrases in files. It supports text, markdown and python/c++ files as well as special formating of output. Additional information:
- compatible with Linux OS
- Polish language supported
The project follows a modular CLI architecture with clear separation of concerns.
The program is structured as a simple processing pipeline:
CLI input → ArgumentParser → Config → FileReader → SearchEngine → OutputFormatter → stdout
Responsible for parsing command-line arguments (argv) and building a Config object.
A lightweight data structure that stores all user-provided options, such as:
- search pattern
- file path
- flags (e.g. ignore case)
Reads input files and returns their content as a list of lines.
Implements the core search logic.
Formats and prints results in a grep-like output style.
- Single Responsibility Principle (each module has one responsibility)
- Separation of concerns (I/O, parsing, and search logic are separated)
- Stateless processing (data flows through the pipeline without global state)
- Dependency Injection (components receive data rather than creating dependencies internally)
To build the project
makeTo build and run the project:
make runIf no arguments are provided, the program displays the following help message:
$ gmb
This is a GMB tool, short for GrepMAdeBetter.
To search for phrase (or pattern) in a file simply write:
gmb <pattern> <filename>
Julia Rochatka @jrochatka (Dev) Dominik Cedro @dominikcedro (PO)