James Webb is a CLI tool used for searching through repositories in a source control group or project. It supports both GitHub and GitLab platforms.
- Search through repositories or namespaces on GitHub and GitLab.
- Supports case-sensitive and case-insensitive searches.
- Displays search results with highlighted matching text.
- Configurable via environment variables and command-line options.
To install the required gems, run:
bundle installTo use the CLI tool, run the following command:
bin/webb --url <repository_or_namespace_url> <search_text>Search for "hello world" in a GitHub repository:
bin/webb --url https://github.com/emmaakachukwu/jameswebb 'hello world'Search for "Gitlab" in a GitLab namespace:
bin/webb --url https://gitlab.com/gitlab-org --type namespace 'GitLab'For more usage info, run:
bin/webb --helpYou can configure the tool using environment variables:
WEBB_GITHUB_TOKEN: GitHub personal access token.WEBB_GITHUB_USER: GitHub username or project name (default: JamesWebb).WEBB_GITHUB_ENDPOINT: GitHub API endpoint (default: https://api.github.com).WEBB_GITLAB_TOKEN: GitLab personal access token.WEBB_GITLAB_ENDPOINT: GitLab API endpoint (default: https://gitlab.com/api/v4).WEBB_PLATFORM: Platform to use for searching (eithergithuborgitlab). Can be auto inferred from theURLargument when possible. Can also be specified using the--platformflag.
To run the tests, use the following command:
bundle exec rspecTo run linting, use the following command:
bundle exec rubocopTo install the defined git hooks found in .githooks directory, run:
git config --local core.hooksPath .githooksPS: The above command only works on git versions >= 2.9.0;
check your git version by running git --version
Bug reports and pull requests are welcome on GitHub at https://github.com/emmaakachukwu/jameswebb.
- Handle processing of large repositories by using features like paginated responses
- Truncate lengthy lines especially in compiled files