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

@diagc/cli

v1.3.0

Published

Author software-architecture diagrams as code, compile them to a validated model, edit them in a local studio, and publish pages and images.

Readme

diagc

Diagrams as code, with a local studio. diagc turns diagram sources that live in your repository into things other people can open.

  • Pages and pictures. diagc publish writes one self-contained HTML page per diagram, and a PNG. The page folds, zooms and switches views in the browser, with no server behind it. Host the pages on GitHub Pages, GitLab Pages or any static host, and put the PNG in a README.
  • Diffs in pull requests. A GitHub Action comments on a pull request that changes a diagram: the list of changes, and the before and after pictures.
  • A local studio. diagc studio opens a browser app against your repository. Draw a diagram there and the studio saves it as a file in the repository. diagc eject turns a drawn diagram into TypeScript.

Diagrams are plain files in your repository, so they diff, review and refactor like the rest of it.

npm i -g @diagc/cli   # or: npx @diagc/cli studio

Needs Node ≥ 22.

Quickstart

diagc init shop    # a starter diagram in .diagrams/src/, the .gitignore lines, compiled
diagc studio       # opens the editor, recompiling as you edit

npm i -D @diagc/core as well if you want types and completion on .diagram.ts files — the CLI compiles them either way.

Commands

| Command | What it does | | --- | --- | | diagc init | Set a repository up: a starter diagram (--type c4 for a C4 one), the .gitignore lines, and with --agents a pointer to the guide for coding agents (AGENTS.md / CLAUDE.md, and a Claude Code skill). | | diagc compile | Compile .diagrams/src/**/*.diagram.{ts,json} into validated artifacts under .diagrams/.artifacts/. The default command. | | diagc lint | Report what compiles but is probably a mistake — typos, duplicates, unused or undrawn parts. --json for a script or an agent; exit 1 until clean. | | diagc watch | The same, recompiling on change. | | diagc studio | Serve the visual editor against the current directory (default http://127.0.0.1:5173). Diagrams drawn here are saved back as .diagram.json. | | diagc publish | Write self-contained HTML pages to .diagrams/html/ and PNGs to .diagrams/static/. | | diagc guide | Print how to write a diagram: the DSL, then one topic per diagram type (diagc guide c4). Written for a coding agent as much as for a person. |

Flags: --type <type> and --agents (init), --out <dir> (artifact directory), --json (lint findings as JSON), --no-images (publish HTML only), --link <url> (link the published index to an address), --help.

PNG export drives headless Chrome. Without one, publish writes HTML and says so; point CHROME_PATH at a browser to get images.

Two ways to author, one model

Write a .diagram.ts with the builder DSL, or draw one in the studio and it writes a .diagram.json for you. Both compile to the same validated model, so a diagram is never trapped in the tool that made it. Positions live in a separate <name>.layout.json, which keeps meaning and coordinates in different diffs.

Commit .diagrams/src/. .diagrams/.artifacts/, .diagrams/html/ and .diagrams/diff/ are build output — diagc init gitignores them.

Documentation

Website and live examples: https://ferroman.github.io/diagc/

Full docs, tutorials, and the model reference: https://github.com/Ferroman/diagc

License

AGPL-3.0-only, with additional permissions under section 7: diagrams you author, and the pages and images built from them, are yours to license however you like. A commercial license is available. See the project README.