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

@das-fed/clone-cli

v1.0.0

Published

远程仓库克隆并按需提取指定目录或文件的脚手架命令行工具

Readme

@das-fed/clone-cli

按需拉取远程 Git 仓库指定目录或文件的脚手架命令行工具。

特性

  • 快速浅克隆:默认使用 --depth 1 浅克隆,拉取速度更快、占用空间极小。
  • 按需提取:克隆后不会污染当前工作区,只将你所选定或手动输入的目录/文件复制到当前目录下。
  • 交互友好:自动分析仓库根结构,支持多选保留,同时支持手动输入自定义深层路径(如 src/components、packages/core 等)。
  • 安全隔离:使用系统独立临时缓存区,提取完毕后自动清理临时文件。
  • 零依赖运行:打包构建将依赖封装在产物中,安装即用。

全局安装与使用

方式一:全局安装

npm install -g @das-fed/clone-cli

安装后即可在任意目录下使用命令:

das-clone-cli

方式二:使用 npx 免安装运行

npx @das-fed/clone-cli

命令行参数支持

除了交互式输入,也支持直接传递参数:

das-clone-cli [repoUrl] [-b branch] [-o outDir]

  • [repoUrl]: 远程 Git 仓库地址(可选,如不传则交互式询问)
  • -b, --branch : 指定分支(可选,默认为 master)
  • -o, --outDir : 目标保存目录(可选,默认为当前终端执行目录)
  • -v, --version: 查看版本
  • -h, --help: 查看帮助信息

开发与发布

本地开发

npm install npm run dev

构建产物

npm run build

构建后会输出单文件至 dist/index.js。

一键发布到 npm

项目内置了参考自框架体系的交互式发布脚本(内置 npm token 与自动版本递增):

npm run release

该脚本将自动执行以下流程:

  1. 检测当前本地版本与 npm 线上最新版本。
  2. 交互式选择发布标签(release 正式版、test、beta、dev、hot、next 或 custom 自定义版本号)。
  3. 交互式选择版本升级类型(Patch、Minor、Major),自动计算新版本号。
  4. 自动触发 npm run build 重新构建产物。
  5. 自动更新 package.json 中的版本号。
  6. 使用项目内置的 npm token 执行 npm publish --access public 发布。