{"id":15870959,"url":"https://github.com/sgreben/rc-cli","last_synced_at":"2025-07-01T09:06:10.686Z","repository":{"id":43339266,"uuid":"81023214","full_name":"sgreben/rc-cli","owner":"sgreben","description":"A rule checker command line tool. Reads YAML, written in Java. Checks sets of rules for completeness, overlap, and constraint satisfaction","archived":false,"fork":false,"pushed_at":"2025-06-14T02:31:18.000Z","size":27,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-14T03:32:21.982Z","etag":null,"topics":["analysis","constraint-satisfaction","constraints","rc","rule-checker","rules","yaml","z3"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sgreben.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2017-02-05T21:24:08.000Z","updated_at":"2020-08-07T16:20:38.000Z","dependencies_parsed_at":"2022-09-22T14:50:34.630Z","dependency_job_id":"f4b640ef-591a-4fb8-8e0c-2d4761d2cffc","html_url":"https://github.com/sgreben/rc-cli","commit_stats":{"total_commits":15,"total_committers":3,"mean_commits":5.0,"dds":0.6,"last_synced_commit":"6b8e1170e78d7c8702b167ddde5c7bd3af6dc856"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sgreben/rc-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2Frc-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2Frc-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2Frc-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2Frc-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sgreben","download_url":"https://codeload.github.com/sgreben/rc-cli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sgreben%2Frc-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933277,"owners_count":23386780,"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":["analysis","constraint-satisfaction","constraints","rc","rule-checker","rules","yaml","z3"],"created_at":"2024-10-06T00:41:07.080Z","updated_at":"2025-07-01T09:06:10.653Z","avatar_url":"https://github.com/sgreben.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `rc` - a rule checker\n\n```\nusage: rc [module.yaml]\n -c,--constraint \u003carg\u003e   A constraint to check for the given rules.\n -h,--help               Print this help message.\n -rs,--rule-set \u003carg\u003e    Check only the given rule set.\n```\n\n`rc` is a command-line interface to the [rc](https://github.com/sgrebem/rc) rule checking library.\n\n## Example\n\n```bash\n$ cat src/test/resources/module1.yaml\nname: myModule\ntypes:\n    STATE:\n      values:\n        - ON\n        - OFF\n        - STANDBY\nruleSets:\n    - name: my rule set\n      variables:\n        temperature: int\n        temperatureGoal: int\n        motion: real\n        brightness: real\n        state: STATE\n        stateOut: STATE\n      rules:\n        - name: rule 1\n          when: temperature \u003e 23 \u0026\u0026 (motion \u003c 0.3 || brightness \u003c 0.1)\n          then:\n            stateOut: OFF\n        - name: rule 2\n          when: temperature \u003c temperatureGoal \u0026\u0026 motion \u003e= 0.3\n          then:\n              stateOut: ON\n        - name: rule 3\n          when: temperature \u003e= temperatureGoal \u0026\u0026 motion \u003c 0.1\n          then:\n              stateOut: state\n        - name: rule 4\n          when: temperature \u003e= temperatureGoal \u0026\u0026 motion \u003e 0.1\n          then:\n              stateOut: STANDBY\n```\n\n```bash\n$ java -jar target/rc-cli-1.0-SNAPSHOT-jar-with-dependencies.jar src/test/resources/module1.yaml\n---\nname: \"myModule\"\nruleSets:\n- name: \"my rule set\"\n  complete: false\n  completenessCounterExample:\n    temperatureGoal: \"1\"\n    brightness: \"0.0\"\n    motion: \"0.0\"\n    temperature: \"0\"\n    state: \"OFF\"\n    stateOut: \"OFF\"\n  ruleOverlaps:\n---\nname: \"myModule\"\nruleSets:\n- name: \"my rule set\"\n  complete: false\n  completenessCounterExample:\n    temperatureGoal: \"1\"\n    brightness: \"0.0\"\n    motion: \"0.0\"\n    temperature: \"0\"\n    state: \"OFF\"\n    stateOut: \"OFF\"\n  ruleOverlaps:\n  - first:\n      rule: \"temperature \u003e 23 \u0026\u0026 (motion \u003c 0.3 || brightness \u003c 0.1)\"\n      index: 0\n    second:\n      rule: \"temperature \u003c temperatureGoal \u0026\u0026 motion \u003e= 0.3\"\n      index: 1\n    overlapExample:\n      temperatureGoal: \"25\"\n      brightness: \"0.0\"\n      motion: \"0.3\"\n      temperature: \"24\"\n      state: \"OFF\"\n      stateOut: \"OFF\"\n    consistent: false\n  - first:\n      rule: \"temperature \u003e 23 \u0026\u0026 (motion \u003c 0.3 || brightness \u003c 0.1)\"\n      index: 0\n    second:\n      rule: \"temperature \u003e= temperatureGoal \u0026\u0026 motion \u003c 0.1\"\n      index: 2\n    overlapExample:\n      temperatureGoal: \"0\"\n      brightness: \"0.0\"\n      motion: \"0.0\"\n      temperature: \"24\"\n      state: \"OFF\"\n      stateOut: \"OFF\"\n    consistent: true\n  - first:\n      rule: \"temperature \u003e 23 \u0026\u0026 (motion \u003c 0.3 || brightness \u003c 0.1)\"\n      index: 0\n    second:\n      rule: \"temperature \u003e= temperatureGoal \u0026\u0026 motion \u003e 0.1\"\n      index: 3\n    overlapExample:\n      temperatureGoal: \"0\"\n      brightness: \"0.0\"\n      motion: \"0.2\"\n      temperature: \"24\"\n      state: \"OFF\"\n      stateOut: \"OFF\"\n    consistent: false\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgreben%2Frc-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsgreben%2Frc-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsgreben%2Frc-cli/lists"}