Metadata-Version: 2.1
Name: git-search-command
Version: 2.1.2
Summary: A simple tool to search the content in GitLab and GitHub.
Home-page: https://github.com/jamesnguyen46/git-search-command
License: Apache-2.0
Keywords: gitlab,search,command line,python,git,github
Author: jamesnguyen46
Author-email: thachnguyen1989@gmail.com
Maintainer: jamesnguyen46
Maintainer-email: thachnguyen1989@gmail.com
Requires-Python: >=3.7,<4
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Topic :: Internet :: WWW/HTTP :: Indexing/Search
Requires-Dist: click (>=8.0.3)
Requires-Dist: dependency-injector (>=4.0,<5.0)
Requires-Dist: jsonpickle (>=2.1.0)
Requires-Dist: python-dotenv (>=0.19.2)
Requires-Dist: requests (>=2.26.0)
Requires-Dist: rx (>=3.2.0)
Requires-Dist: tabulate (>=0.9.0,<0.10.0)
Project-URL: Bug Reports, https://github.com/jamesnguyen46/git-search-command/issues
Project-URL: Documentation, https://github.com/jamesnguyen46/git-search-command/wiki
Project-URL: Repository, https://github.com/jamesnguyen46/git-search-command
Description-Content-Type: text/markdown

# GIT SEARCH COMMAND

[![PyPI](https://img.shields.io/pypi/v/git-search-command?label=PyPi&logo=pypi&logoColor=white)](https://pypi.org/project/git-search-command/)
[![Last commit](https://img.shields.io/github/last-commit/jamesnguyen46/git-search-command?label=Last%20Commit&logo=github&logoColor=white&color=yellow)](https://github.com/jamesnguyen46/git-search-command/commits/)
[![Coverage](https://img.shields.io/codecov/c/github/jamesnguyen46/git-search-command?token=HO0BAT95VI&label=Coverage&logo=codecov&logoColor=white)](https://codecov.io/gh/jamesnguyen46/git-search-command)
[![Github Action](https://img.shields.io/github/actions/workflow/status/jamesnguyen46/git-search-command/push_pull_request.yml?label=CI&logo=github-actions&logoColor=white)](https://github.com/jamesnguyen46/git-search-command/actions/workflows/push_pull_request.yml)
[![License](https://img.shields.io/badge/license-Apache-orange?label=License&logo=apache&logoColor=white)](https://github.com/jamesnguyen46/git-search-command/blob/main/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](https://gitlab.com/gitlab-org/cli) or [GitHub CLI](https://github.com/cli/cli)
>
> ## If this project is helpful for you, show your love ❤️ by putting a ⭐ on this project 😉.

## Prerequisites

1. Install [Python3.7+](https://www.python.org/downloads/).
2. Create a personal access token on [GitLab](https://docs.gitlab.com/ee/user/project/settings/project_access_tokens.html) or [GitHub](https://docs.github.com/en/authentication/keeping-your-account-and-data-secure/creating-a-personal-access-token).

## 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](https://user-images.githubusercontent.com/9126025/205210447-517c3fcc-6b5b-4d39-8c4d-aa89e1dc7ecc.gif)

### Search in GitLab

Default is to search all projects that you owned.

```
gsc gl search <keywork>
```

![gsc_gl_search](https://user-images.githubusercontent.com/9126025/205210438-274af890-4dc3-498b-8cc0-a01621d275ab.gif)

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](https://user-images.githubusercontent.com/9126025/205210430-1d495ebf-1538-413e-b3af-a60aeb144603.gif)

Search in a specific repository

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

### See more

Read the [wiki](https://github.com/jamesnguyen46/git-search-command/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.
```

