npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@orangemust/gitee-cli

v0.1.1

Published

Gitee (码云) command-line tool — like gh, but for Gitee

Readme

@orangemust/gitee-cli

Gitee (码云) 命令行工具 — like gh, but for Gitee.

npm version


Installation

For Humans

Copy and paste this prompt to your LLM agent (Claude Code, Cursor, Codex, etc.):

Install and configure gitee-cli by following the instructions here:
https://raw.githubusercontent.com/mack-peng/gitee-cli/main/docs/guide/installation.md

Or read the Installation Guide, but seriously, let an agent do it. Humans fat-finger configs.

For LLM Agents

Fetch the installation guide and follow it:

curl -s https://raw.githubusercontent.com/mack-peng/gitee-cli/main/docs/guide/installation.md

Quick Start

Install

npm install -g @orangemust/gitee-cli

# Or run without installing:
# npx @orangemust/gitee-cli repo view

1. Authentication

前往 https://gitee.com/profile/personal_access_tokens 创建 Token,然后运行:

gitee-cli auth login

支持非交互模式:

echo "your_token" | gitee-cli auth login --with-token

2. Try It

gitee-cli auth status                  # 查看认证状态
gitee-cli repo list                    # 列出你的仓库
gitee-cli repo view owner/repo         # 查看仓库详情

Authentication

gitee-cli auth login           # 交互式登录(隐藏 Token 输入)
gitee-cli auth logout          # 清除认证
gitee-cli auth status          # 查看认证状态

Token 优先级:环境变量 GITEE_TOKEN > Config file

export GITEE_TOKEN=your_token_here

Config file (~/.gitee-cli/config.json):

{
  "token": "your_token",
  "username": "your_username"
}

Commands

Repository

gitee-cli repo list                              # 列出我的仓库
gitee-cli repo list --owner <user>              # 列出指定用户的仓库
gitee-cli repo list --type private              # 只列出私有仓库
gitee-cli repo create <name>                    # 创建仓库
gitee-cli repo create <name> --private          # 创建私有仓库
gitee-cli repo create <name> --description "..."
gitee-cli repo create <name> --org <org>        # 在组织下创建
gitee-cli repo view                             # 查看当前仓库(自动检测)
gitee-cli repo view <owner/repo>                # 查看指定仓库
gitee-cli repo clone <owner/repo>               # Clone 仓库
gitee-cli repo delete <owner/repo>              # 删除仓库(需确认)
gitee-cli repo delete <owner/repo> --yes        # 跳过确认

Issue

gitee-cli issue list                            # 列出 issues(自动检测仓库)
gitee-cli issue list --repo <owner/repo>        # 指定仓库
gitee-cli issue list --state closed             # 已关闭的 issues
gitee-cli issue create --title "Bug fix"        # 创建 issue
gitee-cli issue create --title "..." --body "..."
gitee-cli issue create --title "..." --assignee <username>
gitee-cli issue view <number>                   # 查看 issue 详情
gitee-cli issue update <number> --title "..." --labels "bug,urgent"
gitee-cli issue close <number>                  # 关闭 issue
gitee-cli issue comment <number> --body "..."   # 添加评论
gitee-cli issue comments <number>               # 列出所有评论

Pull Request

gitee-cli pr list                               # 列出 PRs(自动检测仓库)
gitee-cli pr list --state merged                # 已合并的 PRs
gitee-cli pr create --title "feat: xxx" --head feature-branch
gitee-cli pr create --title "..." --head <branch> --base master
gitee-cli pr view <number>                      # 查看 PR 详情
gitee-cli pr merge <number>                     # 合并 PR
gitee-cli pr merge <number> --method squash     # Squash 合并
gitee-cli pr merge <number> --method rebase     # Rebase 合并
gitee-cli pr close <number>                     # 关闭 PR

# Comments
gitee-cli pr comment <number> --body "LGTM"     # 添加 PR 评论
gitee-cli pr comments <number>                  # 列出 PR 所有评论

# Code Review
gitee-cli pr files <number>                     # 列出变更文件(含增删行数,彩色输出)
gitee-cli pr diff <number>                      # 查看 diff(+ 绿色 / - 红色)
gitee-cli pr review <number> --action approve               # 批准 PR
gitee-cli pr review <number> --action request_changes        # 请求修改
gitee-cli pr review <number> --action comment --body "..."   # 提交 review 评论
gitee-cli pr review-comments <number>           # 列出 review 评论

Release

gitee-cli release list                          # 列出 releases
gitee-cli release list --repo <owner/repo>
gitee-cli release create --tag v1.0.0 --name "v1.0.0 Release"
gitee-cli release create --tag v1.0.0 --name "..." --body "Release notes"
gitee-cli release create --tag v1.1.0 --name "..." --draft --prerelease

Organization

gitee-cli org list                              # 列出加入的组织

Raw API

gitee-cli api GET /user                         # 获取当前用户
gitee-cli api GET /repos/owner/repo             # 裸 API 调用
gitee-cli api POST /user/repos --field name=myrepo
gitee-cli api GET /repos/owner/repo/issues --query state=open
gitee-cli api GET /repos/owner/repo/issues --paginate  # 自动翻页合并结果
gitee-cli api GET /user --no-auth               # 跳过认证

Global Options

| Option | Description | |--------|-------------| | --json | 输出格式化 JSON,便于脚本和 AI 解析 | | --repo <owner/repo> | 指定仓库(省略时自动从 git remote 检测) | | --page <n> | 分页页码(默认 1) | | --per-page <n> | 每页条数(默认 20) |


Auto-detect Repository

在 Gitee 仓库目录内运行命令时,--repo 可省略,gitee-cli 自动从 git remote 检测 owner/repo

支持两种 remote 格式:


Development

git clone https://github.com/mack-peng/gitee-cli.git
cd gitee-cli
npm install
npm run build
npm link
npm run dev
npx tsc --noEmit

License

MIT