@bedframe/cli

中文文档
0.1.2发布于 2026/03/17MITTypeScriptESM + CJS近 30 天下载 5778

Bedframe CLI - your Browser Extension Development framework (dev utility)

原始使用文档
文档目录13 节
  1. @bedframe/cli
  2. Installation
  3. Making your BED
  4. Commands
  5. M A K E
  6. Args
  7. Flags / Options
  8. Options
  9. V E R S I O N
  10. P U B L I S H
  11. D E V
  12. B U I L D
  13. Z I P
>_

B R O W S E R
E X T E N S I O N
D E V E L O P M E N T
F R A M E W O R K

@bedframe/cli - NPM version @bedframe/core - NPM version

@bedframe/cli

Bedframe - Make, Version & Publish cross-browser extensions continously with ease bedframe-cli

The Bedframe Command Line Interface (CLI) lets you make and manage your BED directly from the terminal.

Installation


Node Version Requirement

Bedframe CLI requires Node.js version 18+. 20+. You can manage multiple versions of Node on the same machine with n, nvm or nvm-windows.

#  with bun
bun add @bedframe/cli -g

#  with pnpm
pnpm add @bedframe/cli -g

# with npm
npm install @bedframe/cli -g

# with yarn
yarn add @bedframe/cli -g

After installation, you will have access to the bedframe executable in your command line. You can verify that it is properly installed by simply running bedframe, which should present you with an intro and help message.

>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

  @bedframe/cli v0.0.78


Usage: @bedframe/cli [options] [command]

Bedframe CLI - your Browser Extension Development framework (dev utility)

Options:
  -V, --version             output the version number
  -h, --help                display help for command

Commands:
  make [options] [name]     make your B E D
  version [options]         create or update git release of current version (changeset version)
  publish [options]         publish new or update existing extension(s)
                            - chrome: Chrome Web Store (C W S)
                            - firefox: Mozilla/Firefox Add-ons (A M O)
                            - edge: MS Edge Add-ons (M E A)
  dev [browsers]            start Vite dev server for one or more browsers concurrently
  build [browsers]          generate prod builds for 1 or more browsers concurrently
  zip [options] [browsers]  zip browser dist directories
  help [command]            display help for command

You can check you have the right version with this command:

bedframe --version

Making your BED

To create a new bedframe project, run:

bedframe make

Then follow the prompts!

You can specify the project name as the first argument of the make command. Using . for the project name will scaffold the project in the current directory.

# scaffold project called `chrome-extension`
bedframe make chrome-extension

# scaffold project in the current directory
bedframe make .

You will then be prompted to configure your BED, picking Framework, Language, Browser to target, etc. All configurations can be manually edited once you generate the project.

Bedframe - Make, Version & Publish cross-browser extensions continously with ease

Commands

M A K E

The Bedframe make command walks you through creating a Vite-powered, prod-ready Browser Extension Environment: one codebase continously deployed to version control and automatically published to all browser stores (currently Chrome, Firefox, and Edge).

You end up with a familiar Vite-powered project you're used to.

Run the make command to launch the project gen prompts.

Alternatively: this command is also available as the standalone create-bedframe package.

Command Details

>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

  @bedframe/cli v0.0.78


Usage: @bedframe/cli make [options] [name]

make your B E D

Arguments:
  name                                   project name

Options:
  -b, --browsers <browsers>              comma-separated list browsers (chrome, edge, firefox, etc)
  -v, --version <version>                project version (0.0.1)
  -d, --description <description>        project description
  -a, --author <author>                  project author  (name, email, url)
  --license <license>                    project license (MIT)
  -r, --private                          visibility of project (true)
  -t, --type <type>                      extension type (popup)
  --override <override>                  page to override (newtab)
  --options <options>                    whether to and how render options (embedded)
  -p, --packageManager <packageManager>  package manager to use (pnpm)
  -f, --framework <framework>            framework to use (react)
  -l, --language <language>              language to use (typescript)
  -s, --style <style>                    css framework to use (tailwind)
  -o, --lintFormat                       add linting with formatting (true)
  -e, --tests                            add tests (vitest + testing library) (true)
  -g, --git                              initialize git for source control (true)
  -h, --gitHooks                         use git hooks (true)
  -c, --commitLint                       use commit linting (true)
  -x, --changesets                       use changesets (true)
  -i, --installDeps                      install dependencies (true)
  -y, --yes                              make your BED w/ preconfigured defaults (false)
  --help                                 display help for command

