{"id":23462578,"url":"https://github.com/nikhil-prabhu/clouddetect","last_synced_at":"2026-05-01T08:32:11.755Z","repository":{"id":268440619,"uuid":"904297328","full_name":"nikhil-prabhu/clouddetect","owner":"nikhil-prabhu","description":"A Go library to detect the cloud service provider of a host.","archived":false,"fork":false,"pushed_at":"2025-10-21T19:51:07.000Z","size":143,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-21T21:29:04.934Z","etag":null,"topics":["alibaba-cloud","aws","azure","cloud","detection","devops","gcp","go","golang","hyperscalers","metadata","multcloud","oracle-cloud","vultr"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/nikhil-prabhu/clouddetect/v2","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nikhil-prabhu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING.GPL","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-12-16T16:07:37.000Z","updated_at":"2025-10-21T19:51:05.000Z","dependencies_parsed_at":"2024-12-16T19:57:56.393Z","dependency_job_id":"dd2c9acb-2515-48b3-b2ec-fd1dfd3a711f","html_url":"https://github.com/nikhil-prabhu/clouddetect","commit_stats":null,"previous_names":["nikhil-prabhu/clouddetect"],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nikhil-prabhu/clouddetect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-prabhu%2Fclouddetect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-prabhu%2Fclouddetect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-prabhu%2Fclouddetect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-prabhu%2Fclouddetect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nikhil-prabhu","download_url":"https://codeload.github.com/nikhil-prabhu/clouddetect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nikhil-prabhu%2Fclouddetect/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32490810,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"online","status_checked_at":"2026-05-01T02:00:05.856Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["alibaba-cloud","aws","azure","cloud","detection","devops","gcp","go","golang","hyperscalers","metadata","multcloud","oracle-cloud","vultr"],"created_at":"2024-12-24T08:18:14.932Z","updated_at":"2026-05-01T08:32:11.749Z","avatar_url":"https://github.com/nikhil-prabhu.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# clouddetect\n\n![maintenance-status](https://img.shields.io/badge/maintenance-actively--developed-brightgreen.svg)\n[![Go Reference](https://pkg.go.dev/badge/github.com/nikhil-prabhu/clouddetect.svg)](https://pkg.go.dev/github.com/nikhil-prabhu/clouddetect)\n[![License: GPL v3](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/license/mit)\n[![CI](https://github.com/nikhil-prabhu/clouddetect/actions/workflows/ci.yml/badge.svg)](https://github.com/nikhil-prabhu/clouddetect/actions)\n[![CD](https://github.com/nikhil-prabhu/clouddetect/actions/workflows/cd.yml/badge.svg)](https://github.com/nikhil-prabhu/clouddetect/actions)\n[![Go Report Card](https://goreportcard.com/badge/github.com/nikhil-prabhu/clouddetect)](https://goreportcard.com/report/github.com/nikhil-prabhu/clouddetect)\n\nA Go library to detect the cloud service provider of a host.\n\nThis library is the Go version of my Rust crate\n[cloud-detect](https://github.com/nikhil-prabhu/cloud-detect), which in itself is\ninspired by the Python-based\n[cloud-detect](https://github.com/dgzlopes/cloud-detect) and the Go-based\n[satellite](https://github.com/banzaicloud/satellite) modules.\n\nLike these modules, `clouddetect` uses a combination of checking vendor files\nand metadata endpoints to accurately determine the cloud provider of a host.\n\n_While this library is structured similarly to the Rust crate, it follows Go\nconventions and idioms and is not a direct port._\n\n## Features\n\n- Currently, this module supports the identification of the following providers:\n  - Akamai Cloud (`akamai`)\n  - Amazon Web Services (`aws`)\n  - Microsoft Azure (`azure`)\n  - Google Cloud Platform (`gcp`)\n  - Alibaba Cloud (`alibaba`)\n  - OpenStack (`openstack`)\n  - DigitalOcean (`digitalocean`)\n  - Oracle Cloud Infrastructure (`oci`)\n  - Vultr (`vultr`)\n- Fast, simple and extensible.\n- Real-time console logging using the\n  [`zap`](https://pkg.go.dev/go.uber.org/zap) module.\n\n## Usage\n\nAdd the library to your project by running:\n\n```bash\ngo get github.com/nikhil-prabhu/clouddetect/v2@latest\n```\n\nDetect the cloud provider and print the result (with default timeout).\n\n```go\npackage main\n\nimport (\n \"fmt\"\n\n \"github.com/nikhil-prabhu/clouddetect/v2\"\n)\n\nfunc main() {\n provider := clouddetect.Detect()\n\n // When tested on AWS:\n fmt.Println(provider) // \"aws\"\n\n // When tested on local/non-supported cloud environment:\n fmt.Println(provider) // \"unknown\"\n}\n```\n\nDetect the cloud provider and print the result (with custom timeout and logging).\n\n```go\npackage main\n\nimport (\n \"fmt\"\n \"time\"\n\n \"github.com/nikhil-prabhu/clouddetect/v2\"\n \"go.uber.org/zap\"\n)\n\nfunc main() {\n // Use zap.NewDevelopment() for development mode\n logger := zap.Must(zap.NewProduction())\n defer logger.Sync()\n\n provider := clouddetect.Detect(\n  clouddetect.WithTimeout(10 * time.Second),\n  clouddetect.WithLogger(logger),\n )\n\n // When tested on AWS:\n fmt.Println(provider) // \"aws\"\n\n // When tested on local/non-supported cloud environment:\n fmt.Println(provider) // \"unknown\"\n}\n```\n\nYou can also check the list of currently supported cloud providers.\n\n```go\npackage main\n\nimport (\n \"fmt\"\n\n \"github.com/nikhil-prabhu/clouddetect/v2\"\n)\n\nfunc main() {\n fmt.Println(clouddetect.SupportedProviders)\n}\n```\n\nFor more detailed documentation, please refer to\nthe [Module Documentation](https://pkg.go.dev/github.com/nikhil-prabhu/clouddetect).\n\n## Contributing\n\nContributions are welcome and greatly appreciated! If you’d like to contribute\nto clouddetect, here’s how you can help.\n\n### 1. Report Issues\n\nIf you encounter a bug, unexpected behavior, or have a feature request, please open\nan [issue](https://github.com/nikhil-prabhu/clouddetect/issues/new).\nBe sure to include:\n\n- A clear description of the issue.\n- Steps to reproduce, if applicable.\n- Details about your environment.\n\n### 2. Submit Pull Requests\n\nIf you're submitting a\n[pull request](https://github.com/nikhil-prabhu/clouddetect/compare), please\nensure the following.\n\n- Your code is formatted using `go fmt`\n\n```bash\ngo fmt ./...\n```\n\n- Code lints pass with (use `--fix` to autofix):\n\n```bash\ngolangci-lint run -v --fix\n```\n\n**NOTE**: To install `golangci-lint`, follow the steps outlined\n[on this page](https://golangci-lint.run/welcome/install/#local-installation)\n\n- Your code contains sufficient unit tests and that all tests pass.\n\n```bash\ngo test ./...\n```\n\n### 3. Improve Documentation\n\nIf you find areas in the documentation that are unclear or incomplete, feel free\nto update the README or module-level documentation. Open a\n[pull request](https://github.com/nikhil-prabhu/clouddetect/compare) with your improvements.\n\n### 4. Review Pull Requests\n\nYou can also contribute by reviewing\n[open pull requests](https://github.com/nikhil-prabhu/clouddetect/pulls?q=is%3Aopen+is%3Apr).\nProviding constructive feedback helps maintain a high-quality codebase.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhil-prabhu%2Fclouddetect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnikhil-prabhu%2Fclouddetect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnikhil-prabhu%2Fclouddetect/lists"}