gitee
A gh-like command-line client for Gitee. Manage pull requests, issues, and repositories from your terminal.
Quick start
1 — Install (pick one):
Or grab a binary from GitHub Releases.
2 — Log in with a Gitee personal access token:
3 — Use it. Run inside any git clone (or add --repo owner/name):
That's it. Everything below is detail.
Install
| Method | Command | Notes |
|---|---|---|
| crates.io | cargo install gitee-cli-rs |
builds from source |
| cargo-binstall | cargo binstall gitee-cli-rs |
same binary, no compile |
| Homebrew (macOS) | brew install kipyin/tap/gitee |
arm64 + x86_64 |
| Direct download | Releases | gitee-<target>-v<ver>.tar.xz |
| From source | cargo install --path . |
after git clone |
The crates.io package is
gitee-cli-rs, but the installed command isgitee.
Shell completions (bash/zsh/fish/powershell/elvish):
Configure
The CLI needs a Gitee personal access token. Create one at https://gitee.com/profile/personal_access_tokens (default scopes are fine for reading; check pull_requests, issues, and projects for write actions).
For CI / scripts, use an environment variable instead:
Token lookup order: $GITEE_TOKEN → OS keyring → ~/.config/gitee/<host>.token.
Useful commands:
Everyday commands
Run from inside a repo, or point anywhere with --repo owner/name.
# pull requests
# issues
# releases
# repositories
Handy global flags:
Command reference
| Subcommand | Description |
|---|---|
list |
List pull requests (--state, --author, --limit) |
view <n> |
Show pull request details |
diff <n> |
Show pull request diff |
checkout <n> |
Fetch and check out a pull request locally |
create |
Open a PR (--title required, --body, --head, --base) |
merge <n> |
Merge (--squash, --rebase, --no-close-issue) |
comment <n> |
Add a comment (-m/--body) |
approve <n> |
Approve (--force) |
close <n> / reopen <n> |
Change state |
link <n> <issue> |
Link a pull request to an issue |
| Subcommand | Description |
|---|---|
list |
List issues (--state, --assignee, --limit) |
view <n> |
Show issue details |
create |
Create an issue (--title required, --body, --assignee, --labels) |
close <n> / reopen <n> |
Change state |
link <n> <pr> |
Link an issue to a pull request |
comment <n> |
Add a comment (-m/--body) |
| Subcommand | Description |
|---|---|
list |
List releases (--limit) |
view <tag> |
Show release details |
create |
Create a release (--tag required, --name, --notes, --target, --prerelease) |
upload <tag> <files…> |
Attach files to an existing release |
| Subcommand | Description |
|---|---|
view [repo] |
Show repository details |
list [owner] |
List repos (yours, or a user/org's public repos) (--limit) |
clone <spec> [dir] |
Clone via git (--ssh) |
fork |
Fork the resolved repository (--add-remote <name>) |
| Subcommand | Description |
|---|---|
login |
Store a token (--token, --force to skip validation) |
status |
Show login status and token source |
token |
Print the active token |
logout |
Forget the stored token for the current host |
Global flags
| Flag | Description |
|---|---|
--repo <owner/name> |
Target repository (default: resolved from git remote) |
--remote <name> |
Git remote to resolve the repo from (default: origin) |
--host <host> |
Gitee host (default: gitee.com) |
--json [fields] |
JSON output; --json number,title projects fields |
--debug |
Log HTTP requests/responses to stderr |
Repository resolution
Most commands operate on a repository resolved two ways:
--repo owner/name, or- from the current directory's git remote (
--remote, defaultorigin).
So either cd into a clone, or pass --repo explicitly.
License
MIT — see Cargo.toml.