{"id":15203025,"url":"https://github.com/shockz-offsec/grepz","last_synced_at":"2025-10-29T00:30:33.152Z","repository":{"id":159441017,"uuid":"609861967","full_name":"shockz-offsec/Grepz","owner":"shockz-offsec","description":"Grepz is a versatile command-line tool for searching and highlighting specific terms or regex in a text file. Its customizable color options and ability to display lines before and after a match provide context, and it also offers a special reporting mode that highlights matches with a box.","archived":false,"fork":false,"pushed_at":"2023-05-04T19:21:39.000Z","size":36,"stargazers_count":15,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-01T20:11:28.666Z","etag":null,"topics":["bash","batch","cli","cmd","color","console","customizable","grep","grep-like","highlighting","powershell","quick","regex","reporting","search","terminal"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shockz-offsec.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-03-05T13:17:55.000Z","updated_at":"2024-11-08T15:01:05.000Z","dependencies_parsed_at":"2023-07-03T23:48:52.273Z","dependency_job_id":null,"html_url":"https://github.com/shockz-offsec/Grepz","commit_stats":{"total_commits":9,"total_committers":2,"mean_commits":4.5,"dds":0.2222222222222222,"last_synced_commit":"af3c1ea2447c71b0228f6a6de1aaccb655bb9f5a"},"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockz-offsec%2FGrepz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockz-offsec%2FGrepz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockz-offsec%2FGrepz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shockz-offsec%2FGrepz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shockz-offsec","download_url":"https://codeload.github.com/shockz-offsec/Grepz/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238743919,"owners_count":19523201,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","batch","cli","cmd","color","console","customizable","grep","grep-like","highlighting","powershell","quick","regex","reporting","search","terminal"],"created_at":"2024-09-28T04:22:16.939Z","updated_at":"2025-10-29T00:30:32.791Z","avatar_url":"https://github.com/shockz-offsec.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n  \u003ch1\u003eGrepz\u003c/h1\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/67438760/225127447-4b768322-ae62-46c8-be2c-8174cad7c739.png\" align=\"center\"\u003e\n\u003c/div\u003e\n\nGrepz is a versatile command-line tool that offers various options for searching and highlighting specific terms or regex in a text file. With its customizable color options, users can highlight matches with a chosen background or foreground color. Additionally, Grepz allows users to view the context of the match by displaying the lines before and after it.\n\nFor reporting purposes, Grepz offers a special mode that highlights matches with a box, making it easy to spot them in a text file. Whether you need to quickly search for a term or carefully review a document, Grepz is a powerful and flexible tool that can help you achieve your goals.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eInstallation\u003c/h2\u003e\n\u003c/div\u003e\n\nTo install Grepz, run the following command:\n\n```\ngo get github.com/shockz-offsec/grepz\n```\nor via building via repository\n```\ngit clone https://github.com/shockz-offsec/Grepz.git\ncd Grepz\ngo build -o grepz grepz.go\n```\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eDownload the compiled binary for Windows, Linux or MacOS\u003c/h2\u003e\n\u003c/div\u003e\n\n\n[Download the latest version](https://github.com/shockz-offsec/Grepz/releases)\n\n# \nPlease, if you are going to use powershell on Windows 10 you must:\n\nActivate Support VT (Virtual Terminal) / ANSI escape sequences globally by default, persistently.\n\n```powershell\nSet-ItemProperty HKCU:\\Console VirtualTerminalLevel -Type DWORD 1\n```\n\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eUsage\u003c/h2\u003e\n\u003c/div\u003e\n\n```\ngrepz [-i] [-box|-b] [-up num] [-down num] \u003csearch_term\u003e [\u003cinput_file\u003e]\n```\n\n* `-i`: Performs a case-insensitive search.\n* `-box` or `-b`: Highlights the matches inside a box.\n* `-up num`: Displays a specified number of lines before the match.\n* `-down num`: Displays a specified number of lines after the match.\n* `\u003csearch_term\u003e`: The term you want to search for. Regular expressions are accepted.\n* `\u003cinput_file\u003e`: The file in which you want to search. If this parameter is not provided, it is read from the standard input by pipping.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003eContext funtionality\u003c/h3\u003e\n\u003c/div\u003e\n\n#\n\nThe context functionality allows grouping in the same context several occurrences that are within the range specified by the `-up` or `-down` parameters. This will make it easier to understand and analyze them together. In case the occurrences are not in range, they will be shown in different contexts, but always accompanied by their respective context lines for a better understanding.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch3\u003eColors\u003c/h3\u003e\n\u003c/div\u003e\n\n#\n\nThe background and foreground colors can also be changed by using the `-bg` and `-fg` flags followed by one of the following colors: `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`, `black` or `pink`.\n\n* The default background color is `magenta` and the foreground color is `white`.\n\n* Box color is `red` by default.\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eExamples\u003c/h2\u003e\n\u003c/div\u003e\n\nSearch for the term `world` in the file `myfile.json`, using a case-insensitive search and highlight the match in `cyan`:\n\n```sh\ngrepz -i -bg cyan \"hello\" myfile.json\n```\n\n[![](https://asciinema.org/a/Ic8TQu5ZsthyYPbFMJfwCi5p6.svg)](https://asciinema.org/a/Ic8TQu5ZsthyYPbFMJfwCi5p6)\n\nSearch for the term `Hello` in the file `myfile.json`, display 3 lines before and after the match:\n\n```sh\ngrepz -up 3 -down 3 \"Hello\" myfile.json\n```\n\n[![](https://asciinema.org/a/2rjbKqRBlrHtBsYJTRdxGiVsJ.svg)](https://asciinema.org/a/2rjbKqRBlrHtBsYJTRdxGiVsJ)\n\nNow the same example but highlighting the match with a box:\n\n```sh\ngrepz -b -up 3 -down 3 \"Hello\" myfile.json\n```\n\n[![](https://asciinema.org/a/Olz4QnpNFofOfHha0di7FYfeb.svg)](https://asciinema.org/a/Olz4QnpNFofOfHha0di7FYfeb)\n\nSearch for the term `hello` in the `myfile.json` file, using a case-insensitive search, and highlight the match with a `yellow` box and `magenta` text:\n\n```sh\ngrepz -i -b -bg yellow -fg magenta \"hello\" myfile.json\n```\n\n[![](https://asciinema.org/a/uuUia0T9FzvTEQpE5axiRHzRP.svg)](https://asciinema.org/a/uuUia0T9FzvTEQpE5axiRHzRP)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eToDo\u003c/h2\u003e\n\u003c/div\u003e\n\n- [ ] Allow recursive searches in files\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eCredits\u003c/h2\u003e\n\u003c/div\u003e\n\n[Shockz OffSec](https://github.com/shockz-offsec) \u0026 [Siriil](https://github.com/siriil)\n\n\u003cdiv align=\"center\"\u003e\n  \u003ch2\u003eLicense\u003c/h2\u003e\n\u003c/div\u003e\n\nThis tool is licensed under the  GPL-3.0 License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshockz-offsec%2Fgrepz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshockz-offsec%2Fgrepz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshockz-offsec%2Fgrepz/lists"}