Skip to content
dsh.fish
Skill

dsh-free-search-builder

为 DeepSeek Harness (DSH) 搭建"免费、无需 API key"的联网搜索插件(Bing HTML 抓取 provider)。当用户说"DSH 搜索用不了/没 key/不想用官方 key"、"给 DSH 加搜索插件"、"装搜索插件"、"dsh-web-search provider"或类似意图时使用。支持一句话安装(GitHub bundle 源,AI 自动执行)。也可用于复刻、升级或排查任何 ctx.web 搜索 provider。

Source
SUJIElearning
stars
2 stars
License
MIT
Updated
Updated 4 days ago

Readme

# 🔍 dsh-free-search-builder

> 给 DeepSeek Harness (DSH) 装上**免费、无需 API key** 的联网搜索。
> 搜网页、搜新闻、搜资料,不花一分钱。

![License: MIT](https://img.shields.io/badge/License-MIT-green.svg)
![DSH Plugin](https://img.shields.io/badge/DSH-plugin-blue.svg)

---

## 🎯 解决什么问题

DeepSeek Harness(简称 DSH)的官方联网搜索功能**依赖官方 API key**:
key 缺失或失效时,`web_search` 工具就完全用不了(报 `api key invalid`)。

这个项目提供一个**替代搜索插件**(`dsh-web-search-bing`):
抓取公开的 Bing 搜索页面,解析出规范的搜索结果。

- 🆓 **零成本**:不需要官方 key、不需要付费 API、不需要注册
- 🔌 **一句话安装**:对 DSH 说"帮我装免费搜索插件",AI 自动搞定
- 📦 **Bundle 自包含**:装完零配置,重启即用

---

## 🚀 安装(任选一种)

### 方式 A:从 npm 安装(推荐,最稳定)

**第 1 步:打开终端(PowerShell / cmd)**

**第 2 步:复制粘贴这一条命令,按回车**

```sh
dsh plugin --profile web add @huangzhaoyu/dsh-search-nokey
```

> ⚠️ 如果提示 `dsh : 无法将"dsh"项识别为 cmdlet`,说明你的 DSH 没有全局安装。没关系,换**方式 C 的一键脚本**,或者用这条命令代替:
> ```powershell
> node "你的DSH路径\node_modules\@deepseek-ai\dsh\lib\bin.js" plugin --profile web add @huangzhaoyu/dsh-search-nokey
> ```
> 不知道 DSH 路径在哪?用方式 C,脚本会自动找到。

**第 3 步:重启 DSH**(刷新 http://127.0.0.1:3080)

### 方式 B:从 GitHub 安装
```sh
dsh plugin --profile web add 'github:SUJIElearning/dsh-search-free-nokey&path:/scripts/dsh-web-search-bing'
```

### 方式 C:一键脚本(Windows)
下载 [`install.ps1`](install.ps1),右键 → **"使用 PowerShell 运行"**,自动找路径安装。

> 三种方式任选一种,装完**重启 DSH**(刷新 http://127.0.0.1:3080),搜索就能用。
> 插件自带 bundle patch,**零手改配置**。

---

## 🧪 确认装好了

重启后问 DSH 几个不同的问题,看结果**是否随之变化**:

| 问题 | 应该看到 |
|---|---|
| "北京天气怎么样" | 天气网站(中国天气网、2345 等) |
| "DeepSeek 最新动态" | 科技新闻、知乎、百科 |

每次返回不同的真实网站 = ✅ 工作正常。

---

## 🔧 常见问题

| 现象 | 原因 | 解决 |
|---|---|---|
| 报 `provider bing is not registered` | bundle 没装配 | 确认 `dsh.profile.bundles` 里有这个包 |
| 报 `Cannot read properties of undefined` | 配置空 | 确认 `config ?? {}` 兜底(源码已修复) |
| 结果永远一样 | 缓存 | 重启 DSH,换不同问题测试 |

---

## 📚 进阶

- **[搭建手册](references/build-guide.md)**:接口规范、解析逻辑、部署原理
- **[验证报告](VERIFICATION.md)**:陌生用户视角的完整测试记录
- **[源码](scripts/dsh-web-search-bing/)**:可直接运行的插件代码(含 bundle patch)
- **[SKILL.md](SKILL.md)**:DSH 技能入口(AI 加载后自动会用)

---

## 🗺️ 项目结构

```text
dsh-free-search-builder/
├── SKILL.md                          # DSH 技能入口
├── README.md                         # 本说明
├── VERIFICATION.md                   # 验证报告
├── references/
│   └── build-guide.md                # 技术搭建手册
├── scripts/
│   └── dsh-web-search-bing/          # 可运行的搜索插件(含 bundle patch)
│       ├── package.json              # 声明 dsh.bundle.patch
│       ├── cordis.patch.yml          # 自注册 + 自指定 searchProvider
│       └── lib/                      # 插件源码
└── evals/
    └── trigger_cases.json            # 技能触发测试
```

---

## 📄 开源协议

[MIT](LICENSE) · 自由使用、修改、分发,保留版权声明即可。

*Made with ❤️ for the DSH community*

Install

# Skills are files: copy them into $DSH_HOME/skills/dsh-free-search-builder (defaults to ~/.dsh/skills/dsh-free-search-builder)

Profile: web

Source