@gscdump/devframe

中文文档
7.15.0发布于 2026/11/16MITTypeScriptES Module构建来源已验证近 30 天下载 6458

Search Console clicks, impressions, and queries for the page you are developing, in Vite DevTools and any devframe hub.

原始使用文档
文档目录9 节
  1. Vite
  2. Nuxt
  3. Any devframe hub
  4. Credentials
  5. Options
  6. Pages and windows
  7. Chrome extension (prototype)
  8. Coding agents
  9. License

@gscdump/devframe

Search Console data for the page you are developing, in Vite DevTools, Nuxt DevTools, and any devframe hub.

The dock shows clicks, impressions, CTR, and average position for the page that is open in your app, with the change against the previous window, a daily chart, and the top queries. It follows client-side navigation. Type any path or URL to read another page.

The data comes from your gscdump Hosted record, so the devtool makes no calls to Google.

npm install -D @gscdump/devframe

Vite

Enable Vite DevTools and add the plugin:

// vite.config.ts
import { gscdump } from '@gscdump/devframe/vite'
import { defineConfig } from 'vite'

export default defineConfig({
  devtools: true,
  plugins: [gscdump({ site: 'example.com' })],
})

@gscdump/devframe/vite needs @vitejs/devtools in the project.

Nuxt

Nuxt DevTools 4 hosts the Search Console dock. Add the official Nuxt module:

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['@gscdump/devframe/nuxt'],
  devtools: { enabled: true },
  gscdump: {
    site: 'example.com',
  },
})

Use Nuxt 4.5 or later and Nuxt DevTools 4:

pnpm add -D @gscdump/devframe @nuxt/devtools@^4.0.0-beta.3

The module runs during development only. Set gscdump.enabled: false to skip it. If Nuxt DevTools is disabled, the module skips the dock too. Credentials stay on the dev server. Never put them in public runtime config.

Setup guides: Nuxt and Vite.

Any devframe hub

createGscdumpDevframe() returns a devframe definition for any hub or adapter:

import { initHub } from '@devframes/hub/initiate'
import { createGscdumpDevframe } from '@gscdump/devframe'

const hub = initHub({
  base: '/__devframes/',
  devframes: [createGscdumpDevframe({ site: 'example.com' })],
})

Credentials

The devtool reads with a Hosted credential. It looks in this order:

  1. The apiKey option.
  2. The GSCDUMP_API_KEY environment variable: a user API key from gscdump.com.
  3. The CLI's Hosted login. Run gscdump auth login --mode hosted once.

The credential stays in the dev server process. The panel never receives it.

Options

OptionDefaultDescription
siteThe only SiteThe Site to read: a Site ID, a Site URL, or its host. If the credential holds several Sites and site is not set, the panel asks you to pick one.
apiKeySee CredentialsA gscdump user API key.
apiRootGSCDUMP_API_ROOT, then https://gscdump.com/apiThe Hosted API root.

Pages and windows

Search Console stores a Site's pages by path. The devtool reads the path of the page in view, with its query string, and ignores the dev server's origin. Search Console matches a path exactly, so /blog/ and /blog are different pages.

The window ends three days before today in Pacific time, because Google has not finalized newer days. The gscdump.com dashboard uses the same end. If the Hosted record ends earlier, the window ends on its last day. The comparison window is the same number of days just before it.

Chrome extension (prototype)

The same panel also builds as a Chrome side panel. It shows the stats for the page in the current tab, on your live site. It is not on the Chrome Web Store yet.

pnpm --filter @gscdump/devframe build:extension
  1. Open chrome://extensions and turn on Developer mode.
  2. Select Load unpacked, then select packages/devframe/dist-extension.
  3. Sign in to gscdump.com in the same browser.
  4. Open a page on one of your Sites, then select the extension's toolbar button.

The extension stores no API key. It reads your Sites with your gscdump.com login, and the tab's host selects the Site. It asks for two permissions: tabs, to read the current tab's address, and access to gscdump.com.

Coding agents

The get-page-stats function is also an MCP tool. When the host serves MCP (Vite DevTools does), a coding agent can read a page's clicks, impressions, CTR, position, and top queries while it changes the page.

License

MIT

版本与发布记录

@gscdump/devframe 共发布 37 个版本,首次发布于 2026/10/06;过去 12 个月发布了 37 个版本。最新版本附带 npm provenance 构建来源证明,可追溯到公开的 CI 构建记录。

版本发布日期距今
7.15.0latest2026/11/16今天
7.14.02026/11/16今天
7.13.22026/11/152 天前
7.13.12026/11/152 天前
7.13.02026/11/124 天前
7.12.12026/11/116 天前

关于 @gscdump/devframe 的常见问题

@gscdump/devframe 是什么?

Search Console clicks, impressions, and queries for the page you are developing, in Vite DevTools and any devframe hub.

如何安装 @gscdump/devframe?

在项目目录运行 npm install @gscdump/devframe,或使用 pnpm add / yarn add / bun add。

@gscdump/devframe 支持 TypeScript 吗?

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

@gscdump/devframe 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@gscdump/devframe 需要什么版本的 Node.js?

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

@gscdump/devframe 可以商用吗?

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

@gscdump/devframe 的下载量有多少?

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

@gscdump/devframe 还在维护吗?

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