{"id":19216572,"url":"https://github.com/fbeline/fsm-clj","last_synced_at":"2025-05-12T23:29:54.819Z","repository":{"id":57713687,"uuid":"149709470","full_name":"fbeline/fsm-clj","owner":"fbeline","description":"A Clojure library designed to create deterministic finite state machines.","archived":false,"fork":false,"pushed_at":"2018-09-21T23:25:15.000Z","size":55,"stargazers_count":36,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T19:38:51.683Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Clojure","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"epl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fbeline.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-21T04:23:02.000Z","updated_at":"2023-04-10T20:12:30.000Z","dependencies_parsed_at":"2022-08-25T12:40:10.120Z","dependency_job_id":null,"html_url":"https://github.com/fbeline/fsm-clj","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Ffsm-clj","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Ffsm-clj/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Ffsm-clj/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fbeline%2Ffsm-clj/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fbeline","download_url":"https://codeload.github.com/fbeline/fsm-clj/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253839870,"owners_count":21972386,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-09T14:17:41.465Z","updated_at":"2025-05-12T23:29:54.790Z","avatar_url":"https://github.com/fbeline.png","language":"Clojure","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fsm-clj\n\n[![Clojars Project](https://img.shields.io/clojars/v/fsm-clj.svg)](https://clojars.org/fsm-clj)\n\nA Clojure library designed to create deterministic finite state machines.\n\n- Easy to use flat one level state machine.\n- Define state machines that can accumulate values.\n- Transitions with actions and guards.\n- Graphically visualize the resulting state machines.\n\nRefer to the [documentation](doc/documentation.md) for more details.\n\n\n## Quick Start\n\nRequire the fsm-clj core name space.\n\n```clj\n(:require [fsm-clj.core :refer :all])\n```\n\nDefine a simple traffic light state machine.\n\n```clj\n(defsm traffic-light\n  [[:green -\u003e :yellow when :to-yellow]\n   [:yellow -\u003e :red when :to-red]\n   [:red -\u003e :green when :to-green]])\n```\n\nSending events.\n\n```clj\n(-\u003e (traffic-light)\n    (send-event :to-yellow)\n    :state) ;; =\u003e :yellow\n```\n\nGraphically generate the State Machine (open a Swing viewer).\n\n```clj\n(show! (traffic-light))\n```\n\n![Traffic Light Finite State Machine](doc/fsm-traffic-light.png)\n\n## License\n\nDistributed under the Eclipse Public License either version 1.0 or (at\nyour option) any later version.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbeline%2Ffsm-clj","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffbeline%2Ffsm-clj","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffbeline%2Ffsm-clj/lists"}