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

@mt-kit/cli-run

v1.0.0

Published

一个用于在 monorepo 中智能运行脚本的 CLI 工具

Downloads

8

Readme

@mt-kit/cli-run

一个用于在 monorepo 中智能运行脚本的 CLI 工具。

功能特性

  • 🚀 智能包发现:自动发现 monorepo 中包含指定脚本的包,默认值为 start,dev,storybook
  • 🎯 精确范围控制:支持指定目录范围,只在特定目录下查找包
  • 📋 交互式选择:当有多个包时,提供友好的选择界面
  • 🔧 多命令支持:支持单个命令或命令数组
  • 📦 包信息显示:显示包名、描述和版本信息

安装

# 使用 npm
npm install -D @mt-kit/cli-run

# 使用 yarn
yarn add -D @mt-kit/cli-run

# 使用 pnpm
pnpm add -D @mt-kit/cli-run

使用方法

基本用法

# 运行单个命令
mt-run start

# 运行多个命令(逗号分隔)(推荐)
mt-run start,storybook

# 运行多个命令(JSON 数组格式)
mt-run '["start", "storybook"]'

# 打包
mt-run build

指定目录范围

# 只在 packages-vue 目录下查找包
mt-run start --root ./packages-vue

# 只在 packages-react 目录下查找包
mt-run storybook --root ./packages-react

# 使用绝对路径
mt-run start --root /path/to/your/monorepo/packages-vue

在 package.json 中使用

{
  "scripts": {
    "start": "mt-run start",
    "start:vue": "mt-run start --root ./packages-vue",
    "start:react": "mt-run start --root ./packages-react",
    "dev": "mt-run start,storybook",
    "dev:vue": "mt-run start,storybook --root ./packages-vue"
  }
}

交互式选择

当有多个包包含相同的脚本时,工具会显示交互式选择界面:

? 请选择需要执行的包 start, storybook: ›
❯ @mt-kit/vue-components (Vue 组件库) [start] v1.0.0
  @mt-kit/react-components (React 组件库) [start] v1.0.0
  @mt-kit/utils (工具函数库) [start] v1.0.0

选择界面会显示:

  • 包名和描述
  • 匹配的脚本类型
  • 版本号

配置说明

支持的包管理器

  • ✅ pnpm(推荐)
  • ✅ npm
  • ✅ yarn

包过滤规则

  • 自动跳过 private: true 的包
  • 自动排除 node_modules 目录
  • 只查找包含指定脚本的包

故障排除

常见问题

  1. 找不到包

    • 检查 --root 路径是否正确
    • 确认包中包含指定的脚本
  2. 权限问题

    • 确保有执行脚本的权限
    • 检查包的 package.json 配置
  3. 脚本不存在

    • 确认包中确实包含指定的脚本
    • 检查脚本名称是否正确