Browse trending projects on Github from your command line π»
- Requires Python 3.6 or greater
pip install starcli
Remember to use pip3
instead of pip
if you also have Python 2 installed on your system
Usage: starcli [OPTIONS]
Browse trending repos on GitHub by stars
Options:
-l, --lang TEXT Language filter eg: python
-S, --spoken-language TEXT Spoken Language filter eg: en for English,
zh for Chinese, etc
-d, --date-created TEXT Specify repo creation date in ISO8601 format
YYYY-MM-DD
-t, --topics TEXT Search by topic. Can be specified multiple
times. Multiple topics will be conjugated
using &
-u, --last-updated TEXT Filter repos based on time of last update in
ISO8601 format YYYY-MM-DD
-L, --layout [list|table|grid] The output format (list, table, or grid),
default is list
-s, --stars TEXT Range of stars required, default is '>=100'
-r, --limit-results INTEGER Limit the number of results shown. Default:
7
-o, --order [desc|asc] Specify the order of repos by stars that is
shown, 'desc' or 'asc', default: desc
--long-stats Print the actual stats[1300 instead of 1.3k]
-D, --date-range [today|this-week|this-month]
View stars received within time range,
choose from: today, this-week, this-month
--debug Turn on debugging mode
--help Show this message and exit.
Switch layouts using --layout {list|table|grid}
, or use the short option -L
list
table
grid
For example, you only want to find popular Python repos, you can use --lang
or -l
:
starcli --lang python
Here, we used starcli -l python -L grid
, which is python with grid layout:
If you wanted to find repos in your native language, you can use --spoken-language
or -S
:
starcli --spoken-language zh
The above command lists down repos written in Chinese. A full list of language codes is available here
Note that (like --date-range
) options like --topics
, --last-updated
, --date-created
won't take effect
because -D
uses a different search mechanism to find results.
(Recommended to be used with --date-created
)
The default range is >=100, you can change that!
Use --stars
or -s
to specify what you want,
for example, if you want to find repos that has more than 100 stars, you can use:
starcli -s '>100'
Note that if you do something like >1000
not many repos can have
more than 1000 and is created within around 200 days,
to specify date of creation, use --date-created
, see below.
Wish to know what's trending this week?!
You can view the number of stars a repo received today, this week or this month by using the --date-range
or -D
option:
starcli -D this-week -L table
This command will also display the number of stars received for each repo this week in the form of a table.
Want to find newer, older, or just created repos?
Just use --date-created
or -d
, and then
provide a date in ISO8601 format: yyyy-mm-dd
For example, to 1st January 2014, use:
starcli --date-created 2014-01-01
This option helps you to filter by topics. You can use --topics
or -t
to include
a topic in search.
This option can be used multiple times.
starcli -l python -d 2020-07-06 -t deep-learning -t pytorch
Use this --last-updated
or -u
when you want to find popular repos that are
last updated on a given date, say 2020-01-01 for 1st of Jan
2020:
starcli -u 2020-01-01
You can use --date-range
or -D
and specify today, this-week, or this-month,
so that GitHub Trending search function will be used to find popular repos
and tell you how much stars are gained this day/week/month depending on the
option you used.
starcli -D this-week
Note that (like --spoken-language
) options like --topics
, --last-updated
, --date-created
won't take effect
because -D
uses a different search mechanism to find results.
Don't like the default 7? You can change it to something else,
using --limit-results
or -r
followed by an integer:
starcli -r 2
The above will only give you two repos. This is useful if
you want to put it in your .bashrc
, .zshrc
, or fish_greeting
function.
Just add starcli -r 3 -L grid
in there, and every time you open your terminal,
you will find 3 trending repos printed neatly in a grid format, great way to start your
day (bit like the Hacker Tab Extension π ).
- Issues, bug reports, or feature request: Don't hesitate to open an issue in this repo
- Feedback: any general feedback or questions about using StarCLI you can leave a comment on our Product Hunt page, remember to be nice :)
For contributing guidelines and how to set up your development environment, please
read CONTRIBUTING.md
.
Remember that all contributions to this project should follow its
CODE OF CONDUCT.
- CommandLine Argument parser: Click
- Colored and table console print:
rich
(with click and colorama) - HTTP library to send requests:
requests
Thanks goes to all of these wonderful people (emoji key):
Shagilton π» |
hexbee π |
Sam Wellander π» |
Shivam Sinha π» |
Will McGugan π» |
Ashik J M π» |
Yu-Lin Chao π» |
Saif Kazi π» π |
arcanearronax |
This project follows the all-contributors specification. Contributions of any kind welcome!
This project was forked from
githunt
(python)
and its initial intention was to rewrite that project to use
Rich instead of colorama + tabulate, but now it has so much more features
than before, thanks everyone!
Liked this project? Don't forget to give it a β