Skip to content

jamesnguyen46/git-search-command

Repository files navigation

GIT SEARCH COMMAND

PyPI Last commit Coverage Github Action License

A simple tool to search the content in your GitLab project or GitHub repositories.

This project has been implemented for PERSONAL USE. If you want more advanced features like creating issue, pull request ... may be refer to use GLab or GitHub CLI

If this project is helpful for you, show your love ❤️ by putting a ⭐ on this project 😉.

Prerequisites

  1. Install Python3.7+.
  2. Create a personal access token on GitLab or GitHub.

Installation

python -m pip install --upgrade pip
python -m pip install git-search-command

Usage

Environment

After finishing the installation you need to create new environment for searching

gsc gl env --new <environment_name>

Then input your host name and personal token as following

gsc_setup_env

Search in GitLab

Default is to search all projects that you owned.

gsc gl search <keywork>

gsc_gl_search

Search in a specific project

gsc gl search <keywork> --project <project_id>

Search in a specific group

gsc gl search <keywork> --group <group_id_or_group_path>

Search in GitHub

Default is to search all repositories that you owned, not fork repository.

gsc gh search <keywork>

gsc_gh_search

Search in a specific repository

gsc gh search <keywork> --repository <repository_full_name>

See more

Read the wiki for the detail of gsc commands.

License

Copyright (C) 2022 James Nguyen

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.