# gt: General Translation CLI tool: 常见问题 URL: https://generaltranslation.com/zh/docs/cli/faqs.mdx --- title: 常见问题 description: GT CLI 工具常见问题 --- ### 使用 CLI 是否需要 API 密钥? [`translate`](/docs/cli/translate) 命令需要生产环境 API 密钥,你可以在 [generaltranslation.com](https://generaltranslation.com) 免费获取。[`init`](/docs/cli/init) 命令也可以在设置过程中为你生成一个。 ### 我应该何时运行 `gt translate`? 请在为生产环境构建应用**之前**,于 CI/CD 流水线中运行它。不要在开发阶段使用它——开发时请改用开发环境的 API 密钥进行按需翻译。 ### 我可以将 CLI 与 gt-next 和 gt-react 之外的库配合使用吗? 可以。CLI 可以为第三方 i18n 库 (如 [next-intl](https://next-intl.dev/) 和 [i18next](https://react.i18next.com/)) 生成翻译。它还可以翻译独立的 JSON、Markdown、MDX、JS 和 TS 文件。 ### CLI 支持哪些文件格式? CLI 支持 [JSON](/docs/cli/formats/json)、[MDX](/docs/cli/formats/mdx)、[HTML](/docs/cli/formats/html)、[TypeScript/JavaScript](/docs/cli/formats/ts)、[YAML](/docs/cli/formats/yaml)、[PO/POT](/docs/cli/formats/po)、[纯文本](/docs/cli/formats/txt) 以及 [GT 的内部格式](/docs/cli/formats/gt)。 ### 翻译会保存到哪里? 根据你的配置,翻译内容会上传到 GT CDN,或保存在项目 bundle 中。本地存储翻译的详细信息,请参阅 [`save-local`](/docs/cli/save-local)。