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

@flowspine/cli

v0.1.1-beta.20260407.1

Published

Flowspine CLI for build/validate/export/watch workflows (beta, not production-ready)

Readme

@flowspine/cli

Command-line interface for Flowspine project workflows.

Use this package when you need operational tasks such as:

  • scaffold a new Flowspine project
  • build a catalog from process files
  • validate extracted process graphs
  • export graph output
  • watch files during development

This package is the standard workflow layer over @flowspine/core and @flowspine/extractor.

Do not use it as a runtime engine.

The CLI works with process catalogs and repository workflows.
It does not execute full process graphs.


Installation

pnpm add -D @flowspine/cli@beta

Run commands with:

pnpm exec flowspine

You can also expose it through package scripts.


Mental Model

Typical Flowspine workflow:

  1. define processes with @flowspine/core
  2. build a catalog with @flowspine/cli
  3. validate the catalog
  4. export graphs if needed

Use CLI when the task is operational:

  • build
  • validate
  • export
  • scaffold
  • watch

If the task is about:

  • process meaning or step logic → use @flowspine/core
  • custom static analysis in code → use @flowspine/extractor

Commands

Create a new project scaffold

flowspine new <name> [--dir <path>]

Example:

pnpm exec flowspine new demo

This generates a starter Flowspine process file.


Build catalog

flowspine build [--glob <pattern>] [--out <path>]

Examples:

pnpm exec flowspine build
pnpm exec flowspine build --glob "processes/**/*.ts" --out ".flowspine/catalog.json"

Use this to scan process files and generate a catalog JSON file.


Validate catalog

flowspine validate [--input <path>] [--strict] [--warnings-as-errors] [--format text|json]

Examples:

pnpm exec flowspine validate
pnpm exec flowspine validate --input ".flowspine/catalog.json"
pnpm exec flowspine validate --input ".flowspine/catalog.json" --format json
pnpm exec flowspine validate --input ".flowspine/catalog.json" --strict

Validation checks include:

  • duplicate process IDs
  • missing start/end nodes
  • broken edge references
  • unreachable nodes
  • nodes with no path to end
  • extractor diagnostics as warnings
  • weak branch fanout as warnings

Use --strict when warnings should fail the validation flow.

Use --warnings-as-errors when your workflow treats warnings as blocking.


Export graph output

flowspine export [--input <path>] [--format json|mermaid] [--out <path>]

Examples:

pnpm exec flowspine export --input ".flowspine/catalog.json" --format json
pnpm exec flowspine export --input ".flowspine/catalog.json" --format mermaid --out ".flowspine/catalog.mmd"

Use this when you need a machine-readable export or a Mermaid diagram.


Watch process files

flowspine watch [--glob] [--out] [--debounce] [--polling] [--poll-interval] [--no-await-write-finish] [--no-validate] [--strict] [--warnings-as-errors]

Example:

pnpm exec flowspine watch --glob "processes/**/*.ts" --out ".flowspine/catalog.json"

Use watch mode during active development to rebuild and optionally validate automatically.


Common Workflow

Local development

pnpm exec flowspine build --glob "processes/**/*.ts" --out ".flowspine/catalog.json"
pnpm exec flowspine validate --input ".flowspine/catalog.json"
pnpm exec flowspine export --input ".flowspine/catalog.json" --format mermaid --out ".flowspine/catalog.mmd"

Continuous watch

pnpm exec flowspine watch --glob "processes/**/*.ts" --out ".flowspine/catalog.json"

CI-style validation

pnpm exec flowspine build --glob "processes/**/*.ts" --out ".flowspine/catalog.json"
pnpm exec flowspine validate --input ".flowspine/catalog.json" --strict --warnings-as-errors

What Validation Actually Protects

The CLI helps detect structural problems before they spread into tooling or diagrams.

Examples:

  • process graph contains unreachable nodes
  • a branch does not split meaningfully
  • an edge points to a missing node
  • extracted catalog contains duplicate process IDs

This is why the CLI is usually the right default for repository-level Flowspine workflows.


When To Use Other Packages

Use @flowspine/core when you need to:

  • define process structure
  • define step contracts
  • implement handler logic
  • run individual steps

Use @flowspine/extractor when you need to:

  • build custom programmatic analysis
  • embed extraction into your own scripts/tools
  • inspect extraction behavior directly

Related Packages

  • @flowspine/core
  • @flowspine/extractor

License

Apache 2.0

Copyright

Copyright (c) 2026 Flowspine contributors.