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

laku

v1.0.0

Published

**laku** is a zero dependency node.js based interactive wrapper of (very few) kubectl commands. Its main goal is to shorten the verbosity of frequently used kubectl commands and to avoid mundane copy pasting.

Readme

laku (lazy kubectl)

laku is a zero dependency node.js based interactive wrapper of (very few) kubectl commands. Its main goal is to shorten the verbosity of frequently used kubectl commands and to avoid mundane copy pasting.

install

Installing the package globally gives you access to laku command line keyword.
npm install laku -g
You can also use npx, e.g. npx laku gp

capabilities

select context

Without laku:

  1. kubectl config get-contexts
  2. kubectl config use-context <CONTEXT_NAME>

With laku:
laku c
It will prompt an interactive selection from available contexts.

show currently selected context

laku cs

show all contexts

laku csa is just a less verbose alias to kubectl config get-contexts

pf (port forward for pods)

pfs (port forward for services)

The same as laku pf, the only difference is it port-forwards services and not pods.

r

Repeats last kubectl command executed via laku pf, laku pfs or laku get

custom commands

There is support to setup "custom" kubectl commands with interactive context, namespace and pod/service (depending on configuration) selection. To do so:

  1. Locate .laku configuration file in your home folder. If it's not there, create it.
  2. It's a json file, manually add root level attribute custom - it's an array of user defined kubectl commands that can be run via laku.
  3. Add your own definition with following attributes, all of them mandatory

| attribute | description | type | |-------------|------------------------------------------------------------------------------------------------------------------------------------------------|---------------------| | name | command name, this is the laku subcommand to run the command | string | | description | command description. It will be printed when laku h is executed. If array is set, then each array element will be printed on a new line | string, string[] | | repeatable | true - command can be repeated via laku r false - command cannot be repeated via laku r | boolean | | resource | whether to run the command on service or pod | enum (service, pod) | | command | the kubectl command itself | string | | flags | additional flags to add to kubectl command (empty string of no flags are needed) | string |

example of .laku configuration file with custom command definition.

{
  "lastCommand": "you shouldn't touch this",
  "custom": [
    {
      "name": "exec",
      "repeatable": true,
      "resource": "pod",
      "command": "exec",
      "flags": "-it /bin/sh",
      "description": "runs sh inside pod"
    },
    {
      "name": "logs",
      "repeatable": true,
      "resource": "service",
      "command": "logs",
      "flags": "-f",
      "description": ["streams log from a service", "also i like celery and kohlrabi" ]
    }
  ]
}

When running laku h with such config file, it prints

laku (lazy kubectl) is a command line (semi)interactive tool for easier usage of some kubectl commands
options:
  c     select context
  cs    show name of an active context
  csa   show all contexts
  pf    port forward
  pfs   port backward (service)
  get   get resources (pods / services)
  r     repeat last executed kubectl command
        only for commands run via laku pf, laku pfs, laku get
  h     help
  
  --- custom commands ---
  exec  runs sh inside pod
  logs  streams log from a service
        also i like celery and kohlrabi

When running e.g. laku exec, it prompts context, then namespace and then pod selection and the runs kubectl exec pod/selected-pod --namespace selected-namespace --context selected-context -it /bin/sh.

It's important to note that adding custom command definition that doesn't adhere to described format will cause no custom commands to register. Also, malforming the .laku config file (it has to be parseable JSON) can cause some other commands not to run at all (laku r), if that happens just fix the file or delete it altogether :).
If already existing command is defined this way (either laku native or custom defined), the topmost one in laku h will be selected when executing.

get

laku get is an interactive wrapper of kubectl get <RESOURCES> --namespace <NAMESPACE_NAME> --contexts <CONTEXT_NAME>, where available <RESOURCES> are pods and services