{"id":26326292,"url":"https://github.com/harehare/rbgrep","last_synced_at":"2026-05-03T20:39:45.364Z","repository":{"id":160975822,"uuid":"635350627","full_name":"harehare/rbgrep","owner":"harehare","description":"rbgrep is a AST-based line-oriented search cli tool that recursively searches ruby files in the current directory for a regex patterns.","archived":false,"fork":false,"pushed_at":"2024-12-02T22:46:52.000Z","size":200,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-18T09:36:01.365Z","etag":null,"topics":["ast","command-line","command-line-tool","grep","ruby","rust","search"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/harehare.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-02T14:03:20.000Z","updated_at":"2024-11-09T12:31:45.000Z","dependencies_parsed_at":"2025-03-15T19:47:15.868Z","dependency_job_id":null,"html_url":"https://github.com/harehare/rbgrep","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/harehare/rbgrep","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Frbgrep","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Frbgrep/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Frbgrep/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Frbgrep/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harehare","download_url":"https://codeload.github.com/harehare/rbgrep/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Frbgrep/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32584646,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["ast","command-line","command-line-tool","grep","ruby","rust","search"],"created_at":"2025-03-15T19:36:19.064Z","updated_at":"2026-05-03T20:39:44.606Z","avatar_url":"https://github.com/harehare.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rbgrep\n\n![test](https://github.com/harehare/rbgrep/actions/workflows/test.yml/badge.svg)\n[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENSE)\n\nrbgrep is a AST-based line-oriented search cli tool that recursively searches **ruby files** in the current directory for a regex patterns.\n\n### Screenshot of search results\n\n![A screenshot of a sample search with rbgrep](assets/rbgrep.png)\n\n## Install\n\n```bash\ncargo install --git https://github.com/harehare/rbgrep.git\n```\n\n### Manually\n\n```\ngit clone https://github.com/harehare/rbgrep.git\ncd rbgrep\ncargo run\n```\n\n## Usage\n\n```bash\nUsage: rbgrep [OPTIONS] \u003cQUERY\u003e [STDIN]\n\nArguments:\n  \u003cQUERY\u003e\n  [STDIN]\n\nOptions:\n  -c, --count\n          Only print the count of individual matches for each file\n  -i, --ignore-case\n          Case insensitive search\n  -m, --exact-match\n          Exact match Search\n  -., --hidden\n          Search hidden files and directory\n  -e, --regexp\n          Regex pattern search\n      --exclude \u003cEXCLUDE\u003e\n          If specified, it excludes files or directories matching the given filename pattern from the search\n  -S, --start-pattern \u003cSTART_PATTERN\u003e\n          AST start pattern to match [possible values: alias, and, and-asgn, arg, args, array, array-pattern, array-pattern-with-tail, back-ref, begin, block, block-pass, blockarg, break, c-send, case, case-match, casgn, cbase, class, complex, const, const-pattern, cvar, cvasgn, def, defined, defs, dstr, dsym, e-flip-flop, empty-else, encoding, ensure, erange, false, file, find-pattern, float, for, forward-arg, forwarded-args, gvar, gvasgn, hash, hash-pattern, heredoc, i-flip-flop, if, if-guard, if-mod, if-ternary, in-pattern, index, index-asgn, int, irange, ivar, ivasgn, kw-begin, kwarg, kwargs, kwnilarg, kwoptarg, kwrestarg, kwsplat, lambda, line, lvar, lvasgn, masgn, match-alt, match-as, match-current-line, match-nil-pattern, match-pattern, match-pattern-p, match-rest, match-var, match-with-lvasgn, mlhs, module, next, nil, nth-ref, numblock, op-asgn, optarg, or, or-asgn, pair, pin, postexe, preexe, procarg0, rational, redo, reg-opt, regexp, rescue, rescue-body, restarg, retry, return, s-class, self, send, shadowarg, splat, str, super, sym, true, undef, unless-guard, until, until-post, when, while, while-post, x-heredoc, xstr, yield, z-super]\n  -E, --end-pattern \u003cEND_PATTERN\u003e\n          AST end pattern to match [possible values: alias, and, and-asgn, arg, args, array, array-pattern, array-pattern-with-tail, back-ref, begin, block, block-pass, blockarg, break, c-send, case, case-match, casgn, cbase, class, complex, const, const-pattern, cvar, cvasgn, def, defined, defs, dstr, dsym, e-flip-flop, empty-else, encoding, ensure, erange, false, file, find-pattern, float, for, forward-arg, forwarded-args, gvar, gvasgn, hash, hash-pattern, heredoc, i-flip-flop, if, if-guard, if-mod, if-ternary, in-pattern, index, index-asgn, int, irange, ivar, ivasgn, kw-begin, kwarg, kwargs, kwnilarg, kwoptarg, kwrestarg, kwsplat, lambda, line, lvar, lvasgn, masgn, match-alt, match-as, match-current-line, match-nil-pattern, match-pattern, match-pattern-p, match-rest, match-var, match-with-lvasgn, mlhs, module, next, nil, nth-ref, numblock, op-asgn, optarg, or, or-asgn, pair, pin, postexe, preexe, procarg0, rational, redo, reg-opt, regexp, rescue, rescue-body, restarg, retry, return, s-class, self, send, shadowarg, splat, str, super, sym, true, undef, unless-guard, until, until-post, when, while, while-post, x-heredoc, xstr, yield, z-super]\n  -P, --pattern \u003cPATTERN\u003e\n          AST pattern to match [possible values: alias, and, and-asgn, arg, args, array, array-pattern, array-pattern-with-tail, back-ref, begin, block, block-pass, blockarg, break, c-send, case, case-match, casgn, cbase, class, complex, const, const-pattern, cvar, cvasgn, def, defined, defs, dstr, dsym, e-flip-flop, empty-else, encoding, ensure, erange, false, file, find-pattern, float, for, forward-arg, forwarded-args, gvar, gvasgn, hash, hash-pattern, heredoc, i-flip-flop, if, if-guard, if-mod, if-ternary, in-pattern, index, index-asgn, int, irange, ivar, ivasgn, kw-begin, kwarg, kwargs, kwnilarg, kwoptarg, kwrestarg, kwsplat, lambda, line, lvar, lvasgn, masgn, match-alt, match-as, match-current-line, match-nil-pattern, match-pattern, match-pattern-p, match-rest, match-var, match-with-lvasgn, mlhs, module, next, nil, nth-ref, numblock, op-asgn, optarg, or, or-asgn, pair, pin, postexe, preexe, procarg0, rational, redo, reg-opt, regexp, rescue, rescue-body, restarg, retry, return, s-class, self, send, shadowarg, splat, str, super, sym, true, undef, unless-guard, until, until-post, when, while, while-post, x-heredoc, xstr, yield, z-super]\n      --no-git-ignore\n          Don't respect .gitignore files\n  -N, --no-file-name\n          Never print the file path with the matched lines\n      --no-line-no\n          Never print the line number with the matched lines\n      --no-color\n          Not colored the output results\n  -o, --only-matching\n          Print only matched parts of a line\n  -C, --context \u003cCONTEXT\u003e\n          Show lines before and after each match\n  -A, --after-context \u003cAFTER_CONTEXT\u003e\n          Show lines before each match\n  -B, --before-context \u003cBEFORE_CONTEXT\u003e\n          Show lines before each match\n      --context-separator \u003cCONTEXT_SEPARATOR\u003e\n          The string used to separate\n      --with-nodes\n          Print nodes with the matched lines\n      --with-warning\n          Print warning after parse of ruby file\n      --threads \u003cTHREADS\u003e\n          Number of grep worker threads to use\n      --max-depth \u003cMAX_DEPTH\u003e\n          The maximum depth to recurse\n      --json\n          Show search results in a JSON format\n      --csv\n          Show search results in a CSV format\n      --csv-delimiter \u003cCSV_DELIMITER\u003e\n          Specify the CSV delimiter\n      --tsv\n          Show search results in a TSV format\n  -q, --quiet\n          Do not output matched lines. instead, exit with status 0 when there is a match and with non-zero status when there isn’t\n  -p, --path \u003cPATH\u003e\n          Searches for specified files and directories\n  -h, --help\n          Print help\n  -V, --version\n          Print version\n```\n\n## Command line usage example\n\n### Example\n\n```rb\n$ rbgrep -S begin -E hash -E pair -E sym title\n./example.rb:7     article = {title: title, content: content, published_on: Time.now}\n```\n\n```rb\n$ rbgrep -S begin -E index -E sym title\n./example.rb:14       puts \"Title: #{article[:title]}\"\n```\n\n```rb\n$ cat example.rb | rbgrep -S begin -E index -E sym title -\n:14       puts \"Title: #{article[:title]}\"\n```\n\n```rb\n$ rbgrep -S begin -E index -E sym -p example.rb -p example2.rb title\n:14       puts \"Title: #{article[:title]}\"\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharehare%2Frbgrep","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharehare%2Frbgrep","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharehare%2Frbgrep/lists"}