{"id":25096560,"url":"https://github.com/jceb/semver-compare-cli","last_synced_at":"2025-04-02T02:14:13.447Z","repository":{"id":62421978,"uuid":"345154125","full_name":"jceb/semver-compare-cli","owner":"jceb","description":"CLI wrapper of the semver-compare library","archived":false,"fork":false,"pushed_at":"2021-06-03T12:57:10.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-30T02:33:45.526Z","etag":null,"topics":["cli","semver","semver-compare","semver-parser"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/semver-compare-cli","language":"JavaScript","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/jceb.png","metadata":{"files":{"readme":"README.md","changelog":null,"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":"2021-03-06T17:30:32.000Z","updated_at":"2024-06-01T22:52:00.000Z","dependencies_parsed_at":"2022-11-01T17:32:52.425Z","dependency_job_id":null,"html_url":"https://github.com/jceb/semver-compare-cli","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceb%2Fsemver-compare-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceb%2Fsemver-compare-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceb%2Fsemver-compare-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jceb%2Fsemver-compare-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jceb","download_url":"https://codeload.github.com/jceb/semver-compare-cli/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246741119,"owners_count":20826066,"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":["cli","semver","semver-compare","semver-parser"],"created_at":"2025-02-07T16:48:53.594Z","updated_at":"2025-04-02T02:14:13.429Z","avatar_url":"https://github.com/jceb.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# semver-compare-cli\n\n[![standard-readme compliant](https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n\nCLI wrapper of the semver-compare library\n\nCompare two semver version strings on the command line. The exit code is 0\n(equal), 1 (greater), or 2 (smaller). In addition, a predicate can be added\nthat's applied when comparing the two version.\n\nThe project is a wrapper around the\n[semver-compare](https://github.com/substack/semver-compare) library.\n\n## Table of Contents\n\n- [Install](#install)\n- [Usage](#usage)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Install\n\nInstall via npm:\n\n```\nyarn global add semver-compare-cli\n```\n\nor use [deno](https://deno.land) to run it without installation:\n\n```\ndeno run https://cdn.deno.land/semver_compare_cli/versions/v2.0.0/raw/semver-compare.js\n```\n\n## Usage\n\n### Direct comparison\n\nFor a direct comparison of two versions the following exit codes are possible:\n\n- `0` versions are equal\n- `1` the first version is larger than the second version\n- `2` the first version is smaller than the second version\n\nExample, exit code is `2` because the first version is smaller than the second\nversion:\n\n```\nsemver-compare 1.0.0 1.0.1\n```\n\n### Comparison with predicate\n\nFor a comparison with a predicate the following exit codes are possible:\n\n- `0` predicate applies to the comparison of the two version\n- `1` predicate doesn't apply\n\nThe following predicates are supported that shall be placed between the\ntwo version numbers:\n\n- `eq`: equal\n- `ge`: greater than or equal\n- `gt`: greater than\n- `le`: lower than or equal\n- `lt`: lower than\n\nExample, exit code is `1` because the first version is smaller than the second\nversion:\n\n```\nsemver-compare 1.0.0 ge 1.0.1\n```\n\n## Maintainers\n\n[@jceb](https://github.com/jceb)\n\n## Contributing\n\nPRs accepted.\n\nSmall note: If editing the README, please conform to the\n[standard-readme](https://github.com/RichardLitt/standard-readme) specification.\n\n## License\n\nMIT © 2021 Jan Christoph Ebersbach \u003cjceb@e-jc.de\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjceb%2Fsemver-compare-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjceb%2Fsemver-compare-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjceb%2Fsemver-compare-cli/lists"}