Ross ROSS = Recommend OSS · open-source software intelligence for agents

ifandelse/machina.js

ts ex machina - finite state machines in TypeScript observed · 2026-08-28

github.com/ifandelse/machina.js · homepage · TypeScript · NOASSERTION (other) observed · 2026-08-28

Health v2 · maintenance only

76/100

  • Activity 97
  • Release rhythm 35
  • Longevity 100

Flags: no_releases no_license

How is this computed?

round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10) — computed 2026-09-03. Adoption (stars, forks) is never an input.

  • gap_med: n/a
  • age_days: 5300
  • days_rel: n/a
  • days_push: 22
  • n_releases_24m: 0

Full methodology

Adoption not part of the score

1969 stars · 144 forks observed · 2026-08-28

What it is AI-extracted, prompt v1, taxonomy v1, 2026-08-30, confidence not recorded

machina is a TypeScript-first library for building finite state machines in JavaScript and TypeScript, with full type inference for states, inputs, and transitions. It supports hierarchical states with input bubbling, behavioral FSMs that track state per-client via WeakMap, deferred inputs, lifecycle hooks, and static analysis tooling.

Use cases

  • model complex UI component states as finite state machines
  • manage connection lifecycle states for multiple clients with one FSM definition
  • implement hierarchical state machines with parent-child delegation
  • queue and replay inputs that arrive before a state is ready
  • catch unreachable states and missing handlers at compile time or lint time

When to avoid

  • you need full SCXML or statechart features like parallel regions or history states
  • you want a batteries-included state container with built-in store integration like Redux or Zustand
  • your project is plain JavaScript and you do not benefit from the TypeScript-first design

Facets

library · maturity active

state-management developer-tools developer-tools programming-languages browser cross-platform finite-state-machine fsm hierarchical-states behavioral-fsm typescript-first state-charts automation nodejs typescript javascript

3 sources

Member repositories

RepositoryRoleHealth v2
ifandelse/machina.jsmain76

For agents

markdown · JSON · MCP: product_card(name="ifandelse/machina.js")

Data as of 2026-08-30T08:39:29.467469+00:00 · Report a problem