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

@takazudo/kumiko-gen

v0.3.0

Published

Generate deterministic Japanese kumiko geometric pattern SVGs from text seeds

Downloads

177

Readme

@takazudo/kumiko-gen

Generate deterministic Japanese kumiko geometric pattern SVGs from text seeds. Same input always produces the same pattern.

Features

  • Deterministic - Same slug always produces identical SVG output
  • 9 traditional patterns - asanoha, mitsukude, goma, shippo, yae-asanoha, kikko, sakura, bishamon, izutsu
  • Multi-layer composition - 2-4 patterns overlaid with randomized rotation and translation
  • Customizable - Size, zoom, colors, stroke width, grid divisions
  • SVG optimization - Remove off-canvas elements for smaller file sizes
  • CLI and API - Use as command-line tool or import as library

Installation

npm install @takazudo/kumiko-gen

Or use directly with npx:

npx @takazudo/kumiko-gen hello-world --out hello.svg

Usage

CLI

# Generate SVG from a slug
kumiko-gen hello-world

# Customize output
kumiko-gen my-pattern --size 1200 --fg "#ffffff" --bg "#1a1a2e" --out pattern.svg

# Optimize SVG (remove off-canvas elements)
kumiko-gen my-pattern --zoom 3 --finalize --out zoomed.svg

API

import { generateKumiko } from '@takazudo/kumiko-gen';

// Basic usage - returns SVG string
const svg = generateKumiko('hello-world');

// With options
const svg = generateKumiko('hello-world', {
  size: 1200,
  fg: '#1c1917',
  bg: '#d6d3d1',
  finalize: true,
});
import { generateKumikoDetailed } from '@takazudo/kumiko-gen';

// Get SVG with layer metadata
const { svg, layers } = generateKumikoDetailed('hello-world');
console.log(layers); // [{ index: 0, name: 'asanoha', ... }, ...]

SVG to PNG Conversion

The package includes an SVG-to-PNG converter as a subpath export. It uses sharp (optional dependency) to convert square SVG patterns into center-cropped landscape PNGs, ideal for OG images.

CLI

# Convert SVG to PNG (default: 1200x630)
kumiko-gen-svg-to-png input.svg --out output.png

# Custom dimensions
kumiko-gen-svg-to-png input.svg --width 600 --height 315

API

import { convertSvgToPng, convertSvgFileToPng } from '@takazudo/kumiko-gen/svg-to-png';

// From a Buffer
const pngBuffer = await convertSvgToPng(svgBuffer, { width: 1200, height: 630 });

// From a file path
const pngBuffer = await convertSvgFileToPng('pattern.svg');

Note: The sharp package is an optional dependency. Install it separately if you need SVG-to-PNG conversion: npm install sharp

Documentation

For full documentation including pattern gallery, options reference, and API details, visit the documentation site.

Try patterns interactively in the viewer.

License

MIT