# gitdog 中文文档

规范地址：https://npmcn.com/package/gitdog/

版本：0\.2\.1
npm 元数据更新时间：2026-11-03T16:36:34.567Z
中文译文更新时间：2026-11-03T18:31:00.471Z
软件包许可：UNLICENSED

本文由上游 README 机器翻译，可能存在偏差，请结合原文核对 API、命令与配置。版权与许可归原作者所有。

原始 npm 页面：https://www.npmjs.com/package/gitdog
原文对照：https://npmcn.com/package/gitdog/?lang=original
项目主页：https://gitdog.dev/
源码仓库：https://github.com/hyodotdev/gitdog-cli

## 关键信息（来自 npm 元数据）

- 包体积（解压后）：121 kB，21 个文件
- 模块格式：ES Module
- TypeScript 类型：未声明
- Node.js 要求：\>=22\.14\.0
- 运行依赖：2 个
- 首次发布：2026-11-03T07:19:29.837Z
- 最新版本发布：2026-11-03T16:36:34.163Z
- 已发布版本数：6（近 12 个月 6 个）

## 中文简介

从您的终端管理git项目，GitHub自动化和API密钥

## 安装

```sh
npm install gitdog
```

也可以使用：`pnpm add gitdog`、`yarn add gitdog`、`bun add gitdog`

## README

![Gitdog](https://raw.githubusercontent.com/hyodotdev/gitdog-cli/main/.github/assets/gitdog-logo.png)

# Gitdog CLI

你的GitHub助手。现在到了终端机。

[![npm version](https://img.shields.io/npm/v/gitdog?logo=npm&color=CB3837)](https://www.npmjs.com/package/gitdog) [![CI](https://github.com/hyodotdev/gitdog-cli/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/hyodotdev/gitdog-cli/actions/workflows/ci.yml) [![npm release](https://github.com/hyodotdev/gitdog-cli/actions/workflows/release.yml/badge.svg)](https://github.com/hyodotdev/gitdog-cli/actions/workflows/release.yml) [![Node.js 22.14 or later](https://img.shields.io/badge/node-%3E%3D22.14.0-3c873a?logo=nodedotjs&logoColor=white)](https://nodejs.org/) [![Gitdog website](https://img.shields.io/badge/Gitdog-gitdog.dev-111)](https://gitdog.dev/)

![Gitdog terminal: connect a project, configure automation and review pending actions](https://raw.githubusercontent.com/hyodotdev/gitdog-cli/main/.github/assets/terminal.svg?v=0.2.1)

连接存储库，配置问题，讨论和PR自动化，审查 AI操作，并从您的终端或CI管理项目任务。

## 使用npx运行

需要 **node . js 22.14 +**． 不需要全局安装。

```sh
npx gitdog@latest --help
```

## 快速启动

```sh
npx gitdog@latest login
npx gitdog@latest github install
npx gitdog@latest github recover
npx gitdog@latest init owner/repo
npx gitdog@latest config set requireApproval true
npx gitdog@latest config set pullRequestReviewsEnabled true
npx gitdog@latest config set requireApprovalForPullRequests true
npx gitdog@latest config push
```

GitHub应用程序设置只需要一次。一个项目连接现有的GitHub 仓库到git。

## 日常的命令

| 任务 | 命令 |
| --- | --- |
| 列表项目 | `npx gitdog@latest projects list` |
| 读取自动化设置 | `npx gitdog@latest config get --remote` |
| 审查待处理的操作 | `npx gitdog@latest tickets pending` |
| 检查代码索引 | `npx gitdog@latest index status` |
| 列出团队成员 | `npx gitdog@latest team members` |
| 检查使用情况 | `npx gitdog@latest usage summary` |

使用 `npx gitdog@latest --help` 浏览命令。添加 `--json` 为脚本。

## 在CI中使用

```sh
npx gitdog@latest keys create --name ci
npx --yes gitdog@0.2.1 --key-file /path/to/key.json projects list --json
npx gitdog@latest keys revoke KEY_ID --yes
```

`keys create` 打印私钥文件的路径。键是项目范围的和 默认为只读；添加 `--write` 对于设置和票据的删除/恢复。保持关键 从Git中取出文件。

* * *

[命令参考](https://github.com/hyodotdev/gitdog-cli/blob/main/docs/REFERENCE.md) · [Gitdog](https://gitdog.dev/) · [报告问题](https://github.com/hyodotdev/gitdog-cli/issues)

## 常见问题

### gitdog 是什么？

从您的终端管理git项目，GitHub自动化和API密钥

### 如何安装 gitdog？

在项目目录运行 npm install gitdog，或使用 pnpm add / yarn add / bun add。它还提供命令行工具 gitdog，可以用 npx gitdog 直接运行。

### gitdog 支持 TypeScript 吗？

该包的 package\.json 没有声明类型入口。需要类型提示时，可以在 npm 上查找社区维护的 @types/gitdog 是否存在。

### gitdog 支持 ESM 还是 CommonJS？

以 ES Module 形式发布，推荐使用 import 引入。在 CommonJS 项目中，Node\.js 20\.19\+ / 22\.12\+ 可以直接 require\(\) 不含顶层 await 的 ES Module，更早的版本需要改用动态 import\(\)。

### gitdog 需要什么版本的 Node\.js？

package\.json 的 engines 字段要求 Node\.js \>=22\.14\.0。版本不符时 npm 默认只给出警告，开启 engine-strict 后会拒绝安装。

### gitdog 可以商用吗？

gitdog 使用 UNLICENSED 许可。作者声明为 UNLICENSED，即不授予公开使用许可（与公共领域的 Unlicense 不同）。使用前需获得作者授权。以上为概括，不构成法律意见，请以许可原文为准。

### gitdog 还在维护吗？

最新版本 0\.2\.1 发布于 2026/11/04（今天）；至今共发布 6 个版本，其中过去 12 个月发布了 6 个；首次发布于 2026/11/03。发布频率只是参考信号：功能稳定的工具可能很少需要更新，建议结合源码仓库的 issue 和提交记录判断。

