{"id":15472595,"url":"https://github.com/sirbrillig/grepdef","last_synced_at":"2025-04-22T13:46:41.715Z","repository":{"id":39633924,"uuid":"201687497","full_name":"sirbrillig/grepdef","owner":"sirbrillig","description":"grepdef: search for symbol definitions in various programming languages","archived":false,"fork":false,"pushed_at":"2025-04-13T22:12:05.000Z","size":326,"stargazers_count":8,"open_issues_count":0,"forks_count":3,"subscribers_count":1,"default_branch":"trunk","last_synced_at":"2025-04-13T22:16:14.961Z","etag":null,"topics":["grep","ripgrep"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/sirbrillig.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-08-10T22:03:20.000Z","updated_at":"2025-04-13T22:12:06.000Z","dependencies_parsed_at":"2023-02-06T08:02:27.534Z","dependency_job_id":"f932a069-93fa-44b3-ab53-095b2d4a382a","html_url":"https://github.com/sirbrillig/grepdef","commit_stats":{"total_commits":110,"total_committers":2,"mean_commits":55.0,"dds":"0.18181818181818177","last_synced_commit":"ae02211fd86b4e7bc2fcecf8494f9e7bab85c03e"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirbrillig%2Fgrepdef","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirbrillig%2Fgrepdef/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirbrillig%2Fgrepdef/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sirbrillig%2Fgrepdef/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sirbrillig","download_url":"https://codeload.github.com/sirbrillig/grepdef/tar.gz/refs/heads/trunk","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250251327,"owners_count":21399800,"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":["grep","ripgrep"],"created_at":"2024-10-02T02:40:22.758Z","updated_at":"2025-04-22T13:46:41.707Z","avatar_url":"https://github.com/sirbrillig.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grepdef\n\nA fast command-line tool to search for the definitions of functions, classes, structs, etc. in various programming languages.\n\nUsage: grepdef [options] \u0026lt;symbol\u0026gt; [path(s)]\n\nThe **symbol** is the full string name of a class, function, struct, or similar construct.\n\nThe **path** is a relative or absolute file path to a file or a directory or a space-separated series of such paths. You can also use UNIX globs which the shell will turn into paths.\n\nIf a search path is not provided, this will search starting from the current directory.\n\nYou should use the `--type` option whenever possible, but grepdef will try to guess the type if it is not set.\n\nThe output is like using grep, but will only show places where that symbol is defined (no partial matches, variable uses, or function calls). The search uses a regular expression so it is unaware of scope and is far from fullproof, but should be easier and faster than a grep by itself.\n\n\u003e [!IMPORTANT]\n\u003e grepdef version 3 is a complete rewrite changing from Node to Rust to make it more efficient and to remove the need to have node and ripgrep installed separately.\n\nSince version 3.0.0, grepdef can also be used as a rust library crate for other rust programs. See [the docs](https://docs.rs/grepdef/latest/grepdef/) for details.\n\n## CLI Options\n\n-t, --type \u0026lt;TYPE\u0026gt;\n\nThe type is a vim-compatible filetype. One of 'js', 'php', 'rs', or an alias for those strings (eg: 'javascript.jsx'). TypeScript is currently considered part of JavaScript so a type of 'typescript' is equivalent to 'js'.\n\nIf the type is not provided, grepdef will try to guess the filetype, but this may be inaccurate.\n\n-n, --line-number\n\nInclude the line numbers of matches (equivalent to the grep or rg option).\n\n--no-color\n\nDisable colors in output (color is always disabled if not printing to STDOUT).\n\n-h, --help\n\nPrint help and usage text.\n\n-V, --version\n\nPrint version information.\n\n## Example\n\n```\n$ grepdef --type js -n parseQuery\n./test/fixtures/js/db.js:7:function parseQuery() {\n```\n\n## Installing\n\nTo upgrade from version 1 or 2, first you'll need to uninstall the old version using the following command:\n\n```\nnpm uninstall -g @sirbrillig/grepdef\n```\n\nYou can install grepdef with [cargo](https://doc.rust-lang.org/cargo/getting-started/installation.html) by running:\n\n```\ncargo install grepdef\n```\n\nAlternatively, you can download the executable manually from the [Releases page](https://github.com/sirbrillig/grepdef/releases) and install it however you like.\n\n## Using with editors\n\n- vim: See [vim-grepdef](https://github.com/sirbrillig/vim-grepdef)\n- VS Code: See [vscode-grepdef](https://github.com/sirbrillig/vscode-grepdef)\n\n## Development\n\nReleases are performed by using [cargo-dist](https://opensource.axo.dev/cargo-dist/). Tag a release and push it to GitHub to do everything.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirbrillig%2Fgrepdef","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirbrillig%2Fgrepdef","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirbrillig%2Fgrepdef/lists"}