{"id":695,"url":"https://github.com/retrohacker/getos","last_synced_at":"2025-04-12T18:53:21.483Z","repository":{"id":48897648,"uuid":"21311458","full_name":"retrohacker/getos","owner":"retrohacker","description":"A Node.js module that returns the OS/Distribution name of the environment you are working on","archived":false,"fork":false,"pushed_at":"2023-01-06T17:31:25.000Z","size":125,"stargazers_count":79,"open_issues_count":5,"forks_count":26,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-04-11T09:03:36.389Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/retrohacker.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":"2014-06-28T21:34:21.000Z","updated_at":"2024-12-01T12:51:28.000Z","dependencies_parsed_at":"2023-02-06T07:16:11.266Z","dependency_job_id":null,"html_url":"https://github.com/retrohacker/getos","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/retrohacker%2Fgetos","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrohacker%2Fgetos/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrohacker%2Fgetos/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/retrohacker%2Fgetos/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/retrohacker","download_url":"https://codeload.github.com/retrohacker/getos/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248618244,"owners_count":21134200,"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":[],"created_at":"2024-01-05T20:15:29.041Z","updated_at":"2025-04-12T18:53:21.463Z","avatar_url":"https://github.com/retrohacker.png","language":"JavaScript","readme":"# getos\n\n[![Greenkeeper badge](https://badges.greenkeeper.io/retrohacker/getos.svg)](https://greenkeeper.io/)\n\n![getos](./imgs/logo.png)\n\n[![Build Status](https://travis-ci.org/retrohacker/getos.png?branch=master)](https://travis-ci.org/retrohacker/getos) ![](https://img.shields.io/github/issues/retrohacker/getos.svg) ![](https://img.shields.io/npm/dm/getos.svg) ![](https://img.shields.io/npm/v/getos.svg) ![](https://img.shields.io/npm/l/getos.svg)  ![](https://img.shields.io/twitter/url/https/github.com/retrohacker/getos.svg?style=social)\n\n[![NPM](https://nodei.co/npm/getos.png?downloads=true\u0026downloadRank=true\u0026stars=true)](https://nodei.co/npm/getos/)[![NPM](https://nodei.co/npm-dl/getos.png?months=9\u0026height=3)](https://nodei.co/npm/getos/)\n\n[![JavaScript Style Guide](https://cdn.rawgit.com/feross/standard/master/badge.svg)](https://github.com/feross/standard)\n\n\nGet the OS/Distribution name of the environment you are working on\n\n## Problem\n\n`os.platform()` returns `linux`. If you want the distrubtion name, you're out of luck.\n\n## Solution\n\nThis. Simply call:\n\n```js\nvar getos = require('getos')\n\ngetos(function(e,os) {\n  if(e) return console.log(e)\n  console.log(\"Your OS is:\" +JSON.stringify(os))\n})\n```\n\nThe `os` object conforms to:\n\n```js\n{\n  os: [OS NAME],\n  dist:[DIST NAME],\n  codename:[CODENAME],\n  release:[VERSION]\n}\n```\n\nFor example:\n\n```js\n{\n  os: \"linux\",\n  dist: \"Ubuntu\",\n  codename: \"precise\",\n  release: \"12.04\"\n}\n```\n\n## Disclaimer\nCheck `os.json` in this repo. Any distribution that *shares* a common resource file with another distrubtion is currently untested. These are the arrays of distrubitons with more than 1 member. If you are using one of these distrubtions, please submit an issue letting me know if it works. If it fails, please post the content of the file.\n\nIf you have a distrubtion *not* in `os.json`, please identify your resource file and submit it's name and content along with your distrbution/version in an issue.\n\nThanks for helping make this tool great.\n\n## Unit Tests\n\nUnit tests stub out the behaviour of the OS files and libraries we depend on to ensure the behaviour of the application is sound. You can run these simply by running `npm test`\n\n## Authors and Contributors\n\ngetos has been made possible by these fantastic contributors:\n\n\u003ctable\u003e\u003ctbody\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eBenjamin E. Coe\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/bcoe\"\u003eGitHub/bcoe\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/benjamincoe\"\u003eTwitter/@benjamincoe\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eEugene Sharygin\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/eush77\"\u003eGitHub/eush77\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/eush77\"\u003eTwitter/@eush77\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eDavid Routhieau\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/root-io\"\u003eGitHub/root-io\u003c/a\u003e\u003c/td\u003e\u003ctd\u003eunknown\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eLawrence\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/mindmelting\"\u003eGitHub/mindmelting\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/mindmelting\"\u003eTwitter/@mindmelting\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eRoman Jurkov\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/winfinit\"\u003eGitHub/winfinit\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/winfinit\"\u003eTwitter/@winfinit\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eRod Vagg\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/rvagg\"\u003eGitHub/rvagg\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/rvagg\"\u003eTwitter/@rvagg\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eZeke Sikelianos\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/zeke\"\u003eGitHub/zeke\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/zeke\"\u003eTwitter/@zeke\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003ctr\u003e\u003cth align=\"left\"\u003eAlexander\u003c/th\u003e\u003ctd\u003e\u003ca href=\"https://github.com/alex4Zero\"\u003eGitHub/alex4Zero\u003c/a\u003e\u003c/td\u003e\u003ctd\u003e\u003ca href=\"http://twitter.com/alex4Zero\"\u003eTwitter/@alex4Zero\u003c/a\u003e\u003c/td\u003e\u003c/tr\u003e\n\u003c/tbody\u003e\u003c/table\u003e\n","funding_links":[],"categories":["Repository","Libraries"],"sub_categories":["OS Identification","OS identification"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretrohacker%2Fgetos","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fretrohacker%2Fgetos","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fretrohacker%2Fgetos/lists"}