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

@lite-fsm/cli

v0.1.2

Published

Alpha CLI for lite-fsm project graph exports

Readme

@lite-fsm/cli

Alpha command line tools for lite-fsm. The lite-fsm binary can create starter React projects, add generated-store machines, export a project graph JSON document, and run a local Visualizer session for a TypeScript project.

The CLI uses @lite-fsm/graph for static analysis. It does not run your app, call reducers, execute effects, or evaluate user code.

Install

npm install --save-dev @lite-fsm/cli

After installation, the lite-fsm command is available.

Commands

| Command | Purpose | | -------------- | ---------------------------------------------------------------------- | | create | Create a starter Next.js or Vite React project wired to lite-fsm. | | add-machine | Add a domain machine to a generated src/store. | | export-graph | Build a project graph and write a JSON export document. | | visualize | Build a project graph and launch the bundled local Visualizer session. |

Create a Project

Create a Next.js starter:

lite-fsm create my-app --template next

Create a Vite starter:

lite-fsm create my-app --template vite

Create a starter in the current directory:

lite-fsm create . --template next

Tailwind CSS is enabled by default. To create the same starter without Tailwind:

lite-fsm create my-app --template vite --css none

The generated project includes TypeScript, alias @/*, @lite-fsm/core, @lite-fsm/react, @lite-fsm/middleware, immer, and a minimal store under src/store.

Add a Machine

From the root of a project created by lite-fsm create, add a domain machine:

lite-fsm add-machine user-session

This creates src/store/machines/user-session.ts, registers userSession in src/store/index.ts, and adds userSession.Events to src/store/types.ts.

The v1 command accepts names in kebab-case, snake_case, or camelCase and always uses the generated store layout under src/store.

Export a Graph

lite-fsm export-graph --entry store/index.ts --out lite-fsm.graph.json --tsconfig tsconfig.json

Minimal source shape:

// store/index.ts
import { MachineManager, createMachine } from "@lite-fsm/core";

export const lamp = createMachine({
  config: {
    OFF: { SWITCH: "ON" },
    ON: { SWITCH: "OFF" },
  },
  initialState: "OFF",
  initialContext: {},
});

export const manager = MachineManager({ lamp });

The export document includes the graph, project files, source hashes, CLI diagnostics, and optional source text when --include-source is passed.

Run the Visualizer

lite-fsm visualize --entry store/index.ts

By default, visualize starts a local server on 127.0.0.1:3030, opens a browser, and keeps the process running until interrupted.

Useful options:

lite-fsm visualize --entry store/index.ts --tsconfig tsconfig.json --port 3031 --no-open

Options

create:

  • <project-name> - required relative target directory, or . for the current directory. Nested paths such as apps/demo are supported when the parent directory already exists.
  • --template <next|vite> - required framework template.
  • --css <tailwind|none> - styling preset, defaults to tailwind.
  • --package-manager <pnpm|npm|yarn|bun> - package manager for scaffold, install, and next steps, defaults to npm.
  • --install / --no-install - install dependencies after generation, defaults to --install.

add-machine:

  • <name> - required machine name in kebab-case, snake_case, or camelCase. The command runs relative to the current working directory and supports the store shape generated by lite-fsm create.

export-graph:

  • --entry <path> - required TypeScript entry file where the selected MachineManager(...) is visible.
  • --out <path> - required output JSON path.
  • --tsconfig <path> - optional explicit TypeScript config.
  • --include-source - embed discovered source file text in the JSON document.

visualize:

  • --entry <path> - required TypeScript entry file.
  • --tsconfig <path> - optional explicit TypeScript config.
  • --port <number> - local Visualizer port, defaults to 3030.
  • --no-open - print the session URL without opening a browser.

Documentation