gitee-cli 0.4.2

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global gitee-cli --version 0.4.2
                    
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest
                    
if you are setting up this repo
dotnet tool install --local gitee-cli --version 0.4.2
                    
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=gitee-cli&version=0.4.2
                    
nuke :add-package gitee-cli --version 0.4.2
                    

GiteeCli

Github

https://github.com/BlackBoxRecorder/GiteeCli

使用前准备

1.申请Gitee API Token

登录Gitee,在 设置--> 安全设置-->私人令牌 中生成新令牌

2.生成SSH Key

在电脑上生成SSH Key 并填入 设置-->安全设置-->公钥部分。参照:公钥设置

3.安装.NET 9 SDK

下载 SDK 并安装,下载地址

4.安装 GiteeCli 工具

打开终端,执行

dotnet tool install --global gitee-cli

查看使用帮助:

gitee-cli -h

查看子命令使用帮助:

gitee-cli remote -h

命令介绍

设置 Token

通过命令行设置(仅Windows)

设置第一步生成的私人令牌,在终端中执行:

gitee-cli token 0c47b5a4a6c43765bc33a14ec7169
通过环境变量设置

在系统上添加环境变量 GITEE_TOKEN = 0c47b51262c43765bc33a14ec7169

远程仓库

列出仓库

列出用户在 gitee.com 上的所有个人仓库:

gitee-cli remote list
创建仓库

在 gitee.com 上创建新仓库:

gitee-cli remote create --name <repo_name> --init
克隆仓库

在终端执行以下命令,其中 <repo_name>gitee-cli list 命令输出的仓库名称

gitee-cli remote clone --name <repo_name>

克隆所有仓库,执行:

gitee-cli remote clone --all

选择要克隆的仓库:

gitee-cli remote clone --select
删除仓库

从 gitee.com 删除一个仓库,执行:

gitee-cli remote delete --name <repo_name>
清空仓库

清空一个远程仓库:

gitee-cli remote clear --name <repo_name>

本地仓库

添加

将一个git仓库添加到 gitee-cli 的配置中,gitee-cli 可以通过表格显示仓库的 git status 信息

//添加当前路径
gitee-cli local add .

//从当前目录的子目录中批量添加
gitee-cli local add . --sub
状态

查看本地仓库的提交状态

gitee-cli local status
推送

将本地仓库推送到远端,自动执行 git add、git commit、git pull、git push

gitee-cli local push --name <repo_name>

批量推送

gitee-cli local push --all
移除

如果仓库位置变动,需要移除并重新添加

gitee-cli local remove --name <repo_name>

移除所有

gitee-cli local remove --all
Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last Updated
0.5.2 186 8/31/2025
0.5.1 179 8/31/2025
0.4.2 162 8/17/2025
0.4.1 123 8/16/2025
0.4.0 170 8/15/2025
0.3.1 251 3/8/2025
0.2.0 160 3/1/2025
0.1.0 162 2/20/2025