dotnet-state-machine/stateless

A simple library for creating state machines in C# code

View on GitHub ↗Jump to charts ↓

Summary Information

Updated 9 minutes ago
Added to GitGenius on September 10th, 2026
Created on August 15th, 2014
Open Issues & Pull Requests: 81 (+0)
GitHub issues: Enabled
Number of forks: 805
Total Stargazers: 6,260 (+0)
Total Subscribers: 227 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 4.7 days
Mean response time: 106.1 days
90th percentile: 157.1 days
Tracked items: 34

How this project is maintained

Around half of the issues opened in the past year never receive a reply. Only 5% of issues opened in the past year have been closed. Three people close 59% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 17
New in 7 days: 0
Closed in 7 days: 0
Avg open age: 860 days
Stale 30+ days: 17
Stale 90+ days: 16

Recent activity

Opened in 7 days: 0
Closed in 7 days: 0
Comments in 7 days: 0
Events in 7 days: 0

Top labels

No label distribution available yet.

Most active issues this week

No issue events were indexed in the last 7 days.

Detailed Description

Stateless is a library for creating state machines in C# code.

State machines are useful for modeling workflows, game logic, protocol handling, and other systems with distinct states and transitions, but building them correctly requires careful management of state validity and transition rules. Stateless solves this by providing a fluent API that lets developers define states, triggers, and transitions declaratively in code. The library enforces valid state transitions at runtime and handles guard conditions, entry and exit actions, and hierarchical states, reducing boilerplate and the risk of invalid state combinations.

Stateless suits projects where state management logic is complex enough to benefit from explicit modeling but not so large that a visual state machine tool is necessary. It works well for workflow engines, game state management, device drivers, and protocol implementations. The library is particularly valuable when you want compile-time type safety and the ability to keep state machine definitions close to the code that uses them, rather than in separate configuration files or diagrams.

The project maintains a steady stream of commits addressing bug fixes and feature requests. Pull requests receive thoughtful review with discussion of implementation details and edge cases. Issues are regularly triaged and responded to, with maintainers engaging directly on questions about usage patterns and design decisions. The codebase shows active refinement of existing functionality rather than pursuit of major new features, suggesting a focus on stability and reliability for users already depending on the library.