---
title: "earthtojake/text-to-cad: Give your agent CAD superpowers."
source: "https://github.com/earthtojake/text-to-cad"
author:
published:
created: 2026-10-15
description: "Give your agent CAD superpowers. Contribute to earthtojake/text-to-cad development by creating an account on GitHub."
tags:
  - "clippings"
---
## 文本转CAD

这款文本转CAD插件为您的代理商提供本地工作流程，用于生成STEP、GLB、STL或3MF格式的3D模型文件。它还能进行面向制造的设计检查、生成工程图纸，并连接到常用的3D打印、钣金和CNC加工服务。

它受到所有支持插件或 [技能](https://skills.sh/) 框架的流行代理的支持，包括 Claude Code、Codex、Cursor、Gemini 和 Grok。

## 💻 安装

### 咨询您的经纪人（推荐）

将此消息发送给您的代理，他们将为您安装 text-to-cad 程序。

```
Install text-to-cad from https://github.com/earthtojake/text-to-cad
```

默认情况下，文本转CAD功能会发送使用统计信息和崩溃报告，并附上随机ID标签，且绝不会包含您的文件、路径或提示信息；您可以使用\`--command\`命令关闭此功能 `uvx cadgen telemetry off` ，或请您的代理进行设置。 [遥测数据](#telemetry) 会显示更多信息。

或者自行安装：

1. [CAD 通过uv](https://docs.astral.sh/uv/) 运行 ：检查它是否已安装（ `uv --version` ），如果缺少，请使用 [uv 的安装程序](https://docs.astral.sh/uv/getting-started/installation/) 进行安装。
2. 请运行以下代理应用程序标题下的命令， 如果没有标题，则运行 [“其他代理”下的命令。](#other-agents)
3. 重启应用程序。首次启动时需要下载CAD运行时环境，因此需要网络连接。

您的代理应用程序插件会提供技能和 CAD 查看器，以及一个本地服务器（ `cadgen mcp` ）。对于没有插件的代理，请单独安装技能。应用程序中只能安装其中之一，不能同时安装两者：安装两份意味着每个技能都安装了两次。

以下安装命令会指定 `latest` 分支：该分支仅包含插件本身，并在插件发布到 PyPI 后立即安装。 `main` 开发分支也会安装，但可以包含尚未发布的更改。每个应用程序都以自己的方式命名分支（例如 \`<app\_name>\` `#latest` 、 `--ref latest` \` `@latest` <app\_name>\` 或 \`<app\_name> `--branch latest` \`）；如果省略分支，则应用程序将直接安装 `main` 。

每个应用程序的标题还会说明如何更新文本转CAD插件以及如何重新安装：先卸载，然后再重新安装。更新插件会同时更新CAD：新版本的CAD生成器会在首次运行时下载，技能和服务器会共享该生成器。早期版本会保留在UV的缓存中，直到您再次运行 `uv cache prune` 。

### 克劳德·科德

```
claude plugin marketplace add earthtojake/text-to-cad#latest
claude plugin install text-to-cad@earthtojake
```

该插件还会启动 CAD 服务器。Claude Code 可以显示应用程序视图，而 CAD 则在对话中以查看器卡片的形式显示模型；或者，就像在终端中一样，请求显示模型会得到一个链接，点击该链接即可在浏览器中的 CAD 查看器中打开模型。

要进行更新，请运行以下命令，然后重启 Claude Code：

```
claude plugin marketplace update earthtojake
claude plugin update text-to-cad@earthtojake
```

要重新安装，请使用以下命令将其卸载，然后再次运行安装命令：

```
claude plugin uninstall text-to-cad@earthtojake
claude plugin marketplace remove earthtojake
```

### 克劳德桌面

CAD 会在聊天中显示模型：让 Claude 显示一个模型，它会以查看卡片的形式出现，您可以旋转查看、添加到提示符并全屏打开；Claude 可以读取您选择的内容并看到您所看到的内容。它通过 uv 在本地运行：将服务器添加到 Claude Desktop 的配置中（设置 > 开发者 > 编辑配置），然后重启应用程序。如果 Claude Desktop 找不到 uv `uvx` ，请提供其完整路径（ `which uvx` ）。

```
{
  "mcpServers": {
    "cad": {
      "command": "uvx",
      "args": ["--no-config", "--managed-python", "--python", "3.13", "--from", "cadgen==0.7.21", "cadgen", "mcp"],
      "env": {"CADGEN_INSTALL_CHANNEL": "claude-desktop"}
    }
  }
}
```

配置会将 Cadden 版本锁定在某个特定位置 `args` ，而 uvx 会保留它首次下载的版本。要更新，请将该版本更改为 [最新版本](https://pypi.org/project/cadgen/) ，然后重启 Claude Desktop。

### 法典

从 Codex 的插件目录安装 text-to-cad： [text-to-cad for Codex](https://chatgpt.com/plugins/plugins_6ac09476ef008191a35887b22b0d048a) ，然后 **在桌面应用程序中打开** 。

在 Codex 应用中，该插件还引入了 CAD 查看器： 侧边栏中的 **CAD** （最近的模型和打开），代理驱动的每个线程旁边的 **CAD选项卡，以及** *用于模型文件的“使用 CAD 打开”* 。

手动安装
```
codex plugin marketplace add earthtojake/text-to-cad --ref latest
codex plugin add text-to-cad@earthtojake
```

要进行更新，请升级 `earthtojake` 应用商店（或使用“插件”>“管理”>“应用商店”），然后重启 Codex：

```
codex plugin marketplace upgrade earthtojake
```

要重新安装，请使用以下命令将其卸载，然后再次运行安装命令：

```
codex plugin remove text-to-cad@earthtojake
codex plugin marketplace remove earthtojake
```

该市场已从 更名为 `text-to-cad` ； `earthtojake` 如果您之前添加了它，请先删除旧名称（ `codex plugin marketplace remove text-to-cad` ）。

### 光标

Cursor 还会加载随 Claude Code 安装的插件。如果已安装 Claude Code 插件，则 Cursor 已具备文本转 CAD 功能，可跳过此步骤。

```
git clone --depth 1 --branch latest https://github.com/earthtojake/text-to-cad ~/.cursor/plugins/local/text-to-cad
```

Cursor 读取：克隆后重启 Cursor。团队也可以在 **“控制面板”→“插件和 MCP”→“团队市场”**`.cursor-plugin/plugin.json` 下导入存储库 。

要进行更新，请拉取最新版本，然后重启 Cursor：

```
git -C ~/.cursor/plugins/local/text-to-cad pull
```

要重新安装，请删除该文件夹，然后再次运行安装命令：

```
rm -rf ~/.cursor/plugins/local/text-to-cad
```

### Grok 构建

Grok Build 还会加载随 Claude Code 安装的插件。如果已安装 Claude Code 插件，则 Grok Build 已具备 text-to-cad 功能，可跳过此步骤。

```
grok plugin install earthtojake/text-to-cad@latest --trust
grok plugin enable text-to-cad
```

Grok Build 会读取 Claude 插件清单。Grok 将工具结果以文本形式显示，因此，如果要求它显示模型，则会得到一个 CAD 查看器链接。

要更新，请运行此命令，然后重启 Grok 构建：

```
grok plugin update text-to-cad
```

要重新安装，请使用以下命令将其卸载，然后再次运行安装命令：

```
grok plugin uninstall text-to-cad
```

### 双子座

```
gemini extensions install https://github.com/earthtojake/text-to-cad --ref latest --consent --auto-update
```

Gemini 会将插件作为扩展程序安装，并获取其技能和 CAD 服务器，同时保持插件更新（ `--auto-update` 通过 `--consent` 回答安全提示）。与 Grok 类似，它将工具结果以文本形式显示，因此，如果要求它显示模型，则会提供一个 CAD 查看器链接。

立即更新，请运行此命令，然后重启 Gemini：

```
gemini extensions update text-to-cad
```

要重新安装，请使用以下命令将其卸载，然后再次运行安装命令：

```
gemini extensions uninstall text-to-cad
```

### 其他代理人

对于不支持插件的代理：这些技能包为您提供核心 CAD 工作流程所需的一切，并允许您在本地 Web 应用程序中查看 CAD 文件。使用 Skills CLI 安装它们：

```
npx skills add earthtojake/text-to-cad#latest
```

该命令会询问要为哪些代理安装，以及安装位置。要跳过这些问题，请为您的用户命名并安装代理： `npx skills add earthtojake/text-to-cad#latest -g -a <agent> -y` 。

每个技能都会使用插件服务器使用的相同固定命令，通过 uv 运行 cadgen，因此必须安装 uv。如果没有该插件，则没有 CAD 服务器，因此这些技能会在浏览器中的 CAD 查看器中打开模型。

**要更新或重新安装，请再次运行相同的命令** ，然后重启应用程序。 `add` 此操作会重新获取软件包并覆盖已安装的内容，因此它既会刷新现有技能，也会安装新版本中添加的任何技能。它 `npx skills update` 只会刷新锁定文件中已有的技能，因此会忽略新添加的技能——这一点很重要，因为版本更新确实会添加新技能。

这两个命令都不会移除上游已停用的技能； `npx skills remove <skill>` 如果需要，请使用相应命令删除。已停用的 `cad-viewer` 技能现在由 CAD、DXF 和机器人描述技能涵盖，而已停用的技能 `cad-mcp-setup` 则由本 README 文件中的安装和更新步骤处理。使用相应命令移除旧的独立安装 `npx skills remove cad-viewer cad-mcp-setup` 。

您的代理还没有插件吗？ [申请一个吧](https://github.com/earthtojake/text-to-cad/issues/new?title=Plugin%20request%3A%20) 。

### 更新

要进行更新，请让您的代理更新 text-to-cad，或者运行应用程序标题下的更新命令，然后重新启动应用程序。

When a newer release is out, a copy you installed yourself says so: a blue update button, first in CAD's navbar and on its home, whose **Send to agent** posts "Update text-to-cad to 0.9.0 from [https://github.com/earthtojake/text-to-cad](https://github.com/earthtojake/text-to-cad) " to your chat, worded like the install message (the browser viewer's copies it instead), or, in an app that shows CAD's replies as text, a line with its reply. Your agent then runs the update commands under your app's heading here. The button also links to the [install instructions](https://www.texttocad.dev/install), to update by hand. Copies from a plugin directory or the Cursor Marketplace never show it, since their store updates them, and neither does Gemini's extension, which Gemini updates: for those there is nothing to run.

To find out, cadgen fetches `api.texttocad.dev/v1/versions` at most once a day: one anonymous request, with no ID, path or anything about you, never in CI and never for a copy that something else updates. `CADGEN_UPDATE_CHECK=0` turns it off.

### Telemetry

The CAD app (the plugin's `cad` server), the browser viewer (`cadgen viewer`) and the build daemon that builds for them and for every `cadgen` command send usage stats by default, tagged with a random install ID: versions, where you installed it from (as the plugin's CAD app names it, noted in cadgen's state folder for the other two), your OS and agent app, and counts -- how often each CAD tool was called and why a call failed (one of a fixed set of words, such as "no file at that path" or "no view open", never its message), how often views were used, how many files of each format were shown, how many models were built and snapshots rendered, how those ended, why one failed (again a fixed word, such as "the model's code raised" or "the geometry kernel refused", never its message) and how long they took, which features were used -- added up over a few minutes before they are sent, each batch under a random ID of its own and the time it was made, so one sent again is counted once. When cadgen's own code fails, they also send a crash report: the error's type and where in cadgen (or Python, or one of its dependencies) it failed, never its message, and with any of your own code a bare placeholder. Our server adds the country each request comes from (worked out from its IP address, which it doesn't keep) and stores it all with PostHog. Never file names, paths, contents or prompts. The first `cadgen` command says so once, and sending starts then. Turn it off, which also deletes what was sent, with `uvx cadgen telemetry off`, **Share usage stats** in either app's menu (the logo at the top left, over any model), or by asking your agent. `DO_NOT_TRACK=1` or `CADGEN_TELEMETRY=0` turns it off for one process, and `CADGEN_TELEMETRY=1` on, without changing your setting; nothing is sent by default in CI or from a development install. Nothing waits to send: what a command counts without the build daemon, and what any part of cadgen counted since its last send when it exits, waits in small files in cadgen's state folder until the next part of cadgen sends it in the background; turning telemetry off deletes them. Offline, nothing is sent and everything works. See the [privacy policy](https://www.texttocad.dev/privacy-policy).

### Windows 11: Smart App Control

The CAD kernel behind the `cad`, `dxf`, `urdf`, `srdf` and `sdf` skills is `OCP`, OpenCascade's Python binding, and its wheel ships an unsigned native module. Windows 11's Smart App Control blocks unsigned native code, so on a machine where it is on (the default on a fresh install) every `cadgen` command and `import build123d` fails with `ImportError: DLL load failed while importing OCP`, and Event Viewer records the refusal as Event ID 3077 under CodeIntegrity › Operational. `cadgen doctor` names this when it sees it.

智能应用控制没有针对特定应用的例外情况。您可以将其关闭（设置 › 隐私和安全 › Windows 安全中心 › 应用和浏览器控制 › 智能应用控制设置；关闭后只能通过重装 Windows 系统重新启用），或者在 WSL（Windows 子系统）下运行 CAD 技能，因为 WSL 不受此限制。此 wheel 文件由 cadquery-ocp 项目构建，因此本仓库无法对其进行签名。

## 🧰 技能

安装该库，为代理提供针对 CAD、制造、机器人描述文件、仿真和本地审查的专注工作流程。

| 技能 | 概括 | 来源 |
| --- | --- | --- |
| 计算机辅助设计 | 根据纯语言或图像请求创建和编辑 CAD 模型，主要输出格式为 STEP，并可选择导出为 STL、3MF 和 GLB 格式。 | [技能/CAD](https://github.com/earthtojake/text-to-cad/blob/main/skills/cad/SKILL.md) |
| 步骤部分 | 查找现成的 STEP 零件，例如螺丝、轴承、电机和连接器。 | [技能/步骤部分](https://github.com/earthtojake/text-to-cad/blob/main/skills/step-parts/SKILL.md) |
| 工程图 | 零件的尺寸标注工程图，PDF 格式：视图、隐藏线、尺寸标注、孔标注、标题栏。 | [技能/工程制图](https://github.com/earthtojake/text-to-cad/blob/main/skills/engineering-drawing/SKILL.md) |
| DXF | 根据 Python 源文件或 CAD 几何图形创建 2D DXF 图形，例如轮廓图、模板、垫片和切割布局。 | [技能/DXF](https://github.com/earthtojake/text-to-cad/blob/main/skills/dxf/SKILL.md) |
| URDF | 写入包含连杆、关节、极限、惯性和网格的机器人结构文件。 | [技能/URDF](https://github.com/earthtojake/text-to-cad/blob/main/skills/urdf/SKILL.md) |
| SRDF | 向 URDF 添加 MoveIt 规划组、末端执行器、姿态和碰撞规则。 | [技能/SRDF](https://github.com/earthtojake/text-to-cad/blob/main/skills/srdf/SKILL.md) |
| 战略防御 | 创建带有框架、物理、传感器和灯光的模拟器模型和世界。 | [技能/SDF](https://github.com/earthtojake/text-to-cad/blob/main/skills/sdf/SKILL.md) |
| 发送剪切发送 | 在上传到 SendCutSend 之前检查 DXF 和 STEP 文件。 | [技能/发送/发送](https://github.com/earthtojake/text-to-cad/blob/main/skills/sendcutsend/SKILL.md) |
| DfAM 检查 | 测量每个工艺的网格可打印性：壁厚、悬垂、支撑体积和构建方向。 | [技能/家庭检查](https://github.com/earthtojake/text-to-cad/blob/main/skills/dfam-check/SKILL.md) |
| DFM | 对钣金、数控加工或注塑成型的零件进行审查，提供测量证据，并引用规则解释每一项发现；测量网格的拔模斜度、倒扣和投影面积。 | [技能/设计制造](https://github.com/earthtojake/text-to-cad/blob/main/skills/dfm/SKILL.md) |
| G代码 | 使用 OrcaSlicer 和您自己的打印机预设，将模型切片成可用于打印机的 G 代码。 | [技能/G代码](https://github.com/earthtojake/text-to-cad/blob/main/skills/gcode/SKILL.md) |
| 竹子实验室 | 通过 Bambu Connect（Bambu Lab 的官方应用程序）或 Bambu Studio 将打印件发送到 Bambu Lab 打印机。 | [技能/竹子实验室](https://github.com/earthtojake/text-to-cad/blob/main/skills/bambu-labs/SKILL.md) |

## 🛠️ 贡献

从该分支 `main` 创建 PR 并提交 PR `main` 。有关本地工作流程、代理应用程序中的测试和验证，请参阅 [CONTRIBUTING.md](https://github.com/earthtojake/text-to-cad/blob/main/CONTRIBUTING.md) 。