# @forge/cli 中文文档

规范地址：https://npmcn.com/package/%40forge/cli/

版本：15\.1\.0
npm 元数据更新时间：2026-11-09T12:50:48.903Z
中文译文更新时间：2026-11-15T07:25:25.171Z
软件包许可：SEE LICENSE IN LICENSE\.txt

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

原始 npm 页面：https://www.npmjs.com/package/%40forge/cli
原文对照：https://npmcn.com/package/%40forge/cli/?lang=original
项目主页：https://developer.atlassian.com/platform/forge

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

- 包体积（解压后）：2.9 MB，811 个文件
- TypeScript 类型：未声明
- Node.js 要求：^22\.23\.4 \|\| ^24\.22\.1 \|\| \>=26\.12\.1
- 运行依赖：46 个
- peer 依赖：typescript \>=5\.0\.0
- 首次发布：2019-11-19T04:54:56.922Z
- 最新版本发布：2026-11-09T12:50:48.715Z
- 近 30 天下载量：221364（2026-10-16 至 2026-11-14，npm 官方下载统计）
- 已发布版本数：812（近 12 个月 142 个）

## 中文简介

管理Atlassian托管应用程序的命令行接口

## 安装

```sh
npm install @forge/cli
```

也可以使用：`pnpm add @forge/cli`、`yarn add @forge/cli`、`bun add @forge/cli`

## README

# 伪造CLI

命令行界面(CLI)帮助创建,管理并部署Forge应用.

见 [开发者.atlassian.com/平台/forge/](https://developer.atlassian.com/platform/forge) 文档和教程 解释弗吉.

## 所需资源

您需要以下内容:

-   [节点.js](https://nodejs.org/en/download/): Forge CLI 需要一个 [LTS 版本](https://nodejs.org/en/about/releases) 已经安装。 我们建议您通过 [节点版本管理器](https://github.com/nvm-sh/nvm#installing-and-updating)。 。 。 .

_重要内容:_ 我们建议在您的用户下运行节点. 如果您在根特权下运行节点,则需要更新节点配置,允许全局模块通过运行使用二进制来安装:

```
npm config set unsafe-perm true
```

为检查您的节点版本, 请在终端中运行以下 :

```
node --version
```

见 [开始](https://developer.atlassian.com/platform/forge/getting-started/) 说明设置.

## 安装

通过运行在全球安装 CLI :

```
npm install -g @forge/cli
```

## 开始吧

通过运行探索帮助 :

```
forge --help
```

此显示可用的命令列表 :

```
Usage: forge [options] [command]

Options:
  --version                              output the version number
  --verbose                              enable verbose mode
  -h, --help                             output usage information

Quick Start
  login [options]                             log in to your Atlassian account
  create [options] [name]                     create an app
  deploy [options]                            deploy your app to an environment
  install [options]                           manage app installations
  tunnel [options]                            start a tunnel to connect your local code with the app
                                              running in the development environment

Develop
  build [options]                             build and upload your app
  lint [options]                              check the source files for common errors
  logs [options]                              view app logs

Manage
  register [options] [name]                   register an app you didn't create so you can run commands
                                              for it
  developer-spaces [options]                  manage Developer Spaces
  uninstall [options]                         uninstall the app from an Atlassian site
  environments [options]                      manage app environments
  variables [options]                         manage app environment variables
  webtrigger [options]                        manage webtriggers
  settings [options]                          manage Forge CLI settings
  providers [options]                         manage external providers
  storage [options]                           manage storage for your app
  eligibility [options]                       check if your app is eligible for certain programs like
                                              Runs on Atlassian
  version [options]                           app version information
  custom-scopes [options]                     manage custom scopes

Account
  logout [options]                            log out of your Atlassian account
  whoami [options]                            display the account information of the logged in user

CLI Experience
  autocomplete [options] [install|uninstall]  configures autocomplete for the Forge CLI
  feedback [options]                          let us know what you think about Forge
  assistant [options]                         [⚠️ experimental feature] manage AI assistant settings
                                              (Rovo/Gemini)
```

## 支助

见 [找人帮忙](https://developer.atlassian.com/platform/forge/get-help/) 如何获得帮助和提供反馈.

## 常见问题

### @forge/cli 是什么？

管理Atlassian托管应用程序的命令行接口

### 如何安装 @forge/cli？

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

### @forge/cli 支持 TypeScript 吗？

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

### @forge/cli 需要什么版本的 Node\.js？

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

### @forge/cli 可以商用吗？

@forge/cli 使用 SEE LICENSE IN LICENSE\.txt 许可。许可条款写在包内的独立文件中，请阅读该文件确认可否商用。以上为概括，不构成法律意见，请以许可原文为准。

### @forge/cli 的下载量有多少？

根据 npm 官方下载统计，@forge/cli 在 2026/10/16 – 2026/11/14 这 30 天内被下载 221,364 次，日均约 7,379 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入，适合横向比较热度，不能直接等同于使用人数。

### @forge/cli 还在维护吗？

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

