statesmith for Mac
StateSmith StateSmith is a cross platform, free/open source tool for generating state machines in multiple programming languages.
statesmith — overview
StateSmith StateSmith is a cross platform, free/open source tool for generating state machines in multiple programming languages. The generated code is human readable, has zero dependencies and is suitable for use with tiny bare metal microcontrollers, video games, apps, web, computers... It avoids dynamic memory allocations for the safety or performance inclined.
The above is my current plan, but I'll gladly help anyone add a new language. I'm hoping contributors will help me with this effort. It is tricky though...
Features and Interactive Examples ? The fundamentals-1 webpage has simple interactive examples that let you explore most StateSmith features.
Quick Start (all supported languages) ? Want to jump right in and just try it!?
The below tutorials use new StateSmith features that are more user friendly. They use different diagram tools, but mirror each other fairly closely otherwise. Tutorial-3 - PlantUML CLI text lessons Tutorial-4 - draw.io CLI text lessons & ? video series older...
Why State Machines and StateSmith? ? If you are new to state machines, then prepare to level up your toolbox! They are incredibly helpful for certain applications.
Why StateSmith? I couldn't find a quality state machine code generator that met my needs, had an attractive license, and was enjoyable to use.
The Diagram is Always Accurate! ? Before I created StateSmith, it was always a pain trying to manually synchronize a hand written state machine with a drawing. Urgent client requests come in and you update the code, but do you and your team always remember to update the drawing? Probably not and so the rot begins. Documentation trust issues arise and as designs get larger, the effort to ensure the diagram is accurate starts to become quite punishing.
Now that we use StateSmith at my work, I never have to worry about the above. I love generating fully working code from the documentation. Incredibly helpful for teams and communicating with clients.
More Examples ? The StateSmith-examples repo has a growing list of examples showcasing different application uses.
Is StateSmith ready for use? ? We use StateSmith in a fair number of production projects at my work. It's been super helpful. Other companies are using StateSmith in production as well (consumer electronics, autonomous vehicles, ...).
StateSmith has a strong suite of tests (730+) and behavior specification coverage. The specification integration tests read a diagram file, generate executable state machine code, then compile and execute that code in another process and ensure that the state machine behavior is exactly what was expected. The same suite of integration tests run for each supported programming language. This strong test base gives me confidence. It also allows us to refactor and optimize StateSmith without fear of accidentally breaking specified behavior.
More Info ? The StateSmith GitHub wiki has a good amount of documentation right now, but always feel free to ask a question.
Details
适用于裸机、嵌入式等的状态机代码生成工具
How to install statesmith
- Open Terminal (press ⌘ + Space and type “Terminal”).
- If Homebrew is not installed yet, run the command below first.
- Run this command:
Latest 10 releases
Last updated 2026-05-11; current version v0.22.2, with the latest 10 releases listed.
| Version | Released | Type | Size | macOS | Windows | Linux |
|---|---|---|---|---|---|---|
| v0.22.2 | 2026-05-11 | Stable | 52.7 MB | Download | Download | Download |
| cli-v0.21.0-alpha-1 | 2026-02-25 | Stable | 52.7 MB | Download | Download | Download |
| cli-v0.20.0 | 2026-02-01 | Stable | 52.7 MB | Download | Download | Download |
| cli-v0.19.0 | 2025-07-28 | Stable | 52.2 MB | Download | Download | Download |
| cli-v0.18.3 | 2025-07-03 | Stable | 52.2 MB | Download | Download | Download |
| cli-v0.18.2 | 2025-04-19 | Stable | 52.2 MB | Download | Download | Download |
| cli-v0.18.1 | 2025-04-15 | Stable | 52.2 MB | Download | Download | Download |
| v0.22.1-alpha-1 | 2026-04-14 | Pre-release | 52.7 MB | Download | Download | Download |
| v0.22.0-alpha-1 | 2026-04-13 | Pre-release | 52.7 MB | Download | Download | Download |
| cli-v0.20.0-alpha-1 | 2025-08-30 | Pre-release | 52.2 MB | Download | Download | Download |
Data from GitHub Releases; stable releases first, each group sorted newest first.
Prebuilt bottle platforms
Official Homebrew bottles cover:
- Apple silicon · latest macOS
- Apple silicon · macOS 26 Tahoe
- Apple silicon · macOS 15 Sequoia
- Apple silicon · macOS 14 Sonoma
- Intel · macOS 14 Sonoma
- Linux · ARM64
- Linux · x86_64
Compared with similar apps
Only public metadata is compared, with no subjective recommendation; see the compare pages for field-by-field comparisons.
| App | Version | License | Architecture | 30-day installs |
|---|---|---|---|---|
| statesmith | v0.22.2 | Apache-2.0 | CLI | 2 |
| glulxe | 0.6.1 | MIT | CLI | 2 |
| sparse | 0.6.4 | MIT | CLI | 2 |
| go-bindata | v4.0.2 | BSD-2-Clause | CLI | 484 |
Similar apps: Command-line Tools
glulxe
glulxe is a virtual machine for interactive fiction, used to run compiled Glulx story files.sparse
sparse is a static code analysis tool for the C language that runs as a command-line utility.go-bindata
This fork is maintained by Kevin Burke, and is the version trusted by Homebrew.autocode
autocode is a command-line code automation tool for developers, built around a spec-driven…chaiscript
Easy to use embedded scripting language for C++codequery
Code-understanding, code-browsing or code-search toolCategories: Command-line Tools