{"id":15024133,"url":"https://github.com/justintimperio/osinfo","last_synced_at":"2025-04-12T06:31:45.646Z","repository":{"id":53911337,"uuid":"344885268","full_name":"JustinTimperio/osinfo","owner":"JustinTimperio","description":"A Cross-Platform Module for Collecting OS Information in Golang","archived":false,"fork":false,"pushed_at":"2021-07-05T14:39:40.000Z","size":53,"stargazers_count":16,"open_issues_count":0,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-10T17:16:12.353Z","etag":null,"topics":["cross-platform","darwin","freebsd","go","golang","linux","openbsd","os-info","os-information","osinfo","osx","windows","windowserver"],"latest_commit_sha":null,"homepage":"","language":"Go","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/JustinTimperio.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-05T17:30:59.000Z","updated_at":"2025-02-17T17:10:43.000Z","dependencies_parsed_at":"2022-08-13T04:01:17.038Z","dependency_job_id":null,"html_url":"https://github.com/JustinTimperio/osinfo","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fosinfo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fosinfo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fosinfo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JustinTimperio%2Fosinfo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JustinTimperio","download_url":"https://codeload.github.com/JustinTimperio/osinfo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248529712,"owners_count":21119565,"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":["cross-platform","darwin","freebsd","go","golang","linux","openbsd","os-info","os-information","osinfo","osx","windows","windowserver"],"created_at":"2024-09-24T19:59:50.529Z","updated_at":"2025-04-12T06:31:45.283Z","avatar_url":"https://github.com/JustinTimperio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# osinfo\n\n![GitHub](https://img.shields.io/github/license/JustinTimperio/osinfo)\n[![Go Reference](https://pkg.go.dev/badge/github.com/JustinTimperio/osinfo.svg)](https://pkg.go.dev/github.com/JustinTimperio/osinfo)\n[![Go Report Card](https://goreportcard.com/badge/github.com/JustinTimperio/osinfo)](https://goreportcard.com/report/github.com/JustinTimperio/osinfo)\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/180976560a9b46678d9d67053c0d7fc9)](https://www.codacy.com/gh/JustinTimperio/osinfo/dashboard?utm_source=github.com\u0026amp;utm_medium=referral\u0026amp;utm_content=JustinTimperio/osinfo\u0026amp;utm_campaign=Badge_Grade)\n\n## What is osinfo?\nOSinfo is a cross-platform OS Version collection tool. It is designed to unify multiple OS detection methods in a single module that can easily be integrated into other projects. \n\n### Officially Supported:\n\n| Windows             | MacOS                 | Linux               | BSD     |\n|---------------------|-----------------------|---------------------|---------|\n| Windows Server 2012 | 10.6  - Snow Leopard  | Ubuntu              | FreeBSD | \n| Windows Server 2016 | 10.7  - Lion          | Debian              | OpenBSD | \n| Windows Server 2019 | 10.8  - Mountain Lion | MXLinux             |         | \n| Windows 7           | 10.9  - Mavericks     | Mint                |         | \n| Windows 8           | 10.10 - Yosemite      | Kali                |         | \n| Windows 10          | 10.11 - El Capitan    | ParrotOS            |         |\n|                     | 10.12 - Sierra        | OpenSUSE Leap       |         | \n|                     | 10.13 - High Sierra   | OpenSUSE TumbleWeed |         |\n|                     | 10.14 - Mojave        | OpenSUSE SLES       |         |\n|                     | 10.15 - Catalina      | Arch                |         |\n|                     | 11.0  - Big Sur       | Manjaro             |         |\n|                     |                       | Alpine              |         |\n|                     |                       | Fedora              |         |\n|                     |                       | RHEL                |         |\n|                     |                       | CentOS              |         |\n|                     |                       | Oracle              |         |\n\n\n## Example Usage\n 1. Create `fetchinfo.go`\n```go\n   package main\n\n   import (\n      \"fmt\"\n\n      \"github.com/JustinTimperio/osinfo\"\n   )\n\n   func main() {\n\t\trelease := osinfo.GetVersion()\n\t\tfmt.Printf(release.String())\n\t }\n```\n 2. `go mod init`\n 3. `go mod tidy`\n 4. `go run fetchinfo.go`\n\n## Example Outputs\n```sh\n--------------------\n\nRuntime: linux\nArchitecture: amd64\nOS Name: Arch Linux\nVersion: rolling\nKernel: 5.11.2-arch1-1\nDistro: arch\nPackage Manager: pacman\n\n--------------------\n\nRuntime: linux\nArchitecture: amd64\nOS Name: Debian GNU/Linux 10 (buster)\nVersion: 10\nKernel: 4.19.0-13-amd64\nDistro: debian\nPackage Manager: apt\n\n--------------------\n\nRuntime: windows\nArchitecture: amd64\nOS Name: Windows Server 2016 Standard Evaluation\nVersion: 10\nBuild: 14393\n\n--------------------\n\nRuntime: darwin\nArchitecture: amd64\nOS Name: Mac OS X\nVersion: 11.0.1\nVersion Name: MacOS - Big Sur \n\n--------------------\n\nRuntime: freebsd\nArchitecture: amd64\nOS Name: FreeBSD 12.1-RELEASE\nVersion: 12.1-RELEASE\nKernel: 1201000\nPackage Manger: pkg\n\n--------------------\n\nRuntime: openbsd \nArchitecture: amd64\nOS Name: OpenBSD 6.7 \nVersion: 6.7 \nKernel: GENERIC.MP#182 \nPackage Manger: pkg_add\n\n--------------------\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustintimperio%2Fosinfo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustintimperio%2Fosinfo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustintimperio%2Fosinfo/lists"}