{"id":16835021,"url":"https://github.com/phillipj/gitlab-search","last_synced_at":"2025-04-04T22:05:14.988Z","repository":{"id":41322300,"uuid":"176035562","full_name":"phillipj/gitlab-search","owner":"phillipj","description":"Command line tool to search for contents in GitLab repositories","archived":false,"fork":false,"pushed_at":"2023-11-21T11:00:03.000Z","size":66,"stargazers_count":304,"open_issues_count":20,"forks_count":37,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-10-14T12:08:37.842Z","etag":null,"topics":["gitlab","reasonml"],"latest_commit_sha":null,"homepage":null,"language":"Reason","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/phillipj.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-03-16T23:27:25.000Z","updated_at":"2024-09-10T15:53:27.000Z","dependencies_parsed_at":"2024-06-20T07:21:32.203Z","dependency_job_id":null,"html_url":"https://github.com/phillipj/gitlab-search","commit_stats":{"total_commits":68,"total_committers":6,"mean_commits":"11.333333333333334","dds":0.1029411764705882,"last_synced_commit":"aba240bb58a358bfe879384303952b20542baa13"},"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillipj%2Fgitlab-search","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillipj%2Fgitlab-search/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillipj%2Fgitlab-search/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phillipj%2Fgitlab-search/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phillipj","download_url":"https://codeload.github.com/phillipj/gitlab-search/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247256110,"owners_count":20909240,"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":["gitlab","reasonml"],"created_at":"2024-10-13T12:08:44.347Z","updated_at":"2025-04-04T22:05:14.964Z","avatar_url":"https://github.com/phillipj.png","language":"Reason","readme":"# GitLab Search ![CI Build Status](https://github.com/phillipj/gitlab-search/workflows/CI/badge.svg)\n\nThis is a command line tool that allows you to search for contents across all your GitLab repositories.\nThat's something GitLab doesn't provide out of the box for non-enterprise users, but is extremely valuable\nwhen needed.\n\n## Prerequisites\n\n1. Install [Node.js](https://nodejs.org)\n2. Create a [personal GitLab access token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html#creating-a-personal-access-token) with the `read_api` scope.\n\n## Installation\n\n```\n$ npm install -g gitlab-search\n```\n\nTo finish the installation you need to configure the personal access token you've created previously:\n\n```\n$ gitlab-search setup \u003cyour personal access token\u003e\n```\n\nThat will create a `.gitlabsearchrc` file in the current directory. That configuration file can be placed\nin different places on your machine, valid locations are described in the [rc package's README](https://www.npmjs.com/package/rc#standards).\nYou can decide where that file is saved when invoking the setup command, see more details in its help:\n\n```\n$ gitlab-search setup --help\n```\n\n## Usage\n\nSearching through all the repositories you've got access to:\n\n```\n$ gitlab-search [options] [command] \u003csearch-term\u003e\n\nOptions:\n  -V, --version                            output the version number\n  -g, --groups \u003cgroup-names\u003e               group(s) to find repositories in (separated with comma)\n  -f, --filename \u003cfilename\u003e                only search for contents in given a file, glob matching with wildcards (*)\n  -e, --extension \u003cfile-extension\u003e         only search for contents in files with given extension\n  -p, --path \u003cpath\u003e                        only search in files in the given path\n  -a, --archive [all,only,exclude]         search only in archived projects, exclude archived projects, search in all projects (default is all)\n  -h, --help                               output usage information\n\nCommands:\n  setup [options] \u003cpersonal-access-token\u003e  create configuration file\n```\n\n## Use with Self-Managed GitLab\n\nTo search a self-hosted installation of GitLab, `setup` has options for, among other things, setting a custom domain:\n\n```\n$ gitlab-search setup --help\n\nUsage: setup [options] \u003cpersonal-access-token\u003e\n\ncreate configuration file\n\nOptions:\n  --ignore-ssl            ignore invalid SSL certificate from the GitLab API server\n  --api-domain \u003cname\u003e     domain name or root URL of GitLab API server,\n                          specify root URL (without trailing slash) to use HTTP instead of HTTPS (default: \"gitlab.com\")\n  --dir \u003cpath\u003e            path to directory to save configuration file in (default: \".\")\n  --concurrency \u003cnumber\u003e  limit the amount of concurrent HTTPS requests sent to GitLab when searching,\n                          useful when *many* projects are hosted on a small GitLab instance\n                          to avoid overwhelming the instance resulting in 502 errors (default: 25)\n  -h, --help              display help for command\n```\n\n## Debugging\n\nIf something seems fishy or you're just curious what `gitlab-search` does under the hood, enabling debug logging helps:\n\n```\n$ DEBUG=1 gitlab-search here-is-my-search-term\nRequesting: GET https://gitlab.com/api/v4/groups?per_page=100\nUsing groups: name-of-group1, name-of-group2\nRequesting: GET https://gitlab.com/api/v4/groups/42/projects?per_page=100\nRequesting: GET https://gitlab.com/api/v4/groups/1337/projects?per_page=100\nUsing projects: hello-world, my-awesome-website.com\nRequesting: GET https://gitlab.com/api/v4/projects/666/search?scope=blobs\u0026search=here-is-my-search-term\nRequesting: GET https://gitlab.com/api/v4/projects/999/search?scope=blobs\u0026search=here-is-my-search-term\n```\n\n## License\n\nMIT\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillipj%2Fgitlab-search","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphillipj%2Fgitlab-search","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphillipj%2Fgitlab-search/lists"}