# qmuntal/stateless

Go library for creating finite state machines

Repository: https://github.com/qmuntal/stateless
Canonical: https://ross.abutalabs.com/products/qmuntal-stateless
Homepage: https://wikipedia.org/wiki/Finite-state_machine
Language: Go
License: BSD-2-Clause
License Family: permissive
Topics: go, golang, state-machine, dot-graph, state-diagram, fsm, statechart
Last push: 2026-02-10T14:11:58+00:00

## Health v2 (maintenance only)
Score: 63/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 66, release rhythm 37, longevity 100
- inputs: {"age_days": 2548, "days_push": 204, "days_rel": 204, "gap_med": 263, "n_releases_24m": 2}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1382, forks 69 (observed 2026-08-28T04:04:34.412002+00:00)

## What it is
A Go library for creating finite state machines and lightweight state machine-based workflows directly in code. It is an idiomatic port of the C# Stateless library, based on UML statechart theory.

## Use cases
- model state machines in Go
- build state machine-based workflows
- implement hierarchical states with entry/exit events
- add guard clauses for conditional transitions
- generate dot-graph state diagrams
- model device or process states with well-defined transitions

## When to choose
- you need a finite state machine in a Go project
- you want UML statechart features like hierarchical states and guards
- you want to visualize state machines as dot graphs
- you are porting logic from the C# Stateless library

## When to avoid
- you need a full workflow engine with persistence and human tasks
- you need distributed or durable workflow orchestration
- your project is not written in Go

## Facets
- artifact type: library
- maturity: active
- function: workflow-automation, developer-tools
- domain: developer-tools
- platform: go, cross-platform
- tags: state-machine, fsm, statechart, dot-graph, uml-statechart, algorithms, automation

## Member repositories
- qmuntal/stateless (main) score 63

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:34.412002+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T04:40:07.806936+00:00, confidence not recorded.
  - readme: https://github.com/qmuntal/stateless (fetched 2026-08-28T04:04:34.412002+00:00, sha 238493a6ec3d)
  - homepage: https://wikipedia.org/wiki/Finite-state_machine (fetched 2026-08-29T11:55:58.701071+00:00, sha 6bd229a8148f)
  - site_page: https://en.wikipedia.org/wiki/Wikipedia:About (fetched 2026-08-29T11:55:58.711219+00:00, sha 822f861f7833)
- Data as of 2026-08-30T08:39:29.467469+00:00.
