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 🙏

© 2025 – Pkg Stats / Ryan Hefner

ydd

v3.0.1

Published

Explain English word in Chinese. 查询英文单词的中文释义。

Downloads

77

Readme

ydd

ydd-snapshot

YouDao Dictionary

专为爱用命令行 🖥️ 的程序员打造的有道词典。

在终端里查英文单词的中文释义,🦢 优雅快速。无需打开浏览器输入单词点击查询等待返回,无广告更清爽更便捷。

用法

查询 silhouette 的含义:

# 飞快 🚀
pnpx ydd silhouette

# 极速 🚀
bunx ydd silhouette

用法一:仅查询释义

❯ pnpx ydd silhouette


🟢  n. (浅色背景衬托出的)暗色轮廓;剪影,(尤指人脸的)侧影;(人的)体形,(事物的)形状
🟢  v. 把……画成黑色轮廓像,使现出影像(或轮廓)
🟢  【名】 (Silhouette)(法)西卢埃特(人名)

*See more at https://dict.youdao.com/result?word=silhouette&lang=en*
*查询单词耗时 🕑: 322.812ms*

用法二:查询释义加 Collins 和双语例句

❯ pnpx ydd silhouette -collins=all --example


## Explanations 💡
🟢  n. (浅色背景衬托出的)暗色轮廓;剪影,(尤指人脸的)侧影;(人的)体形,(事物的)形状
🟢  v. 把……画成黑色轮廓像,使现出影像(或轮廓)
🟢  【名】 (Silhouette)(法)西卢埃特(人名)

## 柯林斯英汉双解大词典 [#2] 📖
1. [N-COUNT 可数名词] A **silhouette** is the solid dark shape that you see when someone or something has a bright light or pale background behind them. (强光或浅色背景衬托下的) 黑色
轮廓
├── The dark **silhouette** of the castle ruins stood out boldly against the fading light.
└── 城堡遗迹的黑暗**轮廓**在暗淡光线下显得格外突出。

2. [N-COUNT 可数名词] The **silhouette** of something is the outline that it has, which often helps you to recognize it. 轮廓
├── ...the distinctive **silhouette** of the Manhattan skyline.
└── …曼哈顿天际线的清晰**轮廓**。

## Examples ⭐
1. The mountains stood out in **silhouette**.
群山的**轮廓**衬托了出来。
《牛津词典》

2. The dark **silhouette** of the castle ruins stood out boldly against the fading light.
城堡遗迹的黑暗**轮廓**在暗淡光线下显得格外突出。
《柯林斯英汉双解大词典》

3. Next to it are the **silhouette** of Giacometti's "Walking Man" and an untranslatable blast from the exhibition's famous solitary creator.
它旁边是贾科梅蒂的作品《行走着的人》的**侧影轮廓**像,还有出自本次展览的有名的孤独创作者戈达尔先生的无法翻译的惊人之语。

*See more at https://dict.youdao.com/result?word=silhouette&lang=en*
*查询单词耗时 🕑: 365.235ms*

想查询释义并朗读:

pnpx ydd silhouette --speak

特性

  • 🦸 全能:查单词、翻译长句、中译英,一应俱全。
  • 🚀 极速:每次查询仅需几百毫秒,。
  • 🎨 美观:排版优雅,赏心悦目。
  • 🎈 轻量:零依赖,零配置,即装即用。
  • 🌍 双语:内置柯林斯双语例句。
  • 🔊 朗读:支持单词朗读,pnpx ydd vite --speak(仅 macOS)。

技术亮点

  • 极小零依赖:纯原生,无第三方依赖。
    • CLI 却不依赖 commander/inquirer/yargs/chalk,仅用 Node.js 原生 parseArgs
    • 无需 cheerio、node-html-parser、request,用原生 fetch 请求;
    • 放弃重量级 glow,自研轻量 Markdown 渲染器,输出依旧惊艳。
  • 高可用
    • 双路数据源(HTML 源 1 / HTML 源 2 / OpenAPI)。
    • fetch 不可用时自动降级到 https.request
    • 优先用经过安全处理的 node:vm 执行脚本,失败则回退至健壮的正则解析。
  • 久经考验:单元测试、端到端测试,外加随机测试(每次发布前从 789 个单词池中随机抽取若干进行全链路测试验证)。

待办

  • [x] 长句翻译

支持 ❤️

如果它帮到了你,不妨一键三连 🍻! 也欢迎给颗 ⭐️!

开发

pnpm i
node ./bin.mjs -e -c=a "word"

自动化测试

node --test

# 测试某一个文件
node --test test/core.test.translate.mjs

# 测试某一个 case:先将 `test(...)` 改成 `test.only(...)` 然后执行
node --test-only test/core.test.translate.mjs

English README:

ydd

ydd-snapshot

YouDao Dictionary

Explain English word in Chinese.

A Beautiful and Elegant Dictionary for Programmers Who Prefer Terminals.

Usage

Query the meaning of "silhouette":

# Fast 🚀
pnpx ydd silhouette

# Super fast 🚀
bunx ydd silhouette

Or show more details with bilingual examples and speak it out:

pnpx ydd vite -e -s

Features

  • Full-fledged: Look up individual words, translate full passages, and handle Chinese-to-English. All in one place.
  • Fast: Querying the meaning of a word is very fast about a few hundred milliseconds.
  • Beautiful: The output is very beautiful.
  • Elegant: No dependencies, no configuration.
  • Bilingual: Show collins bilingual examples.
  • Speak: Speak the word out. pnpx ydd vite --speak (Macos only).

Tech Features

  • Light weight: Zero dependencies.
  • Built with speed in mind:
    • It's a CLI but not use commander or inquirer or yargs and chalk! Just native Node.js parseArgs.
    • No cheerio, node-html-parser or request library. Use Node.js fetch to request. And vm to evaluate script and use Robust regular expressions as fallback to parse when failed.
    • Instead of heavy renderer charmbracelet/glow, we use our own lightweight markdown render—yet the output still looks gorgeous.
  • Robust: Use double source: script, HTML or openapi. Downgrade to https.request when fetch not supported.
  • Battle-tested: Unit tests, end-to-end tests, and random tests (Before every release, several words are randomly picked from a pool of 789 then fed into the cases to test the robustness of the program)...

TODO

  • [x] Translate long sentence.

Show your support ❤️

If YDD saved you a second, please star ⭐️ the repo!

Development

pnpm i
node ./bin.mjs -e -c=a "word"