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

kalpa

v0.2.15

Published

Descriptive language based Automation tool.

Downloads

8

Readme

NPM version Build Status Dependency Status Coverage percentage License semantic-release

This project is looking for contributors. Please contact maintainer of this project to participate in this project

Kalpa

Automation Tool, programmed through descriptive yml language. It is similar to Ansible, with a intent to leverage large npm echo system and readily available modules. The existing npm module can easily converted to kalpa module with minimal efforts.

Kalpa can do whole lot of things for you, like

  • Create a directory for you, download some zip file in it and unzip it.
  • Code generation based on ejs templates
  • Create a github repo for you
  • Publish a apk on google play store

Currently some modules that are in development are( Can be used, has some basic functionality ready)

  • kalpa-execa (shell module)

    • This module execute a shell command
    • Uses execa npm module
  • kalpa-file (fs module)

    • This module provides fs related functionality
    • Uses fs-nextra npm module
  • kalpa-inquirer (prompt module)

    • Provides terminal prompt interface.
    • Uses inquirer npm module
  • kalpa-github

    • Kalpa module to use github apis
    • Uses octonode npm module
    • Can be used to create new repo, release and more...
  • kalpa-googleapis

    • Kalpa module to use google apis
    • Can be used to publish you app on playstore.

Basic concept

  • Kalpa project provides a cli by name 'kalpa' which take a series of instruction in yml
  • A yml file is called playbook
  • Each playbook in turns has plays and series
    • plays are set of instruction that are executed by kalpa.
    • series are plays refactored in to directory and can be group of plays.
    • Each play uses kalpa modules to execute certain set of instructions.
  • Each playbook can have it's own variables.
  • Playbook can import other yml files as imported variables.

Example playbook ( Just to explain. Will not run out of box )

kalpa:
  import:
    config:
      file: config.yml
      ref: vars
      directory: ./

  vars:
    fileName: latest.zip

  series:
    - essentials

  play:
    - name: Downloading a file
      kalpa-execa:
        cmd: curl
        opts:
          - "https://wordpress.org/{{ vars.fileName }}"
          - "-o{{vars.fileName}}"

Getting started

$ npm install kalpa -g
$ kalpa install kalpa-execa kalpa-file kalpa-ejs kalpa-inquirer
$ kalpa <playbook.yml>
$ kalpa list   // To list the installed Kalpa modules

Example playbook main.yml ( Should run out of box )

kalpa:
  play:
    - name: Create a file foo.txt
      kalpa-execa:
        cmd: touch
        opts:
          - foo.txt

    - name: Downloading a file
      kalpa-execa:
        cmd: curl
        opts:
          - https://wordpress.org/latest.zip
          - -olatest.zip

    - name: Uncompress a file
      kalpa-execa:
        cmd: unzip
        opts:
          - -o
          - latest.zip

    - name: Deleting latest.zip
      kalpa-execa:
        cmd: rm
        opts:
          - latest.zip
          - -f

More examples can be found in Examples

Style guide

Airbnb style-guide