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

@seyyidt/kun-js

v0.1.4-alpha

Published

Intent-driven code generator — write .kun requirements, get working code

Readme

kun

npm

kun (كُن) — "Be." An intent-driven code generator.

You state intent. Kun translates it into real code.


What is kun?

kun is a CLI tool that generates source code from .kun requirement files using LLMs. You describe what a file should do, and kun produces a working first draft.

SearchBar.vue.kun   →   kun build   →   SearchBar.vue

The filename encodes the output. Everything before .kun is the file that gets generated.

Install

npm install -g @seyyidt/kun-js
# or
npm install --save-dev @seyyidt/kun-js

Requires Node.js >= 20.

Quick start

1. Configure your LLM provider

Create a kun.config.js (or kun.config.ts) in your project root:

// kun.config.js
import "dotenv/config";

export default {
  provider: "anthropic",
  model: "claude-sonnet-4-20250514",
  apiKey: process.env.ANTHROPIC_API_KEY,
};

2. Write a .kun file

@target vue3

A button that copies text to clipboard.
Shows "Copied!" for two seconds after click.
Uses no external libraries.

3. Generate

kun build CopyButton.vue.kun    # generates CopyButton.vue
kun build                       # builds all .kun files in the project
kun build --dry-run             # preview the prompt without calling the API

.kun file format

Plain, structured natural language. No strict syntax — clarity is the only rule.

@target    vue3
@component SearchBar

intent:
  A search input used across the app header.
  Debounces input and emits a search event.

props:
  placeholder: string (default: "Search…")
  debounceMs:  number (default: 300)

emits:
  search(query: string)

behavior:
  on input  → debounce, then emit search
  on Escape → clear input and emit empty string

constraints:
  - no external libraries
  - fully keyboard accessible

Write what, not how. The LLM decides the implementation.

Providers

kun is provider-agnostic. Built-in support for:

| Provider | Config | |---|---| | Anthropic (Claude) | provider: "anthropic" | | OpenAI | provider: "openai" | | Any OpenAI-compatible endpoint | provider: "custom", baseUrl: "..." |

// OpenAI
export default {
  provider: "openai",
  model: "gpt-4o",
  apiKey: process.env.OPENAI_API_KEY,
};

// Local / Ollama / vLLM / LM Studio
export default {
  provider: "custom",
  model: "llama-3.3-70b",
  baseUrl: "http://localhost:11434/v1",
};

How it works

kun build reads a .kun file, computes the git diff against its last committed state, and sends both the full requirements and the diff to an LLM. If a source file already exists, the LLM patches it. If not, it generates a new one.

The git sync contract

When you commit both a .kun file and its generated source file together, they are declared in sync. After that, you own the generated code — edit it freely. The .kun file remains as documentation of intent.

License

MIT