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 🙏

© 2024 – Pkg Stats / Ryan Hefner

puppy-cli

v1.0.0

Published

<font size=2>

Downloads

10

Readme

PUPPY-CLI说明文档

puppy-cli 为cli(commander line interact)工程化工具。指在为提高工作效率,减少人工介入操作流程。帮助开发工程师专注于自己的具体业务。puppy-cli的内核功能非常少,但是可扩展性确很高。主要通过开发者自定义插件系统来丰富它的功能,做到即插即用。

安装
    npm install puppy-cli -g
命令
    # 创建本地插件模板
    puppy create -p puppy-plugins-test
    # 安装相关的插件
    puppy install xxx
    # 列出所有的本地命令列表详细信息
    puppy list 
    #查看所有的命令以及描述
    puppy help
插件体系

puppy-cli 本身只有极少的命令,通过插件和组件拼装的方式来实现各个功能。开发者可以自己编写自己的插件和生成器脚手架来方便自己的构建流程。你可以在这里看到目前开发者开放的插件以及它们相关的文档;

  • 使用cli生成开发插件模版

    #生成插件
    puppy create plugins
    
  • 开始开发你的插件

    type Cms = {
      [k in 'abbreviation' | 'params' | 'description']: string
    }
    type CmdDesctions = {
        name: string
    } & Partial<Cms>;
    
    // write your cmd configrations here:
    const CmdDesctions:CmdDesctions = {
        name: '', // command name
        abbreviation: '', // first params abbreviation
        params: '', // fisrt params name
    };
    const happy = (register: any):void => {
        console.log('happy plugins loaded...');
        register(CmdDesctions, (log: string) => {
            // write or import modules or logic here
            console.log(log);
        }, 'write your plugins descriptions or specification here');
    };
    
    module.exports = happy;
  • 发布你的插件

        npm publish
  • 安装插件 发布插件到npm上之后,你可以通过以下命令,将插件集成到cli中使用。

      puppy install -p puppy-plugins-xxxx

安装好插件以后,你可以阅读插件文档,了解通过何种命令来启动插件。

  •  使用插件
      puppy yourcmds -p xxxx