{"id":15394250,"url":"https://github.com/xyproto/distrodetector","last_synced_at":"2025-08-20T12:33:29.325Z","repository":{"id":57497425,"uuid":"156223794","full_name":"xyproto/distrodetector","owner":"xyproto","description":":card_index: Detect which Linux distro, macOS or BSD version a system is running.","archived":false,"fork":false,"pushed_at":"2023-12-04T15:41:49.000Z","size":64,"stargazers_count":21,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-10T01:04:59.480Z","etag":null,"topics":["bsd","detection","linux","macos","python-distro","system"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xyproto.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}},"created_at":"2018-11-05T13:39:35.000Z","updated_at":"2025-04-18T11:50:05.000Z","dependencies_parsed_at":"2023-12-04T16:54:25.215Z","dependency_job_id":null,"html_url":"https://github.com/xyproto/distrodetector","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/xyproto/distrodetector","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fdistrodetector","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fdistrodetector/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fdistrodetector/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fdistrodetector/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xyproto","download_url":"https://codeload.github.com/xyproto/distrodetector/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xyproto%2Fdistrodetector/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264605290,"owners_count":23636051,"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":["bsd","detection","linux","macos","python-distro","system"],"created_at":"2024-10-01T15:22:46.878Z","updated_at":"2025-07-10T16:12:26.657Z","avatar_url":"https://github.com/xyproto.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# distrodetector\n\n[![GoDoc](https://godoc.org/github.com/xyproto/distrodetector?status.svg)](http://godoc.org/github.com/xyproto/distrodetector) [![License](http://img.shields.io/badge/license-BSD-green.svg?style=flat)](https://raw.githubusercontent.com/xyproto/distrodetector/master/LICENSE) [![Go Report Card](https://goreportcard.com/badge/github.com/xyproto/distrodetector)](https://goreportcard.com/report/github.com/xyproto/distrodetector)\n\nDetects which Linux distro or BSD a system is running.\n\nThis is also a drop-in replacement for the `distro` command that comes with `python-distro`.\n\nAims to detect:\n\n* The 100 most popular Linux distros and BSDs, according to distrowatch\n* macOS\n\nThe `distro` utility and the `distrodetector` package has no external dependencies.\n\nPull requests for additional systems are welcome!\n\n## Installation of the distro utility\n\nInstallation of the development version of the `distro` utility:\n\n    go install github.com/xyproto/distrodetector/cmd/distro@latest\n\nExample use:\n\n    distro\n\n## Use of the Go package\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"github.com/xyproto/distrodetector\"\n)\n\nfunc main() {\n    distro := distrodetector.New()\n    fmt.Println(distro.Name())\n}\n```\n## Example output\n\nThe parts can be retrieved separately with `.Platform()`, `.Name()`, `.Codename()` and `.Version()`. A combined string can be returned with the `.String()` function:\n\n    Linux (Arch Linux)\n    Linux (Ubuntu Bionic 18.04)\n    macOS (High Sierra 10.13.3)\n    Linux (Void Linux)\n\n## Testing\n\n* More testing is always needed when detecting Linux distros and BSDs.\n* Please test the distro detection on your distro/BSD and submit an issue or pull request if it should fail.\n\n## General Info\n\n* License: BSD-3\n* Version: 1.3.1\n* Author: Alexander F. Rødseth \u0026lt;xyproto@archlinux.org\u0026gt;\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fdistrodetector","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxyproto%2Fdistrodetector","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxyproto%2Fdistrodetector/lists"}