@builder.io/dev-tools

中文文档
1.99.0发布于 2026/11/07MITTypeScriptESM + CJS近 30 天下载 8.3万

Builder.io Visual CMS Devtools

原始使用文档
文档目录10 节
  1. Installing Builder Devtools
  2. Local Development
  3. Manual Installation
  4. Next.js
  5. Remix
  6. Vite
  7. Webpack
  8. CLI
  9. Environment Variables
  10. BUILDER_DISABLE_AMPLITUDE

Builder.io Visual CMS Devtools

Setup and integrate Builder.io Visual CMS during development using the Devtools plugin. Builder Devtools can be integrated with a project's development through either a Next.js config, Remix config, Vite plugin, or Webpack plugin.

Installing Builder Devtools

Builder's Devtools can be installed and initialized using:

npm

npm init builder.io@latest

pnpm

pnpm create builder.io@latest

This command will update the config file (such as next.config.js, or vite.config.js) and install the @builder.io/dev-tools package. Once installed, you can start your app's dev server:

npm run dev

Local Development

To develop and test Builder Devtools locally:

  1. In the devtools directory, build and link the package:
cd dist/dev-tools
npm link
  1. In your application directory, link to the local devtools:
npm link @builder.io/dev-tools
  1. You can now run the Figma generate command:
npx builder.io figma generate

Manual Installation

Alternatively, you can manually install Builder's Devtools, and update the config files following the steps below.

npm install -D @builder.io/dev-tools

Next step is to add the Devtools plugin to your build tool's config file. For example, if you're using Next.js, see the docs below on how to import and add Devtools to a Next.js app.

Next.js

A config wrapper function for the Next.js config is provided in order to run Devtools during development. Wrap your existing next config using the withBuilderDevTools() function that's created when it is required at the top of the config file.

// next config file
const withBuilderDevTools = require("@builder.io/dev-tools/next")({
  // Builder Devtools Options
});

module.exports = withBuilderDevTools({
  // next config
});

Or configuration as a function:

module.exports = (phase, defaultConfig) => {
  return withBuilderDevTools(defaultConfig);
};

Remix

A config wrapper function for the Remix config is provided in order to run Devtools during development. Wrap your existing remix config using the withBuilderDevTools() function that's created when it is required at the top of the config file.

// remix config file
const withBuilderDevTools = require("@builder.io/dev-tools/remix")({
  // Builder Devtools Options
});

module.exports = withBuilderDevTools({
  // remix config
});

Vite

The Vite plugin for Devtools is meant for frameworks using Vite for its development. Currently, Devtools supports Qwik integrated with Vite. Import builderDevTools from @builder.io/dev-tools/vite and place it as the the first plugin to ensure it runs before others.

// vite config file
import { defineConfig } from "vite";
import { builderDevTools } from "@builder.io/dev-tools/vite";

export default defineConfig(() => {
  return {
    plugins: [builderDevTools()],
  };
});

Webpack

The Devtools webpack plugin is for React projects. If your project is using Next.js, please see the Next.js docs above on how to add the Devtools plugin to the next config. Below is a general webpack config for a React project.

// webpack config file
const { BuilderDevToolsPlugin } = require("@builder.io/dev-tools/webpack");

module.exports = {
  plugins: [new BuilderDevToolsPlugin()],
};

CLI

Devtools can also be started with a CLI command, which could be useful if there is a custom setup that doesn't fit into one of the above solutions. Below is an example of running CLI from an npm script:

{
  "scripts": {
    "devtools": "builder-dev-tools"
  }
}

Environment Variables

BUILDER_DISABLE_AMPLITUDE

Set BUILDER_DISABLE_AMPLITUDE=true to disable Amplitude analytics tracking when using the devtools CLI. This is useful for privacy-conscious environments or when you want to prevent analytics data collection.

BUILDER_DISABLE_AMPLITUDE=true npx builder.io fusion dev

Or add it to your .env file:

BUILDER_DISABLE_AMPLITUDE=true

版本与发布记录

@builder.io/dev-tools 共发布 3,425 个版本,首次发布于 2023/06/04;过去 12 个月发布了 2387 个版本。

版本发布日期距今
1.99.0latest2026/11/071 天前
1.98.0-beta.202611062124.80e45fa.add-zip-project-import-an-upload-project2026/11/071 天前
1.98.0-beta.202611062130.55cec3f.add-zip-project-import-an-upload-project2026/11/071 天前
1.98.02026/11/062 天前
1.97.3-beta.202611052143.784bcbc.add-a-pushchanges-agent-tool-that-pushes2026/11/062 天前
1.97.3-beta.202611052124.39b9bd0.add-a-pushchanges-agent-tool-that-pushes2026/11/062 天前

其他发布通道:next → 1.1.0-rc2,swiftui-dev → 1.12.8-dev.202510091738.9cf43dfdc,testcode → 1.23.2-dev.202602051100.c568a93ba,testcode2 → 1.23.2-dev.202602051122.c568a93ba,testcode3 → 1.23.2-dev.202602051139.c568a93ba,withrg → 1.23.2-dev.202602051146.fe3b61289。

关于 @builder.io/dev-tools 的常见问题

@builder.io/dev-tools 是什么?

Builder.io Visual CMS Devtools

如何安装 @builder.io/dev-tools?

在项目目录运行 npm install @builder.io/dev-tools,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 builderio、builder.io、builder-dev-tools,可以用 npx builderio 直接运行。

@builder.io/dev-tools 支持 TypeScript 吗?

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

@builder.io/dev-tools 支持 ESM 还是 CommonJS?

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

@builder.io/dev-tools 需要什么版本的 Node.js?

package.json 的 engines 字段要求 Node.js >=18。版本不符时 npm 默认只给出警告,开启 engine-strict 后会拒绝安装。

@builder.io/dev-tools 可以商用吗?

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

@builder.io/dev-tools 的下载量有多少?

根据 npm 官方下载统计,@builder.io/dev-tools 在 2026/10/09 – 2026/11/07 这 30 天内被下载 83,216 次,日均约 2,774 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@builder.io/dev-tools 还在维护吗?

最新版本 1.99.0 发布于 2026/11/07(1 天前);至今共发布 3425 个版本,其中过去 12 个月发布了 2387 个;首次发布于 2023/06/04。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。