@forge/cli

中文文档
15.1.0发布于 2026/11/09SEE LICENSE IN LICENSE.txt近 30 天下载 22.1万

A command line interface for managing Atlassian-hosted apps

原始使用文档
文档目录4 节
  1. Requirements
  2. Installation
  3. Get started
  4. Support

Forge CLI

Command line interface (CLI) to help create, manage, and deploy Forge apps.

See developer.atlassian.com/platform/forge/ for documentation and tutorials explaining Forge.

Requirements

You need the following:

Important: We recommend running Node under your user. If you're running node under root privilege instead, you'll need to update the Node configuration to allow global module installs using binaries by running:

npm config set unsafe-perm true

To check your Node version, run the following in the terminal:

node --version

See Getting started for instructions to get set up.

Installation

Install the CLI globally by running:

npm install -g @forge/cli

Get started

Explore the help by running:

forge --help

This displays the list of available commands:

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)

Support

See Get help for how to get help and provide feedback.

版本与发布记录

@forge/cli 共发布 812 个版本,首次发布于 2019/11/19;过去 12 个月发布了 142 个版本。

版本发布日期距今
15.1.0latest2026/11/096 天前
15.1.0-next.262026/11/096 天前
15.1.0-next.1-experimental-1e956962026/11/0213 天前
15.1.0-next.1-experimental-65945d22026/10/2917 天前
15.0.02026/10/2719 天前
15.0.0-next.232026/10/2620 天前

其他发布通道:094bb6d9783c80ccccd446a1d4e0603718ec585f → 0.0.0-experimental-24f6ac8677d52a91e787a5e03726b5e96ce5e12c,1a64864 → 0.0.0-experimental-5db9029,f83134d → 0.0.0-experimental-1a64864,b690b68 → 0.0.0-experimental-f83134d,56e9ae8 → 0.0.0-experimental-b690b68,1539a86 → 0.0.0-experimental-56e9ae8。

关于 @forge/cli 的常见问题

@forge/cli 是什么?

A command line interface for managing Atlassian-hosted apps

如何安装 @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 和提交记录判断。