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

@nova-infra/d2c

v2.3.0

Published

Agent-friendly Figma design context CLI

Readme

@nova-infra/d2c (nova-d2c)

Figma 设计上下文 CLI。

nova-d2c 的定位是“设计上下文 CLI”,提供可组合、可脚本化的 Figma 设计上下文(文件、节点、树、tokens、资源)输出。

官网与文档:

  • 官网:https://nova-d2c.pages.dev
  • 命令文档:https://nova-d2c.pages.dev/#commands
  • npmjs:https://www.npmjs.com/package/@nova-infra/d2c
  • 改名迁移说明:docs/changes/rename-to-nova-d2c.md

npm 分发

npm 包按 native binary 分发,目前只保留 macOS 和 Windows 二进制。公开包只包含平台二进制、一个很薄的启动器、package.json 和 README,不发布 TypeScript 源码、核心 JS bundle 或 sourcemap。

安装

npm install -g @nova-infra/d2c

临时执行:

npx -y @nova-infra/d2c doctor
bunx @nova-infra/d2c doctor

快速上手

# 1) 初始化检查
nova-d2c doctor

# 2) 获取文件级上下文
nova-d2c files get "https://www.figma.com/design/xxx"

# 3) 解析目标节点
nova-d2c nodes resolve "https://www.figma.com/design/xxx" --name "login button"

# 4) 提取节点并导出资源
nova-d2c nodes get "https://www.figma.com/design/xxx" --node-id 1:2
nova-d2c assets export "https://www.figma.com/design/xxx" --node-id 1:2 --out ./assets

# 5) 输出 handoff 包
nova-d2c handoff build "https://www.figma.com/design/xxx" --node-id 1:2 --out ./handoff

约定

所有对外对接场景默认用 --json

命令总览

nova-d2c doctor
nova-d2c init
nova-d2c --json files get <figma-url|file-key>
nova-d2c --json nodes explore <figma-url|file-key>
nova-d2c --json nodes resolve <figma-url|file-key> [--name <keyword>]
nova-d2c --json nodes get <figma-url|file-key> --node-id <node-id>
nova-d2c --json tree get <figma-url|file-key> --node-id <node-id>
nova-d2c --json tokens styles <figma-url|file-key> --node-id <node-id>
nova-d2c --json tokens variables <figma-url|file-key> --node-id <node-id>
nova-d2c --json assets export <figma-url|file-key> --node-id <node-id> --out <dir>
nova-d2c --json handoff build <figma-url|file-key> --node-id <node-id> --out <dir>
nova-d2c --json request get /v1/me
nova-d2c --describe --format skill

约束与说明

  • 明确定位为“设计上下文 CLI”,不做代码生成输出。
  • 对外仅保留当前命令面,不提供旧命令兼容说明。
  • 读取结果默认缓存 5 分钟,使用 --no-cache 强制刷新。

选项速查(常用)

| 选项 | 说明 | |------|------| | --node-id | 指定目标节点 ID,支持 1:2 | | --name | 节点名称关键词 | | --limit | discovery 场景返回条数 | | --depth | 节点遍历深度 | | --out | 输出目录 | | --no-cache | 强制刷新 | | --token | 明确指定 Figma Token |

缓存

读取类命令首次结果缓存 5 分钟。支持 --no-cache 直连 API。

License

MIT