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

@pai-fe/pai-skills-cli

v0.1.3

Published

Shared CLI utilities for Alibaba Cloud PAI Skills

Readme

@pai-fe/pai-skills-cli

Shared CLI utilities for Alibaba Cloud PAI Skills.

命名约定:本文档中的 pai-skills-cli@pai-fe/pai-skills-clialiyun-cli 指阿里云官方 CLI(aliyun 命令)。

设计思想

pai-skills-cli 工具采用内容与代码分离的设计原则:

  • 代码只负责加载pai-skills-cli 代码仅处理命令解析和文件读取,不硬编码业务内容
  • 内容放在独立文件:使用说明、脚本、参考文档等均放置在独立目录中,便于维护和扩展
  • 统一目录结构:所有产品模块遵循相同的目录规范,降低学习成本

目录结构

src/
├── cli.ts                      # pai-skills-cli 核心代码
├── index.ts                    # 入口文件
├── general/                    # 通用功能模块
│   ├── scripts/                # 可执行代码(Python/Bash/JS 等)
│   ├── references/             # 按需加载的参考文档
│   ├── assets/                 # 输出用资源(模板、图标、字体等)
│   └── skills-extension.md     # 使用说明文档
└── products/                   # 产品功能模块
    ├── dsw/                    # PAI DSW 实例管理
    │   ├── scripts/
    │   ├── references/
    │   ├── assets/
    │   └── skills-extension.md
    ├── dlc/                    # PAI DLC 训练作业管理
    │   ├── scripts/
    │   ├── references/
    │   ├── assets/
    │   └── skills-extension.md
    └── eas/                    # PAI EAS 模型服务管理
        ├── scripts/
        ├── references/
        ├── assets/
        └── skills-extension.md

目录用途说明

| 目录 | 用途 | |------|------| | scripts/ | 可执行代码(Python/Bash/JS 等),Agent 可调用执行具体任务 | | references/ | 按需加载的参考文档,包含 API 说明、最佳实践等详细内容 | | assets/ | 输出用资源,包含模板、图标、字体等脚本执行所需的资源文件 | | skills-extension.md | 使用说明文档,pai-skills-cli usage 命令输出的内容 |

Installation

npm install -g @pai-fe/pai-skills-cli --registry https://registry.npmmirror.com

Or use with npx:

npx --registry https://registry.npmmirror.com @pai-fe/pai-skills-cli --help

Usage

Check Version

pai-skills version

Check for Updates

pai-skills check-update

Upgrade

pai-skills upgrade

Show Usage

查看使用说明文档:

# 查看通用使用说明
pai-skills usage
pai-skills usage general

# 查看产品使用说明
pai-skills usage dsw      # DSW 实例管理
pai-skills usage dlc      # DLC 训练作业管理
pai-skills usage eas      # EAS 模型服务管理

扩展新产品

添加新产品(如 new-product)只需:

  1. 创建目录结构:

    mkdir -p src/products/new-product/{scripts,references,assets}
    touch src/products/new-product/skills-extension.md
  2. 编辑 src/cli.ts,在 PRODUCTS 数组中添加新产品名称:

    const PRODUCTS = ['dsw', 'dlc', 'eas', 'new-product'] as const;
  3. 编写 skills-extension.md 内容

  4. 重新构建:

    npm run build

Build

npm run build

构建过程会:

  1. 编译 TypeScript 到 dist/
  2. 复制 general/products/ 目录到 dist/

Local Development

本地开发时,可以使用 npm link 将包链接到全局,模拟真实发布后的使用方式。

首次设置

# 1. 进入包目录
cd packages/pai-skills-cli

# 2. 构建项目
npm run build

# 3. 创建全局符号链接
npm link

运行测试

链接成功后,可以在任意目录使用以下方式运行:

# 使用命令名(推荐,最简洁)
pai-skills --help
pai-skills usage dsw

# 使用 npm exec(会识别本地 link)
npm exec @pai-fe/pai-skills-cli -- --help
npm exec @pai-fe/pai-skills-cli -- usage dsw

修改代码后

修改代码后只需重新构建,无需重新链接:

npm run build

构建后立即可用新代码。

取消链接

开发完成后,可以取消全局链接:

npm unlink -g @pai-fe/pai-skills-cli

验证链接状态

# 查看全局链接的包
npm list -g --depth=0 | grep pai-skills-cli

# 或查看链接指向
ls -la $(npm root -g)/@pai-fe/pai-skills-cli

License

Apache-2.0