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

@zseven-w/openpencil

v0.6.0

Published

CLI for OpenPencil — control the design tool from your terminal

Downloads

434

Readme

@zseven-w/openpencil

English · 简体中文 · 繁體中文 · 日本語 · 한국어 · Français · Español · Deutsch · Português · Русский · हिन्दी · Türkçe · ไทย · Tiếng Việt · Bahasa Indonesia

OpenPencil 的命令行工具 — 从终端控制设计工具。

安装

npm install -g @zseven-w/openpencil

平台支持

CLI 会自动检测并启动各平台上的 OpenPencil 桌面应用:

| 平台 | 检测的安装路径 | | ----------- | --------------------------------------------------------------------------------------------------- | | macOS | /Applications/OpenPencil.app, ~/Applications/OpenPencil.app | | Windows | NSIS 用户级 (%LOCALAPPDATA%)、系统级 (%PROGRAMFILES%)、便携版 | | Linux | /usr/bin, /usr/local/bin, ~/.local/bin, AppImage (~/Applications, ~/Downloads), Snap, Flatpak |

用法

op <command> [options]

输入方式

接受 JSON 或 DSL 的参数支持三种传入方式:

op design '...'              # 内联字符串(适合小型内容)
op design @design.txt        # 从文件读取(推荐用于大型设计)
cat design.txt | op design - # 从标准输入读取(管道传入)

应用控制

op start [--desktop|--web]   # 启动 OpenPencil(默认桌面版)
op stop                      # 停止运行中的实例
op status                    # 检查运行状态

设计(批量 DSL)

op design <dsl|@file|-> [--post-process] [--canvas-width N]
op design:skeleton <json|@file|->
op design:content <section-id> <json|@file|->
op design:refine --root-id <id>

文档操作

op open [file.op]            # 打开文件或连接到实时画布
op save <file.op>            # 保存当前文档
op get [--type X] [--name Y] [--id Z] [--depth N]
op selection                 # 获取当前画布选中项

节点操作

op insert <json> [--parent P] [--index N] [--post-process]
op update <id> <json> [--post-process]
op delete <id>
op move <id> --parent <P> [--index N]
op copy <id> [--parent P]
op replace <id> <json> [--post-process]

代码导出

op export <format> [--out file]
# 格式:react, html, vue, svelte, flutter, swiftui, compose, rn, css

变量与主题

op vars                      # 获取变量
op vars:set <json>           # 设置变量
op themes                    # 获取主题
op themes:set <json>         # 设置主题
op theme:save <file.optheme> # 保存主题预设
op theme:load <file.optheme> # 加载主题预设
op theme:list [dir]          # 列出主题预设

页面

op page list                 # 列出页面
op page add [--name N]       # 添加页面
op page remove <id>          # 删除页面
op page rename <id> <name>   # 重命名页面
op page reorder <id> <index> # 调整页面顺序
op page duplicate <id>       # 复制页面

导入

op import:svg <file.svg>     # 导入 SVG 文件
op import:figma <file.fig>   # 导入 Figma .fig 文件

布局

op layout [--parent P] [--depth N]
op find-space [--direction right|bottom|left|top]

全局选项

--file <path>     目标 .op 文件(默认:实时画布)
--page <id>       目标页面 ID
--pretty          人类可读的 JSON 输出
--help            显示帮助
--version         显示版本

许可证

MIT