{"id":17685753,"url":"https://github.com/neved4/sw_name","last_synced_at":"2025-10-29T07:48:09.927Z","repository":{"id":206086428,"uuid":"715798320","full_name":"Neved4/sw_name","owner":"Neved4","description":"  Print macOS friendly names!","archived":false,"fork":false,"pushed_at":"2025-01-13T14:59:43.000Z","size":83,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-02T13:46:21.979Z","etag":null,"topics":["big-sur","cli","command","info","line","macos","monterey","sonoma","sw-vers","sysinfo","system","terminal","tool","ventura"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/Neved4.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-11-07T21:19:08.000Z","updated_at":"2025-01-13T14:59:47.000Z","dependencies_parsed_at":"2024-10-24T13:05:57.945Z","dependency_job_id":"de59470a-3d1b-4990-a94c-c28eb47735c1","html_url":"https://github.com/Neved4/sw_name","commit_stats":{"total_commits":59,"total_committers":2,"mean_commits":29.5,"dds":0.0847457627118644,"last_synced_commit":"ae6b7f0804452b5aacc0cccb55aae7dbcc717869"},"previous_names":["neved4/sw_name"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/Neved4/sw_name","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fsw_name","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fsw_name/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fsw_name/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fsw_name/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Neved4","download_url":"https://codeload.github.com/Neved4/sw_name/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Neved4%2Fsw_name/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268682651,"owners_count":24289675,"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","status":"online","status_checked_at":"2025-08-04T02:00:09.867Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["big-sur","cli","command","info","line","macos","monterey","sonoma","sw-vers","sysinfo","system","terminal","tool","ventura"],"created_at":"2024-10-24T10:28:55.925Z","updated_at":"2025-10-29T07:48:04.894Z","avatar_url":"https://github.com/Neved4.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Shell Script](https://img.shields.io/badge/Shell_Script-9DDE66?logo=gnubash\u0026logoColor=000\u0026style=flat)\n![macOS](https://img.shields.io/badge/macOS-000000?logo=apple\u0026logoColor=fff\u0026?style=flat)\n\n## `sw_name` - print macOS friendly names! 🚀\n\nDrop-in replacement for `sw_vers` that simplifies retrieving friendly names\nin macOS (`Ventura`, `Sonoma`).\n\n## Motivation\n\nCurrently, neither `uname -a`, `sysctl`, `system_profiler` or `sw_vers`\nprovide this information.\n\n## Highlights\n\n- 🚀 _**Fast**_ – minimal overhead, [`sw_name -releaseName`] function\n  executes in `~ 5.7 ms`, of `~ 27 ms` total.[^1]\n- 🔒 _**Robust**_ – accurate output through tests, robust regular expressions\n  and parsing.\n- 📦 _**Lightweight**_ – self-contained, zero dependencies, uses POSIX `awk`,\n  `sh` (`1245 bytes`, `65 lines`).\n\n## Getting Started\n\n\u003e [!NOTE]\n\u003e _This utility is only intended to work from [OS X](macOS) 10.9 to [macOS]\n\u003e 14.0._\n\nInstall it with:\n```sh\n$ brew install Neved4/tap/sw_name\n```\n\n### Usage\n\n`sw_name` can be invoked in the following ways:\n```sh\nsw_name\nsw_name -releaseName\nsw_name -productName\nsw_name -productVersion\nsw_name -productVersionExtra\nsw_name -buildVersion\n```\n\nThe following options are available:\n```\nusage: sw_name [options]\n\nOptions:\n    -R, -releaseName, --releaseName\n        Prints release name (e.g.: Sonoma, Ventura, Monterey).\n    \n    -n, -productName, --productName\n        Prints product name (e.g.: macOS, Mac OS X).\n    \n    -v, -productVersion, --productVersion\n        Prints product version (e.g.: 12.1, 14.0).\n    \n    -E, -productVersionExtra, --productVersionExtra\n        Prints info specific to certain releases (e.g: (a)).\n    \n    -b, -buildVersion, --buildVersion\n        Prints the build version (e.g.: 23B81, 21A559).\n\nEnvironment:\n    DARWIN_LICENSE\n        Specifies the path to a custom license file.\n\n        Example: DARWIN_LICENSE=path/to/license sw_name\n```\n\n### Setup\n\nClone the repository:\n```sh\ngit clone https://github.com/Neved4/sw_vers\n```\n\nAdd the following to your shell profile (e.g. `.bash_profile`, `.zprofile`,\n`.profile`):\n```sh\nalias sw_vers='/path/to/sw_vers_name.sh'\n```\n\nThen simply execute it:\n```console\n$ sw_vers\nReleaseName:    Sonoma\nProductName:    macOS\nProductVersion: 14.5\nBuildVersion:   23F79\n```\n\nThen you can use `sw_vers` normally, with a new `-releaseName` flag to\naccess macOS friendly names.\n\n***\n\nAlternatively, if you prefer a concise function, you can add this to your\nshell profile:\n```sh\nsw_name() {\n    awk '/SOFTWARE LICENSE AGREEMENT FOR/ {\n        gsub(/.*(macOS|OS X) |\\\\|.*$0 /, \"\")\n        print\n    }' '/System/Library/CoreServices/Setup Assistant.app/Contents/Resources/en.lproj/OSXSoftwareLicense.rtf'\n}\n```\n\nAnd then call the new command:\n```console\n$ sw_name\nSonoma\n```\n\n## Compatibility\n\n### Supported macOS Versions\n\n| Version           | Supported |\n| :---------------- | :-------- |\n| **`macOS 14`**    | Yes ✅     |\n| **`macOS 13`**    | Yes ✅     |\n| **`macOS 12`**    | Yes ✅     |\n| **`macOS 11`**    | Yes ✅     |\n| **`macOS 10.15`** | Yes ✅     |\n| **`macOS 10.14`** | Yes ✅     |\n| **`macOS 10.13`** | Yes ✅     |\n| **`macOS 10.12`** | Yes ✅     |\n| **`OS X 10.11`**  | Yes ✅     |\n| **`OS X 10.10`**  | Yes ✅     |\n| **`OS X 10.9`**   | Yes ✅     |\n\n\u003cdetails closed\u003e\n  \u003csummary\u003e\u003cb\u003eSupported shells\u003c/b\u003e\u003c/summary\u003e\n\n`sw_name` uses [macOS]'s `/bin/sh` by default, but you can run it with\nother POSIX shells too:\n```sh\ndash /path/to/sw_name.sh\n```\n\n#### Supported shells\n\n|     Shell | Version       | Supported |\n| --------: | :------------ | :-------- |\n|  [`bash`] | `5.2.15`      | ✅ Yes     |\n|  [`dash`] | `0.5.12`      | ✅ Yes     |\n| [`ksh93`] | `93u+m/1.0.7` | ✅ Yes     |\n|  [`mksh`] | `59c`         | ✅ Yes     |\n|  [`oksh`] | `7.3`         | ✅ Yes     |\n|   [`osh`] | `0.18.0`      | ✅ Yes     |\n|  [`posh`] | `0.14.1`      | ❌ No      |\n|  [`yash`] | `2.55`        | ✅ Yes     |\n|   [`zsh`] | `5.9`         | ✅ Yes      |\n\n\u003c/details\u003e\n\n## Acknowledgments\n\nThanks to [@0risc] for testing legacy OS X versions.\n\n## License\n\n`sw_name` is licensed under the terms of the [MIT License].\n\nSee the [LICENSE](LICENSE) file for details.\n\n[^1]: _cfr._ `4.9 ms` for `sw_vers -productName`, tested with [`hyperfine`].\n\n[`sw_name -releaseName`]: https://github.com/Neved4/sw_name/blob/main/src/sw_name.sh#L21-L29\n[`hyperfine`]:https://github.com/sharkdp/hyperfine\n[macOS]: https://www.apple.com/macos/\n[@0risc]: https://github.com/0risc\n[MIT License]: https://opensource.org/license/mit/\n\n[`bash`]: https://git.savannah.gnu.org/cgit/bash.git/\n[`dash`]: https://git.kernel.org/pub/scm/utils/dash/dash.git\n[`ksh93`]: https://github.com/ksh93/ksh\n[`mksh`]: https://github.com/MirBSD/mksh\n[`osh`]: https://www.oilshell.org/cross-ref.html?tag=OSH#OSH\n[`oksh`]: https://github.com/ibara/oksh\n[`posh`]: https://salsa.debian.org/clint/posh\n[`yash`]: https://github.com/magicant/yash\n[`zsh`]: https://github.com/zsh-users/zsh\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneved4%2Fsw_name","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneved4%2Fsw_name","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneved4%2Fsw_name/lists"}