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

@hachiware-labs/finch-js

v0.9.0

Published

Fast, beautiful, editable diagrams from concise text.

Readme

Finch.js

Draw beautiful diagrams.

日本語

Draw diagrams from text, then keep your hand-tuned layout as the text changes. Finch.js renders editable SVG diagrams and preserves positions through stable node IDs.

Editable application architecture with AWS, PostgreSQL, and Lucide icons

What's new in 0.9.0

Automatic layout gives grouped diagrams clearer connection order, room for independent routes, and labels that are easier to associate with their lines. The Finch skill helps choose the diagram type, nodes, and meaningful groups from your explanation; the built-in editor lets you refine the result.

Release notes and upgrade guidance

Quick start

No install, no build. Save as diagram.html and open it.

<!doctype html>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<style>
  body { margin: 0; }
  #diagram { min-height: 100vh; overflow: auto; padding: 24px; }
</style>

<main id="diagram" aria-label="Application deployment diagram"></main>

<script src="https://cdn.jsdelivr.net/npm/@hachiware-labs/[email protected]/dist/finch.global.js"></script>
<script>
  const deploymentSource = `
@deployment
node browser "Web app" [icon=app-window]
container cloud "Production" [layout=row tone=cyan] {
  server api "API server" [icon=server]
  database db "PostgreSQL" [icon=database]
}
browser -> api
api -> db: SQL
  `.trim();

  Finch.render(deploymentSource, { target: "#diagram" });
</script>

IDs and labels are separate. Keep api stable while changing "API server"; the saved position belongs to the ID.

Click Finch to edit

Click the pink Finch button in the lower-left of the diagram to open the editor. Add elements and connections in Source, then drag and drop nodes to arrange the diagram.

Open Finch, add Redis and its connection to a deployment diagram, then drag nodes into place

Edit the source again — the nodes you moved stay where you put them. Keep their IDs unchanged.

The demo adds a Redis cache, connects it to the API server, and moves the nodes into place. Try the editable deployment example. Press Save to save your source and layout together as editable HTML, or follow the 15-minute tutorial.

Tutorial · Example gallery · npm package

Diagram types

| Directive | Use it for | Example | | --- | --- | --- | | @deployment | Systems and infrastructure | Deployment | | @graph | General relationships and grouped systems | Graph | | @sequence | Ordered interactions | Sequence | | @flowchart | Processes and decisions | Flowchart | | @state | Lifecycles and transitions | State | | @er | Entities and relationships | ER | | @component | Software boundaries and interfaces | Component | | @slide | Presentation visuals | Slide | | @class | Classes and UML relationships | Class | | @object | Instances and their values | Objects | | @usecase | Actors and system goals | Use case | | @activity | Actions and control flow | Activity | | @timing | Signals and states over time | Timing |

Install

npm install @hachiware-labs/finch-js
import Finch from "@hachiware-labs/finch-js";

For standalone HTML, load the browser bundle:

<script src="https://cdn.jsdelivr.net/npm/@hachiware-labs/[email protected]/dist/finch.global.js"></script>

Styles

The same flowchart, rendered in different styles.

Compare styles, toggle shadows, and export SVGs. Default, Prism, and Midnight are built-in themes. Business, Precision, and Editorial are custom theme examples defined in that page; “+ shadow” shows a shadow-enabled variant.

Icons, role colors, and your images

Use icon and tone across all themes, including custom themes. Containers pass their tone to descendants; a child can override it or use tone=none to reset. Icon artwork is selected per node and is not inherited.

@deployment
container services "Services" [tone=green] {
  node api "API" [icon=server]
  node auth "Auth" [icon=shield-check tone=coral]
}

Lucide is the default. Optional AWS, Azure, Google Cloud, Kubernetes, and Simple Icons packs use names such as icon=aws:application-auto-scaling and icon=simple:github. Load the required pack after Finch. Use image="./photo.png" for your own image, optionally with imageShape=circle or imageShape=rounded.

For icons and images, open the icon and image example. See the icon guide for a complete HTML example and export requirements, and pack sources for asset versions and terms.

Create diagrams with your coding agent

This repository includes a portable finch skill for coding agents. Ask your agent:

Use the Finch skill to explain the normal order flow and manual-review exception in HTML.
Choose meaningful steps and groups by responsibility, preserving the supplied facts.

Codex discovers the skill automatically from this checkout; use $finch when you want to invoke it explicitly. To install the skill in another workspace or for another supported agent:

npx skills add hachiware-labs/finch-js --skill finch

The installer lets you select the target agent. You can also specify agents directly, for example with --agent claude-code cursor. Add --global to make the skill available across repositories, and restart an agent if a newly installed skill is not listed.

Review the chosen content and the rendered diagram together. Start with automatic layout and allow room for connections before adding position constraints. The skill and runtime are installed separately: updating the skill does not change the library version loaded by existing HTML. See the agent guide.

Save diagrams in Markdown

Use exportMarkdown() and Finch.renderMarkdown() to save and restore a diagram and its node positions in one code fence. See the Markdown guide (Japanese).

Learn more

Development

npm ci
npm run check

To browse the examples locally, run python -m http.server 8000 and open http://127.0.0.1:8000/examples/.

Images and linked examples use the repository build. Sources and freshness record.

Finch.js is licensed under the MIT License.

Both images were simplified, recolored, and repositioned as silhouettes.