{"id":21651587,"url":"https://github.com/vithalreddy/cloud-detect-js","last_synced_at":"2025-04-11T20:24:01.289Z","repository":{"id":57200664,"uuid":"204926188","full_name":"vithalreddy/cloud-detect-js","owner":"vithalreddy","description":"Determine Host's cloud provider with a  single command","archived":false,"fork":false,"pushed_at":"2020-07-13T22:30:04.000Z","size":28,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T16:22:15.505Z","etag":null,"topics":["alibabacloud","aws","azure","digitalocean","gcp","nodejs","oracle-cloud","typescript"],"latest_commit_sha":null,"homepage":"https://github.com/vithalreddy/cloud-detect-js#usage-1","language":"TypeScript","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/vithalreddy.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-08-28T12:26:28.000Z","updated_at":"2023-11-14T05:18:17.000Z","dependencies_parsed_at":"2022-09-16T15:10:50.859Z","dependency_job_id":null,"html_url":"https://github.com/vithalreddy/cloud-detect-js","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vithalreddy%2Fcloud-detect-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vithalreddy%2Fcloud-detect-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vithalreddy%2Fcloud-detect-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vithalreddy%2Fcloud-detect-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vithalreddy","download_url":"https://codeload.github.com/vithalreddy/cloud-detect-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248473798,"owners_count":21109776,"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":["alibabacloud","aws","azure","digitalocean","gcp","nodejs","oracle-cloud","typescript"],"created_at":"2024-11-25T07:48:48.905Z","updated_at":"2025-04-11T20:24:01.233Z","avatar_url":"https://github.com/vithalreddy.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cloud-detect-js\n\n![License](https://img.shields.io/npm/l/cloud-detect-js?style=for-the-badge)\n![Version](https://img.shields.io/npm/v/cloud-detect-js?style=for-the-badge)\n![Dependencies](https://img.shields.io/david/vithalreddy/cloud-detect-js?style=for-the-badge)\n![Issues](https://img.shields.io/github/issues/vithalreddy/cloud-detect-js?style=for-the-badge)\n![Size](https://img.shields.io/bundlephobia/minzip/cloud-detect-js?style=for-the-badge)\n![Node](https://img.shields.io/node/v/cloud-detect-js?style=for-the-badge)\n\n`cloud-detect-js` is a Node.JS module that determines a host's cloud provider. Highly inspired by the Go based [Satellite](https://github.com/banzaicloud/satellite), `cloud-detect-js` uses the same techniques (file systems and provider metadata) to properly identify cloud providers. Currently Supports AWS, GCP, Azure, Alibaba, Oracle, and Digital Ocean Cloud Providers.\n\n## Installation\n\nVia NPM:\n\n```bash\nnpm install --save cloud-detect-js\n```\n\nVia Yarn:\n\n```bash\nyarn add cloud-detect-js\n```\n\n## Usage\n\n```javascript\nconst { cloudProvider } = require('cloud-detect-js');\n\n(async () =\u003e {\n  await cloudProvider();\n  // wil return one of  'aws', 'gcp', 'azure', 'oracle', 'alibaba', 'do' or 'unknown'\n\n  await cloudProvider();\n  // 'gcp'\n\n  await cloudProvider(['aws', 'oracle']); //excluded\n  // 'unknown'\n})();\n```\n\n## CLI Usage\n\n## Installation\n\nVia NPM:\n\n```bash\nnpm install -g cloud-detect-js\n```\n\nVia Yarn:\n\n```bash\nyarn add global cloud-detect-js\n```\n\n## Usage\n\n```bash\nUsage: cloud-detect-js [options] [command]\n\nOptions:\n  -V, --version  output the version number\n  -h, --help     output usage information\n\nCommands:\n  detect|d       Detect's Host Machine's Cloud Provider\n\ncloud-detect-js d\n# aws\n\ncloud-detect-js detect\n# gcp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvithalreddy%2Fcloud-detect-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvithalreddy%2Fcloud-detect-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvithalreddy%2Fcloud-detect-js/lists"}