# gt: General Translation CLI tool: gt project status
URL: https://generaltranslation.com/zh/docs/cli/reference/commands/project-status.mdx
Docs index: https://generaltranslation.com/llms.txt
Description: 查看翻译任务或项目上下文生成任务的当前状态。gt project status 命令的 API 参考。

使用 `gt project status` 可查看翻译工作流程或 [`setupProject`](/docs/platform/core/reference/gt-class-methods/translation/setup-project) 返回的任务。项目创建为同步完成，不会返回任务 ID。

## 概览 [#overview]

```bash
npx gt project status <job-id> [options]
```

该命令会发起一次状态请求，并打印 API 返回的状态。

## 工作原理 [#how-it-works]

1. 从选项、配置或环境变量中解析 API 密钥和项目 ID。
2. 请求所指定的翻译任务或上下文生成任务的当前状态。
3. 打印返回的状态；若响应中不含状态，则打印 `unknown`。

若凭据缺失或 API 拒绝该请求，命令会以状态码 1 退出。若 API 未返回匹配的任务，命令会打印 `unknown` 并正常退出；即使打印出的任务状态为 `failed`，命令同样不会以错误退出。

## 参数与选项 [#arguments-flags]

| Parameter             | Description           | Type     | Optional | Default               |
| --------------------- | --------------------- | -------- | -------- | --------------------- |
| `<job-id>`            | 要查看的翻译或上下文生成任务 ID。    | `string` | 否        | —                     |
| `-c, --config <path>` | `gt.config.json` 的路径。 | `string` | 是        | 自动解析                  |
| `--api-key <key>`     | 覆盖 API 密钥。            | `string` | 是        | `GT_API_KEY`          |
| `--project-id <id>`   | 覆盖项目 ID。              | `string` | 是        | 配置文件或 `GT_PROJECT_ID` |

## 示例 [#example]

```bash
npx gt project status job_123
```

## 其他说明 [#notes]

* `gt project status` 自 `gt` 2.20.0 起可用。
* 该命令同时需要 API 密钥和项目 ID。
* **响应结构：**[获取翻译任务状态](/docs/platform/openapi/reference/translation/job-status)。

## Sitemap

See the full [sitemap](https://generaltranslation.com/sitemap.md) for all pages.