Args

Name

The CLI name argument sets manifests' name property (required) which is a short, plain text string (maximum of 45 characters) that identifies the extension. For example:

{
  "name": "My extension name"
}

You can specify a locale-specific string; see Internationalization for details.

It is displayed in the following locations:

See also Short Name.

Flags / Options

You can optionally by-pass the prompts if you pass in the requisite flags to the make command.

As an example, to scaffold a multi-extension project i.e. BED environment targeting Chrome, Brave, Opera and Edge browsers you can run:

$ bedframe make multi-extension-project \
  --browsers 'chrome, firefox, safari, brave, opera, edge' \
  --version '0.0.0'  \
  --description 'this is my BED! there are many like it, but this one is... MINE!!!'  \
  --author 'joe, [email protected], https://bedframe.dev'  \
  --license MIT  \
  --private  \
  --type overlay  \
  --override newtab  \
  --options embedded  \
  --packageManager bun \
  --framework react \
  --language typescript \
  --style tailwind \
  --lintFormat \
  --tests \
  --git \
  --gitHooks \
  --commitLint \
  --changesets \
  --installDeps

If any required configuration isn't passed in via flags the CLI will prompt you for the missing requirements.

Options

Flag (short)Flag (long)TypeDescriptionDefault
-v--versionstringSpecify project version0.0.1
-b--browsersBrowser[]Specify comma-separated list of target browserschrome
-p--packageManager PackageManagerSpecify package manager to useyarn
-f--frameworkFrameworkSpecify framework to usereact
-l--languageLanguageSpecify language to usetypescript
-s--styleStyleSpecify CSS solution to usetailwind
-o--lintFormatbooleanConfigure linting with formattingtrue
-g--gitbooleanInitialize git source controltrue
-h--gitHooksbooleanAdd git hooks (Husky + lint staged)true
-t--testsbooleanAdd tests (Vitest + Testing Library + jsdom)true
-c--commitLintbooleanAdd commit lintingtrue
-x--changesetsbooleanAdd changesetstrue
-i--installDepsbooleanAdd & install dependenciestrue
-y--yesbooleanSet up Bedframe w/ preconfigured defaultsfalse
--helpdisplay help for command
Package Manager Pick from either npm, yarn or pnpm
Version

The version passed in via the Bedframe CLI make command flag (-v, --version) or via prompt response is used to set the version for both your project's package.json and the (one or more) manifests for the extension(s) in your project.

Note

The `version` in manifest.json is not in semVer while the `version` in pacakge.json must be parseable by node-semver. If you find the two need to be different in your project, you can alternatively pass in the Version Name flag (`--versionName`) and this will be the semVer-valid `version` used in the package.json and as `version_name` in manifest.json.

One to four dot-separated integers identifying the version of this extension. A couple of rules apply to the integers:

The integers must be between 0 and 65535, inclusive. Non-zero integers can't start with 0. For example, 032 is invalid because it begins with a zero. They must not be all zero. For example, 0 and 0.0.0.0 are invalid while 0.1.0.0 is valid.

Here are some examples of valid versions:

  • "version": "1"
  • "version": "1.0"
  • "version": "2.10.2"
  • "version": "3.1.2.4567"

If the published extension has a newer version string than the installed extension, then the extension is automatically updated.

The comparison starts with the leftmost integers. Then, if those integers are equal, the integers to the right are compared, and so on. For example, 1.2.0 is a newer version than 1.1.9.9999.

A missing integer is equal to zero. For example, 1.1.9.9999 is newer than 1.1, and 1.1.9.9999 is older than 1.2.

