
---
url: /mod/gt.md
---
# x gt

在命令行管理 Gitee 工作


::: tip
Gitee 私人令牌获取: https://gitee.com/profile/personal_access_tokens
- 交互环境中可使用 `x gt init` 进行初始化配置，配置信息将存放于本地保存
- 亦可运行命令 `x gt --cfg token=<token>` 添加私人令牌
:::


## 例子

获取当前用户信息

```sh
x gt user info
```

开启交互式表格查看当前用户仓库

```sh
x gt repo ls
```
## 介绍



gt 模块是由 x-cmd 团队基于 Gitee API 使用 Shell 与 AWK 封装 Gitee CLI 模块，旨在以轻便高效的方式管理 Gitee 的工作流程。


- 作为 x-cmd 的模块之一，gt 模块提供开箱即用的完整功能以及友好的命令行补全。
- gt 模块在命令设计遵循 x-cmd CLI 的设计理念，从而保持与其它 x-cmd CLI 的使用一致性。
- 使用 x-cmd 的 TUI 体系，提供一致且易用的命令行交互界面。

## 使用

```sh
x gt [OPTIONS] [FLAGS] [SUB_COMMAND]
```

## 选项

| 名称, 名称简写 | 默认值 | 描述 |
| ------- | ------- | ------- |
| `--config` &lt;path&gt; |  | 当前命令运行所使用配置文件路径 |
| `--profile` &lt;name&gt; |  | 当前命令运行所使用配置信息名称 |


## 指令

| 名称, 名称简写 | 描述 |
| ------- | ------- |
| `--cur` | 当前会话默认值管理 |
| `--cfg` | gt 配置管理 |


## 子命令

| 名称 | 描述 |
| ------- | ------- |
| [x gt repo](/mod/gt/repo.md) | 仓库管理 |
| [x gt user](/mod/gt/user.md) | 用户管理 |
| [x gt org](/mod/gt/org.md) | 组织管理 |
| [x gt enterprise](/mod/gt/enterprise.md) | 企业管理 |
| [x gt issue](/mod/gt/issue.md) | Issue 管理 |
| [x gt pr](/mod/gt/pr.md) | Pull Request 管理 |
| [x gt notification](/mod/gt/notification.md) | 通知管理 |
| [x gt codeurl](/mod/gt/codeurl.md) | 获取 Gitee 资源地址 |
| [x gt avatar](/mod/gt/avatar.md) | 用户地址薄管理 |
| [x gt init](/mod/gt/init.md) | 使用交互模式初始化配置 |
| [x gt cl](/mod/gt/cl.md) | `x gt repo clone` 的简写别名 |
