文章來(lái)源于公眾號(hào):前端人
GitHub 官方正式發(fā)布了 GitHub CLI 1.0 版本
GitHub CLI 將 GitHub 添加到你的終端。它減少了環(huán)境切換,使你可以集中精力,更輕松地編寫腳本和創(chuàng)建自己的工作流。
今年年初發(fā)布 GitHub CLI 的 Beta 版以來(lái),用戶使用GitHub CLI
- 創(chuàng)建了超過(guò)250,000個(gè) pull requests
- 執(zhí)行了超過(guò)350,000次合并
- 創(chuàng)建了超過(guò)20,000個(gè) issues
GitHub CLI可以在Windows,macOS和Linux上使用。
很顯然,開發(fā)者們可以直接通過(guò) CLI 操作 GitHub 的 API,執(zhí)行各種操作,這無(wú)疑提升了處理效率!
下載地址
通過(guò)官方網(wǎng)址: cli.github.com。

常見Api命令
- gh release create
- gh repo view
- gh alias set
- gh issue list
- gh pr status
- gh pr checkout
- gh pr create
- gh pr checks
有了這些命令之后,其實(shí)可以做很多有意思的事情,比如自己做一個(gè)倉(cāng)庫(kù)管理平臺(tái),通過(guò)這個(gè)平臺(tái)去管理自己公司托管在 GitHub 上所有的倉(cāng)庫(kù),包括倉(cāng)庫(kù)的創(chuàng)建,編輯,權(quán)限分配等等一系列工作。其實(shí)還有很多場(chǎng)景可以去做的!
更多Api說(shuō)明
cli.github.com/manual/
如何使用?
登錄
安裝完成之后,直接啟用命令行。
然后運(yùn)行 gh auth login
進(jìn)行帳號(hào)認(rèn)證登錄。我按照指引,很快就登錄上了。
(https://atts.w3cschool.cn/attachments/image/20200921/1600657512757044.png "GitHub CLI登錄")
(https://atts.w3cschool.cn/attachments/image/20200921/1600657547964711.png "GitHub CLI登錄")
使用

官方給出了一些基本命令演示圖,比如,
列舉 issues 列表:

創(chuàng)建 Pull Request:
建 Pull Request")
比對(duì) PR 的變更:
 PR 的變更")
老司機(jī)們,還不趕緊用起來(lái)???
以上就是W3Cschool編程獅
關(guān)于GitHub CLI 1.0 正式發(fā)布【豐富前端工程化】的相關(guān)介紹了,希望對(duì)大家有所幫助。