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

@forinda/kickjs-cli-kit

v0.1.1

Published

Shared CLI-plugin contract for KickJS — defineCliPlugin, defineGenerator, and the types CLI plugins implement

Readme

@forinda/kickjs-cli-kit

The shared CLI-plugin contract for KickJS. Defines the types and helpers a package implements to ship kick-compatible commands, generators, and typegens — without depending on the full @forinda/kickjs-cli.

This is a tiny, dependency-free package (one commander peer). You only need it if you're building a CLI plugin; app authors never import it directly.

Why this package exists

The kick CLI mounts first-party plugins (the database tooling, for example). If those packages imported defineCliPlugin from @forinda/kickjs-cli to describe their commands, that would form a dependency cycle — the CLI already depends on them. Hoisting the contract into a standalone package both sides import breaks the cycle:

@forinda/kickjs-cli  ─┐
                      ├─►  @forinda/kickjs-cli-kit   (contract only)
@forinda/kickjs-db   ─┘

@forinda/kickjs-cli re-exports the whole contract, so import { defineCliPlugin } from '@forinda/kickjs-cli' keeps working for app-side kick.config.ts plugins.

Install

pnpm add @forinda/kickjs-cli-kit commander

commander is a peer dependency (the host CLI provides the Command your plugin registers against).

Quick start

A CLI plugin

import { defineCliPlugin } from '@forinda/kickjs-cli-kit'

export const helloPlugin = defineCliPlugin({
  name: 'my-org/hello',
  register(program, ctx) {
    program
      .command('hello <name>')
      .description('Say hello')
      .action((name: string) => {
        console.log(`Hello, ${name}! (project: ${ctx.projectRoot})`)
      })
  },
})

Mount it in kick.config.ts:

import { defineConfig } from '@forinda/kickjs-cli'
import { helloPlugin } from './tools/hello-plugin'

export default defineConfig({ plugins: [helloPlugin] })
kick hello world

A kick g <name> generator

import { defineGenerator } from '@forinda/kickjs-cli-kit'

export default [
  defineGenerator({
    name: 'widget',
    description: 'Scaffold a widget',
    args: [{ name: 'name', required: true }],
    files: (ctx) => [
      {
        path: `src/widgets/${ctx.kebab}.ts`,
        content: `export class ${ctx.pascal}Widget {}\n`,
      },
    ],
  }),
]

Contract surface

| Export | Purpose | | ------------------------- | ------------------------------------------------------------------------------------- | | defineCliPlugin(p) | Declare a CLI plugin: name + register() / commands / typegens / generators. | | defineGenerator(spec) | Declare a kick g <name> scaffolder (returns the spec, typed). | | KickCliPlugin<TConfig> | The plugin shape. TConfig is the host config type (ctx.config). | | KickCliPluginContext | What register() receives: cwd, projectRoot, config, log. | | GeneratorSpec + co. | GeneratorContext / GeneratorFile / GeneratorArg / GeneratorFlag. | | KickCommandDefinition | A declarative shell-handler command (the commands field shape). | | CliTypegen | Structural typegen shape (the CLI's TypegenPlugin satisfies it). | | KickPluginConflictError | Thrown on duplicate plugin / command / typegen / generator ids. |

License

MIT © Felix Orinda