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

agent-flowviz

v0.0.1

Published

JSON-in, SVG-out diagram framework with icon-first design

Downloads

3

Readme

agent-flowviz

JSON-in, SVG-out diagram framework where icons are the semantic layer.

An AI agent generates the JSON, calls npx agent-flowviz, and produces the SVG:

# 1. Agent writes JSON to file
cat > diagram.json << 'EOF'
{
  "nodes": [
    { "id": "agent",   "icon": "mdi:robot",          "label": "AI Agent" },
    { "id": "json",    "icon": "mdi:code-json",      "label": "JSON" },
    { "id": "flowviz", "icon": "mdi:vector-polygon",  "label": "agent-flowviz" },
    { "id": "svg",     "icon": "mdi:image",          "label": "SVG" }
  ],
  "edges": [
    { "from": "agent",   "to": "json" },
    { "from": "agent",   "to": "flowviz" },
    { "from": "json",    "to": "svg" },
    { "from": "flowviz", "to": "svg" }
  ]
}
EOF

# 2. Agent calls agent-flowviz
npx agent-flowviz render diagram.json -o diagram.svg

What

One JSON, one diagram. AI writes JSON, human reads diagram.

agent-flowviz is a Node.js library and CLI designed for AI agents (Claude Code, Cursor, Copilot) to generate architecture diagrams. The agent produces a JSON describing nodes and edges, calls agent-flowviz via API or CLI, and gets back an SVG where every node carries an icon from the Iconify ecosystem (~7,000 mdi icons in v0.0.1). The human receives a readable, icon-rich diagram without writing any code.

Why

  • Mermaid / PlantUML — rectangles + text. Non-technical readers struggle to parse them.
  • mingrammer/diagrams — rich icons, but requires Python + Graphviz, scoped to cloud infra.
  • D2 — better DSL, but Go runtime, icons are secondary.

agent-flowviz fills the gap: icon-first diagrams from a JSON schema that AI agents produce natively.

How

npx agent-flowviz render input.json -o output.svg
import { render } from "agent-flowviz";

const svg = await render({ nodes: [...], edges: [...] });

Input Format

Each node requires id, icon, label. Each edge requires from, to.

{
  "nodes": [
    { "id": "user",    "icon": "mdi:account",      "label": "User" },
    { "id": "gateway", "icon": "mdi:shield-check",  "label": "API Gateway" },
    { "id": "server",  "icon": "mdi:server",        "label": "Backend" },
    { "id": "db",      "icon": "mdi:database",      "label": "Database" }
  ],
  "edges": [
    { "from": "user",    "to": "gateway" },
    { "from": "gateway", "to": "server" },
    { "from": "server",  "to": "db" }
  ]
}

Icons use the mdi: prefix. Browse available icons at Iconify MDI.

Validation

Two-pass validation returns actionable error messages:

[ERROR] nodes[2].icon is required
[ERROR] edges[0].to references 'userr' which is not a valid node id
[ERROR] edges[1] has self-loop: from and to are both 'server'

Roadmap

v0.1.0 — Layout direction (LR/RL/BT), CONTAIN/ASSOCIATE edges, multiple icon sets, edge labels

v0.2.0 — Themes, node style variants (borderless), edge gradients, fuzzy error suggestions

License

MIT