{"id":37104770,"url":"https://github.com/vsco/chef-golang","last_synced_at":"2026-01-14T12:39:19.281Z","repository":{"id":57593819,"uuid":"54918398","full_name":"vsco/chef-golang","owner":"vsco","description":"Go library to interact with the Chef server API","archived":false,"fork":true,"pushed_at":"2016-02-11T21:31:19.000Z","size":490,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-06-20T17:54:20.197Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":"abhiyerra/chef-golang","license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vsco.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":"2016-03-28T19:37:06.000Z","updated_at":"2024-06-20T17:54:20.198Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/vsco/chef-golang","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/vsco/chef-golang","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsco%2Fchef-golang","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsco%2Fchef-golang/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsco%2Fchef-golang/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsco%2Fchef-golang/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vsco","download_url":"https://codeload.github.com/vsco/chef-golang/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vsco%2Fchef-golang/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28420814,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T10:47:48.104Z","status":"ssl_error","status_checked_at":"2026-01-14T10:46:19.031Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":[],"created_at":"2026-01-14T12:39:18.747Z","updated_at":"2026-01-14T12:39:19.271Z","avatar_url":"https://github.com/vsco.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"chef-golang [![Build Status](https://drone.io/github.com/marpaia/chef-golang/status.png)](https://drone.io/github.com/marpaia/chef-golang/latest)\n===========\nThis is a Go API client for Opscode's Chef.\n\n## Installation\n\nUse `go get` to install chef-golang:\n```\ngo get github.com/marpaia/chef-golang\n```\n\n## Unit tests\nThere is a helper script in `test/support/start_server.sh` that will setup a goiardi server primed\nwith unit-testing data. there is also an example knife config and a script named `test/support/chef_config.sh`.\n\nIf you don't have a local `~/.chef/knife.rb` you can simply run these 3 commands:\n```\n./test/support/start_server.sh\n./test/support/chef_config.sh\ngo test -v\n```\nto shutdown the server run `test/support/stop_server.sh`\n\nThe [goiardi](https://github.com/ctdk/goiardi) Server is listening on port `8443` and the keys and config are copied to /tmp/goiardi. If you want to setup your own `knife.rb` and not use the provided one.\n\n## External dependencies\n\nThis project has no external dependencies other than the Go standard library.\n\n## Documentation\n\nLike most every other Golang project, this projects documentation can be found\non godoc at [godoc.org/github.com/marpaia/chef-golang](http://godoc.org/github.com/marpaia/chef-golang).\n\n## Examples\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"os\"\n\n    \"github.com/marpaia/chef-golang\"\n)\n\nvar findNode = \"neo4j.example.org\"\nvar findCookbook = \"neo4j\"\nvar findRole = \"Neo4j\"\n\nfunc main() {\n    c, err := chef.Connect()\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        os.Exit(1)\n    }\n    c.SSLNoVerify = true\n\n    // Print detailed information about a specific node\n    node, ok, err := c.GetNode(findNode)\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        os.Exit(1)\n    }\n    if !ok {\n        fmt.Println(\"\\nCouldn't find that node!\")\n    } else {\n        for i := 0; i \u003c 80; i++ {\n            fmt.Print(\"=\")\n        }\n\n        fmt.Println(\"\\nSystem info:\", node.Name, \"\\n\")\n        fmt.Println(\"  [+] IP Address:\", node.Info.IPAddress)\n        fmt.Println(\"  [+] MAC Address:\", node.Info.MACAddress)\n        fmt.Println(\"  [+] Operating System:\", node.Info.Platform)\n\n        fmt.Println(\"\\n  [+] Filesystem Info\")\n        for partition, info := range node.Info.Filesystem {\n            if info.PercentUsed != \"\" {\n                fmt.Println(\"    - \", partition, \"is\", info.PercentUsed, \"utilized\")\n            }\n        }\n\n        fmt.Println(\"\\n  [+] Roles\")\n        for _, role := range node.Info.Roles {\n            fmt.Println(\"    - \", role)\n        }\n\n        fmt.Println()\n        for i := 0; i \u003c 80; i++ {\n            fmt.Print(\"=\")\n        }\n    }\n\n    // Print detailed information about a specific cookbook\n    cookbook, ok, err := c.GetCookbook(findCookbook)\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n        os.Exit(1)\n    }\n    if !ok {\n        fmt.Println(\"\\nCouldn't find that cookbook!\")\n    } else {\n        fmt.Println(\"\\n\\nCookbook info:\", findCookbook)\n        for _, version := range cookbook.Versions {\n            currentVersion, ok, err := c.GetCookbookVersion(findCookbook, version.Version)\n            if err != nil {\n                fmt.Println(\"Error:\", err)\n                os.Exit(1)\n            }\n            if ok {\n                if len(currentVersion.Files) \u003e 0 {\n                    fmt.Println(\"\\n  [+]\", findCookbook, currentVersion.Version, \"Cookbook Files\")\n                    for _, cookbookFile := range currentVersion.Files {\n                        fmt.Println(\"    - \", cookbookFile.Name)\n                    }\n                }\n            }\n        }\n\n        fmt.Println()\n        for i := 0; i \u003c 80; i++ {\n            fmt.Print(\"=\")\n        }\n    }\n\n    // Print detailed information about a specific role\n    role, ok, err := c.GetRole(findRole)\n    if err != nil {\n        fmt.Println(\"Error:\", err)\n    }\n    if !ok {\n        fmt.Println(\"\\nCouldn't find that role!\")\n    } else {\n        fmt.Println(\"\\n\\nRole information:\", role.Name)\n        fmt.Println(\"\\n[+] Runlist\")\n        for _, recipe := range role.RunList {\n            fmt.Println(\"  - \", recipe)\n        }\n    }\n}\n```\n\nWhich will output something like this:\n\n```\n================================================================================\nSystem info: neo4j.example.org\n\n  [+] IP Address: 10.100.1.2\n  [+] MAC Address: AA:BB:CC:DD:EE:FF\n  [+] Operating System: centos\n\n  [+] Filesystem Info\n    -  /dev/vda is 46% utilized\n    -  tmpfs is 1% utilized\n\n  [+] Roles\n    -  Base\n    -  Neo4j\n\n================================================================================\n\nCookbook info: neo4j\n\n  [+] neo4j 0.1.6 Cookbook Files\n    -  neo4j-server.properties\n    -  neo4j-service\n    -  neo4j-wrapper.conf\n\n  [+] neo4j 0.1.5 Cookbook Files\n    -  neo4j-service\n    -  neo4j-wrapper.conf\n\n  [+] neo4j 0.1.4 Cookbook Files\n    -  neo4j-service\n\n  [+] neo4j 0.1.3 Cookbook Files\n    -  neo4j-service\n\n  [+] neo4j 0.1.2 Cookbook Files\n    -  neo4j-service\n\n================================================================================\n\nRole information: Neo4j\n\n[+] Runlist\n  -  recipe[yum]\n  -  recipe[ldap]\n  -  recipe[system]\n  -  recipe[neo4j::server]\n  -  recipe[neo4j::web-ui]\n```\n\n## Contributing\n\nPlease contribute and help improve this project!\n\n- Fork the repo\n- Make sure the tests pass\n- Improve the code\n- Make sure your feature has test coverage\n- Make sure the tests pass\n- Submit a pull request\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsco%2Fchef-golang","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvsco%2Fchef-golang","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvsco%2Fchef-golang/lists"}