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

@lanhu-context/cli

v0.7.0

Published

CLI for turning Lanhu design URLs into AI-ready design context: parse/schema/html/context pipeline commands

Readme

@lanhu-context/cli

把蓝湖(Lanhu)设计稿 URL 转成 AI 可直接消费的前端实现上下文——管道式 CLI,bin:lanhu / lanhu-context。MCP server 见 @lanhu-context/mcp。

仓库主页 / 完整文档(English)

安装

npm i -g @lanhu-context/cli
lanhu doctor        # 自检环境/凭据,exit 0 = 就绪

凭据配置(LANHU_TOKEN 是已登录 lanhuapp.com 会话的整段浏览器 Cookie):

lanhu auth set
lanhu auth test "$URL"   # exit 0 = token 有效

命令

| 命令 | 用途 | | --- | --- | | parse / meta / schema | 解析 URL ID / 设计稿元数据 / DDS schema | | html | 渲染 HTML+CSS(可选 --tailwind --tw-version <3\|4>) | | tokens | 提取 design tokens(--format json\|css) | | assets | 切图映射;--download 并发幂等下载 | | preview | 预览图(-o <file> 落盘 / -o - 直出 PNG) | | context | 一键组装 context.md + preview.png | | auth / doctor | 凭据管理与六项自检 |

用法示例

lanhu context "https://lanhuapp.com/web/#/item/project/detailDetach?tid=...&pid=...&image_id=..." \
  --json --out-dir .lanhu.local

lanhu assets "$URL" --download -o src/assets/my-page --json

约定:--json 输出统一 envelope(ok/data/error/warnings/meta)+ 分类退出码;附属阶段(tokens/preview)失败降级为 warning 不拖垮核心产物;落盘幂等(written/skipped/overwritten)。

面向 AI Agent 的完整用法(skills、排障、退出码索引)见仓库 skills/lanhu-context-cli。

协议

MIT