{"id":16488718,"url":"https://github.com/grongor/van-greph","last_synced_at":"2026-05-17T15:31:25.267Z","repository":{"id":45891337,"uuid":"432539228","full_name":"grongor/van-greph","owner":"grongor","description":"Script that colors the input text based on patterns you specify. Grep one-liner grown up the limits because of procrastination.","archived":false,"fork":false,"pushed_at":"2022-12-10T21:44:28.000Z","size":212,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-11T17:48:13.448Z","etag":null,"topics":["bash","color","colors","grep","highlight","highlighter","highlighting"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grongor.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}},"created_at":"2021-11-27T18:39:36.000Z","updated_at":"2022-04-29T10:17:22.000Z","dependencies_parsed_at":"2023-01-26T09:00:35.481Z","dependency_job_id":null,"html_url":"https://github.com/grongor/van-greph","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fvan-greph","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fvan-greph/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fvan-greph/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grongor%2Fvan-greph/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grongor","download_url":"https://codeload.github.com/grongor/van-greph/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241306451,"owners_count":19941303,"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","color","colors","grep","highlight","highlighter","highlighting"],"created_at":"2024-10-11T13:39:45.057Z","updated_at":"2025-10-25T18:31:47.965Z","avatar_url":"https://github.com/grongor.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# van-greph\n\n![CI](https://github.com/grongor/van-greph/workflows/CI/badge.svg)\n\nBash script that reads `stdin`, and based on the options given to it, matches and colors the input and outputs\nit to `stdout`. It doesn't filter anything, just adds colors. You may find it very handy when trying to find some\npatterns in large dataset.\n\n![](assets/example.png \"Usage example\")\n\n## Usage\n\nFirst, put it somewhere where you can execute it; somewhere in your `$PATH`.\n\nThen you can try something simple:\n```bash\nprintf \"hello\\nworld\\n\" | van-greph ll wo d\n```\n\nOr maybe infinite rainbow? Go for it:\n```bash\nbase64 \u003c/dev/urandom | van-greph --green 'a.*c' 'd.*f' --yellow '0.*5' --pink '6.*9'\n```\n\nTo find out all about this utility, you can run `van-greph --help`, and it will tell you everything:\n```\nUsage: van-greph [-z] [[OPTION]... FILTER]...\n\nColors text from standard input based on OPTION(s) per FILTER(s) and outputs to\nstandard output. Some of the options are directly mapped to the grep options.\n\nFILTER is a pattern to match. How exactly will the FILTER be used depends on\nthe given OPTION(s), it may be a simple string match (-F) or a match using\nregular expressions (one of -E and -G options).\n\nAvailable OPTION(s):\n\n  -E, --extended-regexp Next FILTER is extended regular expression\n  -F, --fixed-strings   Next FILTER is string\n  -G, --basic-regexp    Next FILTER is basic regular expression\n  -P, --perl-regexp     Next FILTER is Perl regular expression\n  -i, --ignore-case     Next FILTER will ignore case distinctions\n                        in pattern and data\n  -z, --null-data       A data line ends in 0 byte, not newline\n  -f, --file=FILE       For -f it treats next FILTER as a file from which to\n                        read the patterns, for --file it does the same thing\n                        but takes FILE directly (FILTER must be omitted)\n  -k, --keep-colors     Keeps colors present in the input data. Otherwise,\n                        the colors are reset before processing the input.\n  --bg, --background    Next matched FILTER will have its background colored\n                        instead of foreground as usual\n  --COLOR               Uses COLOR as a color for next FILTER (instead of\n                        choosing automatically).\n\n                        Available COLORs are:\n                        black cyan yellow blue red pink white green purple\n  --                    indicates the unambiguous end of options of next FILTER\n\nExamples:\n  # Color each name differently:\n  van-greph Jane John --black Batman \\\n      \u003c\u003c\u003c'One day, Jane met John and they saw Batman.'\n\n  # Infinite rainbow:\n  base64 \u003c/dev/urandom | \\\n      van-greph --green 'a.*c' 'd.*f' --yellow '0.*5' --pink '6.*9'\n\nWhy van-greph? Because this script can paint too :)\nThanks @simpod, great name suggestion!\n```\n\n## Caveats\n\n### Mac\n\nIf you are on Mac, you will probably need to do some magic like I did in the [CI](.github/workflows/ci.yaml) to get\nthis working, because I use some \"advanced\" features of bash/grep/sed, that ancient versions installed on Mac\nby default can't do.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrongor%2Fvan-greph","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrongor%2Fvan-greph","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrongor%2Fvan-greph/lists"}