Git peek is a very useful tool if you want to browse or search other people’s code with your own code editor. It’s even faster than clone, it will let you open a remote git repository in your local text editor. It stores the repository in a temporary directory and deletes it when you close the editor, as simple as that ! Something you definitely need to add to your development tools !
Using Git peek
Usually you have to clone a repository, then add it to your favorite editor, then once you finish you have to delete, or sometimes you keep it until you notice that your disk is getting fat. The tool is simply written in Javascript with some TypeScript and C#, to install it simply use homebrew :
$ brew install jarred-sumner/git-peek/git-peek
Windows users, or linux install from npm using :
$ npm install -g @jarred/git-peek
Then you can use it with :
$ git-peek react
$ git-peek https://github.com/code16/sharp
$ git peek https://github.com/facebook/react/pull/20790
Running git-peek without arguments will let you search for repositories and show the trending repositories :
$ git-peek
Search Github repositories:
>
โฏ openai/DALL-E | PyTorch package for the discrete VAE used for DA
nuxt/vite | โก Vite Experience with Nuxt 2 ๐งช
tostercx/GTAO_Booster_Po |
neilsardesai/Mouse-Finde | ๐ฑ๐ An NSDockTile experiment
exebook/generic-print | Convenient generic print() for C
jevakallio/git-notify | ๐ ๐ฃ Communicate important updates to your team
huoji120/DuckMemoryScan | ๆฃๆต็ปๅคง้จๅๆ่ฐ็ๅ
ๅญๅ
ๆ้ฉฌ
Jarred-Sumner/git-peek | git repo to local editor instantly
waylybaye/Swapman | swapfile monitor for macOS Big Sur
You can also specify which editor to use with the directive -e which take the values: auto, code, subl, nvim, vim, vi, code-insiders. By default, it will search $EDITOR. If not found, it will try code, then subl, then vim. Finally if you need any help, use the directive git-peek -h !
Git-Peek is an open source software released under an MIT license. More information at https://github.com/Jarred-Sumner/git-peek