https://github.com/owenrumney/gitsearch
Command line tool to search github repositories and users
https://github.com/owenrumney/gitsearch
github pypi python
Last synced: 8 months ago
JSON representation
Command line tool to search github repositories and users
- Host: GitHub
- URL: https://github.com/owenrumney/gitsearch
- Owner: owenrumney
- Created: 2018-08-02T12:54:51.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2024-07-06T01:23:54.000Z (over 1 year ago)
- Last Synced: 2025-04-01T17:46:30.258Z (10 months ago)
- Topics: github, pypi, python
- Language: Python
- Size: 17.6 KB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
Awesome Lists containing this project
README
# Git Search
Simple command line to search github.
## Introduction
`git-search` is a simple command line tool that allows you to search for users and repositories in [GitHub](http://www.github.com).
## Installation
To install git search you can use `pip` with the following command;
```shell
pip3 install gitsearch-cli
```
## Usage
By default the search will be scoped to look in repositories, however you can change the scope to look specifically for users.
### Searching for Users
```shell
git-search --scope users owen rumney
or
git-search --scope users owenrumney
```
This will yield the following results;
| username | url |
|:-----------|:------------------------------|
| owenrumney | https://github.com/owenrumney |
### Searching for repositories
When searching for repositories you can create a general search by keyword or focus the search by including the language and/or user.
```shell
git-search -l scala -u apache spark
```
This will give the following result;
| name | owner | url |
|:--------------|:--------|:----------------------------------------|
| fluo-muchos | apache | https://github.com/apache/fluo-muchos |
| predictionio | apache | https://github.com/apache/predictionio |
| spark | apache | https://github.com/apache/spark |
| spark-website | apache | https://github.com/apache/spark-website |
If you want to only return results where the keyword is in the name, you can use the `--nameonly` flag
```shell
git-search -l scala -u apache spark --nameonly
```
This will give the following result;
| name | owner | url |
|:--------------|:--------|:----------------------------------------|
| spark | apache | https://github.com/apache/spark |
| spark-website | apache | https://github.com/apache/spark-website |
### Date based criteria
You can search for repositories based on created or updated dates using natural date periods, all of the below examples are acceptable (not limited to this). If you use a date period that isn't acceptable, the search will use the beginning of time (1979-30-10)
```shell
git-search -l=scala --updated="last week" # return 30 scala projects updated in the last week
git-search -l=python --created="yesterday" # return 30 scala projects created yesterday
git-search gitsearch -l=python --created "3 days ago" # return 30 scala projects created yesterday
```
## TODO
- [X] Add date based options for search criteria
- [ ] Add tests
- [ ] Refactor the code to be more pythonic