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

@sepalang/runner

v0.13.1

Published

It was created to make child processes easier.

Readme

CircleCI Codacy Badge Greenkeeper badge

🏃 runner

It was created to make child processes easier.

usage

Run the command from your npm project.

npm install @sepalang/runner

Then write an async await function to execute sequentially.

block run

const runner = require("@sepalang/runner"); //or import runner form "runner";

// Generate processors sequentially.
runner(async ({ run })=>{

  // Sequential execution using await
  await run("pwd");
  // /Users/user/runner/test

  // Can run vim.
  await run("vim");
  
  // Can run npm.
  await run("npm run-script");
  

  let stdout;
  const { stdout } = await run("pwd",{ capture:true }));
  // /Users/user/runner/test
  console.log({stdout}) // {stdout:['/Users/user/runner/test']}

  ({ stdout } = await run("ls -a",{ capture:true, silent:true }));
  console.log(stdout); // [ 'test-vim.js','ntest1.js','test3.js' ]
  
})

block utils

// Provides frequently used parameters when executing a process.
runner(async ({ pwd, cwd, fwd, timeoutPromise })=>{

  console.log("cwd", cwd); // /Users/user/runner
  console.log("pwd", pwd); // /Users/user/runner/test
  console.log("fwd", fwd); // /Users/user/runner/test/test.js
  
  //wait 3000ms
  await timeoutPromise(3000);  
  await timeoutPromise(()=>{
    //wait 3000ms
  },3000);

})

confirm

runner(async ({ confirm })=>{
  const isOk = await confirm("Are you sure?")
});

prompt

runner(async ({ prompt })=>{
  //prompt
  const anyKey = await prompt("Please enter any key")
  console.log(`You entered is '${anyKey}'.`)
  
  const yn = await prompt({
    message: "Please enter y or n.",
    validate: (input)=>["y","n"].includes(input) ? true : "Be sure to enter y or n."
  })
  console.log(`You entered is ${yn}`)

  const keywords = await prompt({
    type: "list",
    message: "Enter keywords."
  }) // 1,2,3,4,5,
  console.log(`You entered is ${keywords}`) // ['1','2','3','4','5']
})

select

// Provide input.
runner(async ({ select })=>{
  //select
  const options = [
    {label:"foo", value:"SELECTED_FOO", description: "I'm FOO"},
    {label:"bar", value:"SELECTED_BAR", description: "I'm BAR"},
  ]

  const selectSingle = await select({
    message: "selectSingle",
    options,
  })
  console.log("selectSingle", selectSingle) // ['SELECTED_FOO']

  const selectMultiple = await select({
    message: "selectMultiple",
    multiple: true,
    options,
  })
  console.log("selectMultiple", selectMultiple) // ['SELECTED_FOO', 'SELECTED_BAR']
})

inline run


// Load parameters outside the block
async function asyncBlock(){
  const { run } = await runner()
  await run("pwd");
}

with process

// Works as a Promise Base.
runner(()=>{})
.then(()=>{
  // finally block
  process.exit(0);
})
.catch((e)=>{
  // catch block;
  process.exit(1);
});

cmd

runner npm start
runner ./other/cwd/path npm start

Updated

0.13.1

  • Fixed a problem in which the silent option did not work properly.

0.13.0

  • The stdout of the capture option was truncated in versions 0.12.x and below. This bug has been fixed.