内容
# 技术手册 AI — Claude 代码插件
在 Claude Code 中直接搜索和检索 T&M、工业和电力电子设备结构化技术文档。
## 安装
**步骤 1 — 获取免费 API 密钥**,请访问 [techmanual.ai/setup](https://techmanual.ai/setup)(无需账户)。
**步骤 2 — 在终端中设置您的 API 密钥**,终端将在此处启动 Claude Code:
```bash
# macOS / Linux
export TMAI_API_KEY=您的密钥
```
```powershell
# Windows (PowerShell)
$env:TMAI_API_KEY="您的密钥"
```
**步骤 3 — 从终端启动 Claude Code**
```bash
claude
```
> 使用 `claude` 命令行界面,而不是 VS Code 边栏扩展 — 插件系统需要终端客户端。
**步骤 4 — 安装插件**
在 Claude Code 会话中运行每个命令,按顺序执行:
```
/plugin marketplace add techmanual-ai/claude-plugin
```
```
/plugin install techmanual@techmanual-ai
```
```
/reload-plugins
```
完成。`search`、`list_manuals` 和 `get_page` 工具现已可用。Claude 将在首次使用时提供永久保存您的 API 密钥的选项 — 无需编辑 shell 配置文件。

## 功能
安装完成后,Claude 将在以下情况下主动拉取相关文档:
- 编写 SCPI / 仪器控制代码
- 使用特定设备(请注明型号)
- 排除错误代码或意外的仪器行为
- 设置测量、校准或硬件集成
## 提供的工具
| 工具 | 描述 |
|---|---|
| `search` | 跨所有手册的语义和全文搜索 |
| `list_manuals` | 浏览可用手册;按制造商、型号或设备类型筛选 |
| `get_page` | 按 ID 和页码检索文档中的特定页面 |
## 手动安装(stdio MCP)
如果您更喜欢 stdio 传输或使用其他 MCP 客户端(Cursor、Claude Desktop、Windsurf):
```bash
pip install techmanual-client
```
然后添加到您的 MCP 配置中:
```json
{
"techmanual": {
"command": "techmanual-mcp",
"env": { "TMAI_API_KEY": "您的密钥" }
}
}
```
请参阅 [techmanual.ai/setup](https://techmanual.ai/setup) 以获取完整的设置说明。
## 许可证
MIT