https://github.com/vithalreddy/cloud-detect-js
Determine Host's cloud provider with a single command
https://github.com/vithalreddy/cloud-detect-js
alibabacloud aws azure digitalocean gcp nodejs oracle-cloud typescript
Last synced: 3 months ago
JSON representation
Determine Host's cloud provider with a single command
- Host: GitHub
- URL: https://github.com/vithalreddy/cloud-detect-js
- Owner: vithalreddy
- License: mit
- Created: 2019-08-28T12:26:28.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2020-07-13T22:30:04.000Z (almost 5 years ago)
- Last Synced: 2025-03-25T16:22:15.505Z (4 months ago)
- Topics: alibabacloud, aws, azure, digitalocean, gcp, nodejs, oracle-cloud, typescript
- Language: TypeScript
- Homepage: https://github.com/vithalreddy/cloud-detect-js#usage-1
- Size: 27.3 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# cloud-detect-js





`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.
## Installation
Via NPM:
```bash
npm install --save cloud-detect-js
```Via Yarn:
```bash
yarn add cloud-detect-js
```## Usage
```javascript
const { cloudProvider } = require('cloud-detect-js');(async () => {
await cloudProvider();
// wil return one of 'aws', 'gcp', 'azure', 'oracle', 'alibaba', 'do' or 'unknown'await cloudProvider();
// 'gcp'await cloudProvider(['aws', 'oracle']); //excluded
// 'unknown'
})();
```## CLI Usage
## Installation
Via NPM:
```bash
npm install -g cloud-detect-js
```Via Yarn:
```bash
yarn add global cloud-detect-js
```## Usage
```bash
Usage: cloud-detect-js [options] [command]Options:
-V, --version output the version number
-h, --help output usage informationCommands:
detect|d Detect's Host Machine's Cloud Providercloud-detect-js d
# awscloud-detect-js detect
# gcp
```