# @guidepup/record 中文文档

规范地址：https://npmcn.com/package/%40guidepup/record/

版本：0\.3\.0
npm 元数据更新时间：2026-10-10T16:43:35.310Z
中文译文更新时间：2026-11-17T03:07:04.356Z
软件包许可：MIT

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

原始 npm 页面：https://www.npmjs.com/package/%40guidepup/record
原文对照：https://npmcn.com/package/%40guidepup/record/?lang=original
项目主页：https://github.com/guidepup/record
源码仓库：https://github.com/guidepup/record

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

- 包体积（解压后）：16.2 kB，13 个文件
- 模块格式：CommonJS
- TypeScript 类型：包内自带
- 运行依赖：1 个
- 首次发布：2024-09-14T09:18:33.581Z
- 最新版本发布：2026-10-10T16:43:34.997Z
- 近 30 天下载量：137617（2026-10-17 至 2026-11-15，npm 官方下载统计）
- 已发布版本数：3（近 12 个月 2 个）

## 中文简介

用于屏幕记录的工具 .

## 安装

```sh
npm install @guidepup/record
```

也可以使用：`pnpm add @guidepup/record`、`yarn add @guidepup/record`、`bun add @guidepup/record`

## README

# 记录

[![Available on NPM](https://img.shields.io/npm/v/@guidepup/record)](https://www.npmjs.com/package/@guidepup/record) [![Test workflows](https://github.com/guidepup/record/workflows/Test/badge.svg)](https://github.com/guidepup/record/actions/workflows/test.yml) [![This project uses the MIT license](https://img.shields.io/github/license/guidepup/record)](https://github.com/guidepup/record/blob/main/LICENSE)

## 开始

安装到您的工程 :

```bash
npm install @guidepup/record
```

### 自动选择平台

使用 `record` 以选择当前操作系统的记录器 :

```ts
import { record } from "@guidepup/record";

const stopRecording = record("./recordings/screenRecording.mp4");

// ... perform some commands.

await stopRecording();
```

在 Linux 上,自动选择使用 X11 记录器并需要 `DISPLAY` 环境变量。 仅Wayland会话不支持.

### 窗口

在 Windows 上开始屏幕记录 :

```ts
import { windowsRecord } from "@guidepup/record";

(async () => {
  // Start the screen recording passing the location to save the recording.
  const stopRecording = windowsRecord("./recordings/screenRecording.mp4");

  // ... perform some commands.

  // Stop the screen recording.
  await stopRecording();
})();
```

### 麦克OS

在MacOS上开始屏幕录制.

```ts
import { macOSRecord } from "@guidepup/record";

(async () => {
  // Start the screen recording passing the location to save the recording.
  const stopRecording = macOSRecord("./recordings/screenRecording.mov");

  // ... perform some commands.

  // Stop the screen recording.
  await stopRecording();
})();
```

### 链接

使用 X11 显示器在 Linux 上启动屏幕记录 。 这个 `DISPLAY` 环境变量必须识别显示。 只有Wayland会议不是 由此记录器支持.

```ts
import { linuxRecord } from "@guidepup/record";

(async () => {
  // Start the screen recording passing the location to save the recording.
  const stopRecording = linuxRecord("./recordings/screenRecording.mp4");

  // ... perform some commands.

  // Stop the screen recording.
  await stopRecording();
})();
```

## 资源

-   [捐款](https://npmcn.com/package/%40guidepup/record/.github/CONTRIBUTING.md)
-   [更改日志](https://github.com/guidepup/record/releases)
-   [MIT 许可证](https://github.com/guidepup/record/blob/main/LICENSE)

## 常见问题

### @guidepup/record 是什么？

用于屏幕记录的工具 \.

### 如何安装 @guidepup/record？

在项目目录运行 npm install @guidepup/record，或使用 pnpm add / yarn add / bun add。

### @guidepup/record 支持 TypeScript 吗？

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

### @guidepup/record 支持 ESM 还是 CommonJS？

以 CommonJS 形式发布，可以直接 require\(\)；在 ES Module 项目中也可以用 import 引入（Node\.js 会把 module\.exports 作为默认导出）。

### @guidepup/record 可以商用吗？

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

### @guidepup/record 的下载量有多少？

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

### @guidepup/record 还在维护吗？

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

