Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

gitee-cli

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gitee-cli

  • 0.2.3
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Gitee CLI

Banner

Work with Gitee from the command line.

Install

$ gem install gitee-cli

Usage

Note

  1. 此客户端当前仅在Windows上测试运行良好。LinuxmacOS理论上可运行。
  2. 命令行接口与GitHub的gh不太一致
  3. 当前API仅实现了较小一部分(我目前需要的)
  4. 如果您想要使gitee命令与gh命令保持兼容,或者需要提供对多平台的支持,或者发现有API需要补充,请考虑捐赠此项目并发起issue。

使用gitee-cli需要Gitee Access Token,我们可以通过以下两种方式实现:

方式1(推荐)

正常情况下,您应当使用该方式。在Gitee个人设置 -> 第三方应用,创建要接入Gitee的应用,我们在此创建一个应用叫做gitee-cli,我们填入以下资料:

# 应用名称
gitee-cli

# 应用描述
第三方Gitee命令行客户端gitee-cli

# 应用主页
https://gitee.com/ccmywish/gitee-cli

# 应用回调地址(必填以下内容)
http://localhost

# 权限,一般勾选以下即可
- user_info
- projects
- pull_requests
- issues

# Logo上传gitee-cli的logo即可
# 使用下面命令下载
curl -fsSL https://gitee.com/ccmywish/gitee-cli/raw/main/images/AppLogo.jpg -o GiteeCLIAppLogo.jpg

注册完成后,我们会得到Client IDClient Secret。最后一步,在命令行上运行:

# 注意,括号和逗号都是必需的,之间是否空格没有要求
$ gitee auth:apply[id, secret]

之后,便可以使用任何其它gitee命令了。


方式2(临时)

如果您只想临时使用,或者不方便将token等关键信息存储在本机,请运行:

$ gitee auth:temp_apply

跟随返回的地址申请token

之后,在使用任何其它gitee命令时,带上参数GITEE_TOKEN=xxx即可,例如:

$ gitee repo:branches[ccmywish, gitee-cli] GITEE_TOKEN=xxx

命令行

gitee -h                        # 快速帮助

gitee help [pattern]            # 显示可执行命令,可以使用pattern来搜索相关命令

gitee auth:apply[id,secret]     # Apply for an access token using Gitee app
gitee auth:temp_apply           # Apply for an access token temporarily
gitee repo:branches[user,repo]  # Get all branches of a repository
gitee repo:create[repo]         # Create a repository under your space
gitee repo:delete[user,repo]    # Delete the '<user>/<repo>' repository
gitee repo:list[user]           # List repositories owned by user/organization
gitee repo:view[user,repo]      # View the repository's README

FAQs

Package last updated on 31 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc