{"id":20169573,"url":"https://github.com/hwayne/tlacli","last_synced_at":"2026-04-01T19:18:26.461Z","repository":{"id":52698646,"uuid":"232948618","full_name":"hwayne/tlacli","owner":"hwayne","description":"A script for running TLA+/TLC from the command line","archived":false,"fork":false,"pushed_at":"2021-04-20T19:11:54.000Z","size":2828,"stargazers_count":82,"open_issues_count":6,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-03-27T15:38:24.562Z","etag":null,"topics":["formal-methods","tlaplus","tlc"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hwayne.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-01-10T02:28:16.000Z","updated_at":"2026-02-16T03:23:56.000Z","dependencies_parsed_at":"2022-08-13T02:01:24.077Z","dependency_job_id":null,"html_url":"https://github.com/hwayne/tlacli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hwayne/tlacli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwayne%2Ftlacli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwayne%2Ftlacli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwayne%2Ftlacli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwayne%2Ftlacli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hwayne","download_url":"https://codeload.github.com/hwayne/tlacli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hwayne%2Ftlacli/sbom","scorecard":{"id":474578,"data":{"date":"2025-08-11","repo":{"name":"github.com/hwayne/tlacli","commit":"df5ca3424930b4a2ef57e18348744b81e55830e2"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"name":"Code-Review","score":0,"reason":"Found 2/24 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":9,"reason":"binaries present in source code","details":["Warn: binary detected: src/tlacli/tla2tools.jar:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE.txt:0","Info: FSF or OSI recognized license: MIT License: LICENSE.txt:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 9 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-19T14:57:13.019Z","repository_id":52698646,"created_at":"2025-08-19T14:57:13.019Z","updated_at":"2025-08-19T14:57:13.019Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31051791,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T16:55:14.406Z","status":"ssl_error","status_checked_at":"2026-03-27T16:55:07.885Z","response_time":164,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["formal-methods","tlaplus","tlc"],"created_at":"2024-11-14T01:13:00.736Z","updated_at":"2026-04-01T19:18:26.436Z","avatar_url":"https://github.com/hwayne.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tlacli: A CLI tool for TLA+\n\n**DISCLAIMER:** This is not an official TLA+ tool and isn't a prototype for one. I'm not making any guarantees of backwards compatibility or non-breaking changes or whatever. It's just a script I find useful.\n\n`tlacli` is a tool for running the TLC model checker from the command line. You can already run TLC from the command line, anyway, using `tlc2.TLC`, and `tlacli` only provides a subset of the functionality. It still has a few UX improvements, though:\n\n1. Nicer flag UX. Arguments follow the conventional \"flag\" format. You can spot-check a spec with just `tlacli check specfile.tla`. \n1. Saner defaults. It automatically uses `Spec` as your temporal formula, defaults to using a worker per CPU core, gives terse output, etc.\n1. You don't have to write a config file. You can define invariants, properties, and constants as command-line flags and `tlacli` will automatically build the proper config file for that run. You can also save the configuration as a template for future runs. You can also use _both_ a config file and flags, where the config is a template and the flags are specializations.\n\n## Setup\n\nJust run `pip install tlacli`. You will need Java and Python 3.7. \n\nThe `requirements.txt` is only needed for testing.\n\n## Translating PlusCal\n\n```\ntlacli translate specfile.tla\n```\n\n**NOTE:** By default this includes the `-nocfg` flag, which prevents the tool from overwritting your copy of `specfile.cfg`. Right now no other flags are supported. If you need flags, you can put them directly in the module file. See page 67 of the [PlusCal manual](https://lamport.azurewebsites.net/tla/p-manual.pdf).\n\n## Model Checking\n\n\n```\ntlacli check specfile.tla\n```\n\nBy default, this runs `specfile.tla` with the specification `Spec`. You can change the run specification with the `--spec` flag. By default, this runs TLC with the `-terse` and `-cleanup` flags. The config file will be saved as `temporary.cfg`. You can change the filename with `--out-cfg {name}`.\n\n**BUG:** Currently you cannot pass in an absolute path for the specfile, at least on windows. You can pass in a relative path. See [this](https://github.com/tlaplus/tlaplus/issues/424) tlatools issue. This is not an issue for pluscal translation.\n\n### Properties\n\nYou can specify invariants and properties from the command line. Use the `--invariant {inv}` flag and the `--property {prop}` flag, respectively. Both accept multiple operators.\n\n**NOTE:** If `--invariant` or `--property` are the _last_ flags passed in, the script will assume your specfile is an invariant! You can prevent this by adding a `--`.\n\n```\ntlacli check --invariant Inv1 Inv2 -- specfile.tla\n```\n\nYou can also use `--inv` and `--prop`, but this may change in the future.\n\n### Constants\n\nYou can assign constants with `--constant {name} {value}`. Each constant must be a separate flag. You can put in sets, tuples, etc by putting `{value}` in quotes. Use single quotes if you want to put in strings.\n\n```\ntlacli check --constant Max 4 --constant Threads '{1, 2}' specfile.tla\ntlacli check --constant Colors '{\\\"red\\\", \\\"green\\\"}' specfile.tla\n```\n\n#### Model Values\n\nIf you need several model values, you can specify them all in a single `--model-values {m1} {m2} ...` flag.\n\n```\ntlacli check --model_values A B C Null Server -- specfile.tla\n```\n\n#### Sets of Model Values\n\nUse an ordinary assignment. You don't need a `--model-values` flag first.\n\n```\n# Wrong\ntlacli check --model-values m1 m2 m3 --constant ModelSet \"{m1, m2, m3}\" specfile.tla\n\n\n# Right\ntlacli check --constant ModelSet \"{m1, m2, m3}\" specfile.tla\n```\n\nSymmetry sets are not yet supported.\n\n### Configuration Templates\n\nYou can specify a template configuration with `--cfg template.cfg`:\n\n```\ntlacli check --cfg foo.cfg specfile.tla\n```\n\n`tlacli` can only read things that are also expressible as flags. Currently, this means invariants, properties, specification, and (most) constants. Everything else is ignored. It's a simple text parser and may miss things formated in an unexpected way. The one guarantee: If you write a file a config with `--out-cfg` and later read it with `--cfg`, the whole config will be read properly.\n\nA template can be used in conjunction with the other flags. Currently this adds the additional flags on top of the template. The plan is that if the flags and the template conflict, the flags take priority. This will let us specialize a template.\n\n### Debugging\n\n`--show-script` will print the command-line script passing to `tla2tools`. `--show-cfg` will print the cfg used for model-checking.\n## Contributing\n\nEh make a PR or something\n\n### Testing\n\nUse `pytest`. This is currently broken because I need to add fixtures\n\n## TODO\n\n### Features\n* Implement and document all the TLC options here: https://lamport.azurewebsites.net/tla/tlc-options.html\n    * TLC option passthrough\n* Symmetry model sets\n* Remove `temporary.cfg`\n* Maybe use fewer workers per run by default\n* Advanced config options:\n    * VIEW (chaos reigns)\n    * Operator Overrides / Constant Operators\n    * CONSTRAINT and ACTION-CONSTRAINT\n    * SYMMETRY\n* Explanations on what you can and can't assign in a config file (anything that doesn't require `EXTENDS`, I think)\n* Writing on landmines and stuff\n\n\n### Internal\n\n* Store config if you have a _lot_ of flags you need to pass. Would be overridden by actual flags\n* Get rid of the horrible `pkg_resources` kludge for accessing the `jar`\n\n## Out of Scope\n\n* INIT-NEXT config\n* TLAPS\n* Toolbox-only features like profiling, running in the cloud, trace explorer, \"evaluate constant expression\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwayne%2Ftlacli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhwayne%2Ftlacli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhwayne%2Ftlacli/lists"}