Browser
framework
language
style
lintFormat
git
gitHooks
tests
commitLint
changesets
installDeps
yes
help

V E R S I O N

create or update git release of current version

Command Details
>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli version [options]

create or update git release of current version (changeset version)

Options:
  --ignore <package>  skip a package from being published
  --snapshot          create a snapshot release for testing
  -h, --help          display help for command

P U B L I S H

publish new or update existing extension(s)

Command Details
>_

B R O W S E R
E X T E N S I O N
D E V E L O P M E N T
F R A M E W O R K

Usage: @bedframe/cli publish [options]

• publish new or update existing extension(s)
├ • C W S: Chrome Web Store
├ • A M O: Mozilla/Firefox Add-ons
└ • M E A: MS Edge Add-ons

Options:
-b, --browsers <browsers...> specify browsers to publish (chrome,firefox,edge)
-h, --help display help for command

D E V

start vite dev server for 1 or more browsers.
alias for vite dev w/ --mode <browser>

Command Details
>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli dev [options] [browsers]

start Vite dev server for one or more browsers concurrently

Options:
  -h, --help  display help for command
> bedframe dev
6 BEDs starting vite dev server! 🚀
└ dist/
  ├ brave/
  ├ chrome/
  ├ edge/
  ├ firefox/
  ├ opera/
  └ safari/

B U I L D

generate prod builds for 1 or more browsers
alias for vite build w/ --mode <browser>

Command Details
>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli build [options] [browsers]

generate prod builds for 1 or more browsers concurrently

Options:
  -h, --help  display help for command

Z I P

create zip archive(s) for 1 or more browsers

Command Details
>_

  B R O W S E R
  E X T E N S I O N
  D E V E L O P M E N T
  F R A M E W O R K

Usage: @bedframe/cli zip [options] [browsers]

zip browser dist directories

Arguments:
  browsers                 list of browser names

Options:
  -d, --distDir <distDir>  current dist dir to create archive from (e.g. -d
                           ./dist/<browser>)
  -n, --name <name>        what to name the zip file (including .zip)
  -h, --help               display help for command

版本与发布记录

@bedframe/cli 共发布 94 个版本,首次发布于 2023/05/22;过去 12 个月发布了 3 个版本。

版本发布日期距今
0.1.2latest2026/03/177 个月前
0.1.12026/03/107 个月前
0.1.02026/03/107 个月前
0.0.952025/06/231.4 年前
0.0.942025/06/231.4 年前
0.0.932025/06/231.4 年前

关于 @bedframe/cli 的常见问题

@bedframe/cli 是什么?

Bedframe CLI - your Browser Extension Development framework (dev utility)

如何安装 @bedframe/cli?

在项目目录运行 npm install @bedframe/cli,或使用 pnpm add / yarn add / bun add。它还需要宿主项目提供 peer 依赖:concurrently(^8.2.1)。npm 7 及以上与 pnpm 8 及以上默认会自动安装必需的 peer 依赖,Yarn 需要手动安装。它还提供命令行工具 bedframe、create-bedframe,可以用 npx bedframe 直接运行。

@bedframe/cli 支持 TypeScript 吗?

支持。包内自带 TypeScript 类型声明(package.json 声明了 types 入口),安装后即可获得类型提示,无需再安装 @types 包。

@bedframe/cli 支持 ESM 还是 CommonJS?

同时提供 ES Module 与 CommonJS 入口,import 和 require() 都可以使用,打包工具会自动选择合适的版本。

@bedframe/cli 可以商用吗?

@bedframe/cli 使用 MIT 许可。宽松许可:允许商业使用、修改和再分发,通常只需在分发时保留原版权与许可声明。以上为概括,不构成法律意见,请以许可原文为准。

@bedframe/cli 的下载量有多少?

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

@bedframe/cli 还在维护吗?

最新版本 0.1.2 发布于 2026/03/17(7 个月前);至今共发布 94 个版本,其中过去 12 个月发布了 3 个;首次发布于 2023/05/22。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。