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

@chke/ckui

v0.1.7

Published

`ckui` 是 ck-components 组件库的源码分发 CLI:通过 `ckui add <name>` 把**组件 / Hook / 工具函数的源码**直接写入你的项目(不发 npm 包),样式与多语言完全跟随 element-plus。

Readme

@chke/ckui

ckui 是 ck-components 组件库的源码分发 CLI:通过 ckui add <name> 把组件 / Hook / 工具函数的源码直接写入你的项目(不发 npm 包),样式与多语言完全跟随 element-plus。

安装

npm install -g @chke/ckui
# 或
pnpm add -g @chke/ckui

快速开始

1. 准备 element-plus

pnpm add element-plus @element-plus/icons-vue
// main.ts
import ElementPlus from "element-plus";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css"; // 暗黑模式(可选)
app.use(ElementPlus);

2. 初始化配置

ckui init

生成 components.json(init 会提示输入 registry 地址,直接回车使用默认地址):

{
    "registry": "http://ckui.byteslink.com/r",
    "aliases": { "ui": "@/components/ui", "lib": "@/lib", "hooks": "@/hooks" }
}

确保目标项目 tsconfig.json 配置了 @/* 路径映射(CLI 据此解析写入位置,缺失时回退到 src/)。

3. 安装组件 / Hook

ckui list              # 查看可安装项(组件 / hook / lib)
ckui add ck-table      # 业务组件 → src/components/ui/
ckui add use-title     # Vue Hook → src/hooks/
ckui add use-toggle    # 同上

已存在的文件默认跳过,--overwrite 覆盖(会丢失本地改动,文件头注释里的版本号可用于对比)。

之后像使用自己写的代码一样导入:

<script setup lang="ts">
import CkTable from "@/components/ui/CkTable.vue";
import { useTitle } from "@/hooks/use-title";
</script>

安装目录规则

| 类型 | 默认安装目录 | 示例 | | ---------------- | ---------------------- | -------------------- | | registry:ui | src/components/ui/ | ck-table | | registry:hook | src/hooks/ | use-title | | registry:lib | src/lib/ | 工具函数 |

也可以在 components.json 的 aliases 中自定义各类型目录。

命令

ckui init

在目标项目生成 components.json。

ckui init [-r <registry>] [--cwd <dir>] [--force]

| 选项 | 说明 | | ------------ | ---------------------------------- | | -r | registry 地址(也可用 CKUI_REGISTRY 环境变量) | | --cwd | 目标项目目录 | | --force | 覆盖已有配置 |

ckui add <name...>

安装一个或多个源码项。

ckui add ck-table use-title [-r <registry>] [--cwd <dir>] [--overwrite] [--no-install]

| 选项 | 说明 | | -------------- | -------------------------------------- | | -r | registry 地址 | | --cwd | 目标项目目录 | | --overwrite | 覆盖已存在的本地文件 | | --no-install | 只写文件,不安装 npm 依赖 |

ckui list

列出 registry 中所有可安装项。

ckui list [-r <registry>]

registry 地址优先级

ckui --registry <url> > components.json 的 registry > 环境变量 CKUI_REGISTRY > 默认地址。

本地开发文档站时(文档站托管 registry):

pnpm dev   # 终端 1:构建 registry 并启动文档站
CKUI_REGISTRY=http://localhost:5173/r ckui add ck-table