npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

ducksearch

v1.0.3

Published

ducksearch - 由微信公众号字节笔记本提供

Readme

ducksearch

由微信公众号「字节笔记本」提供

网页搜索和内容提取命令行工具

功能特性

  • 🔍 网络搜索: 使用 DuckDuckGo 搜索引擎
  • 📥 内容提取: 获取网页纯文本内容
  • 🚀 MCP 服务器: 支持 Claude Code/MCP 集成
  • 快速高效: 内存管理和批处理优化

使用方法

1. 直接使用 (推荐)

# 搜索
npx ducksearch search "关键词"

# 获取网页内容
npx ducksearch fetch https://example.com

2. 全局安装

npm install -g ducksearch

# 然后直接使用
ducksearch search "关键词"
ducksearch fetch https://example.com

命令详解

网络搜索

# 基本搜索
npx ducksearch search "关键词"

# 指定结果数量
npx ducksearch search "关键词" -n 20

# 搜索并自动打开第一个结果
npx ducksearch search "关键词" -o

获取网页内容

# 获取网页内容(预览)
npx ducksearch fetch https://example.com

# 获取原始 HTML
npx ducksearch fetch https://example.com --raw

# 保存到文件
npx ducksearch fetch https://example.com -o output.txt

# 输出 JSON 格式
npx ducksearch fetch https://example.com --json

MCP 服务器配置

在 Claude Code 中使用,添加到 MCP 配置:

{
  "mcpServers": {
    "ducksearch": {
      "command": "npx",
      "args": ["-y", "ducksearch", "mcp"]
    }
  }
}

MCP 工具

  1. DuckDuckGoWebSearch

    • 输入: 搜索关键词和最大结果数
    • 输出: 格式化的搜索结果列表
  2. UrlContentExtractor

    • 输入: 单个 URL 或 URL 数组
    • 输出: 网页纯文本内容

技术栈

  • TypeScript
  • Node.js
  • Axios (HTTP 请求)
  • Cheerio (HTML 解析)
  • Commander.js (CLI 框架)
  • MCP SDK

许可证

MIT

关注我们

微信公众号:字节笔记本