{"id":23181137,"url":"https://github.com/joeshaw/leaf","last_synced_at":"2025-08-22T00:06:22.200Z","repository":{"id":44783208,"uuid":"324266845","full_name":"joeshaw/leaf","owner":"joeshaw","description":"Go package and CLI tool for the Nissan Leaf North American NissanConnect API","archived":false,"fork":false,"pushed_at":"2022-02-19T19:19:42.000Z","size":33,"stargazers_count":7,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-04-06T05:34:39.850Z","etag":null,"topics":["golang","leaf","nissan"],"latest_commit_sha":null,"homepage":"","language":"Go","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/joeshaw.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":"2020-12-25T01:46:29.000Z","updated_at":"2024-09-07T07:01:25.000Z","dependencies_parsed_at":"2022-09-02T21:11:02.905Z","dependency_job_id":null,"html_url":"https://github.com/joeshaw/leaf","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/joeshaw/leaf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/joeshaw","download_url":"https://codeload.github.com/joeshaw/leaf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/joeshaw%2Fleaf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271002969,"owners_count":24683210,"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","status":"online","status_checked_at":"2025-08-18T02:00:08.743Z","response_time":89,"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":["golang","leaf","nissan"],"created_at":"2024-12-18T08:14:39.816Z","updated_at":"2025-08-18T13:33:32.978Z","avatar_url":"https://github.com/joeshaw.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Leaf\n\n[![GoDoc](https://godoc.org/github.com/joeshaw/leaf?status.svg)](http://godoc.org/github.com/joeshaw/leaf)\n\n`leaf` is a Go package and command-line tool providing access to\nthe Nissan Leaf North American NissanConnect EV API.\n\nThrough this API you can ask your vehicle for the latest battery status,\nstart charging remotely, start or stop climate control remotely, and retrieve the last known location of the vehicle.\n\nThis repo replaces my [Carwings](https://github.com/joeshaw/carwings)\nproject, which implemented an older but global API.  This API only works\nfor North American vehicles (and I've only tested on a vehicle in the\nUS, so it may not work in Canada).\n\n## Command-line tool\n\nThe `leaf` tool can be installed with:\n\n    go get github.com/joeshaw/leaf/cmd/leaf\n\nRun `leaf` by itself to see full usage information.\n\nTo update vehicle information:\n\n    leaf -username \u003cusername\u003e -password \u003cpassword\u003e update\n\nTo get latest battery status:\n\n    leaf -username \u003cusername\u003e -password \u003cpassword\u003e battery\n\nThis will print something like:\n\n    Getting last updated battery status...\n    Battery status as of 2020-12-26 11:35:58 -0500 EST:\n      Battery remaining: 91%\n      Cruising range: 88 miles (83 miles with heat/AC)\n      Plug-in state: connected\n      Charging status: yes\n      Time to full:\n        Level 1 charge: 8h30m\n        Level 2 charge: 3h0m\n        Level 2 at 6 kW: 2h0m\n\nFor some people the username is an email address.  For others it's a\ndistinct username.\n\nConfig values can be provided through environment variables (such as\n`LEAF_USERNAME`) or in a `~/.leaf` file in the format:\n\n```\nusername \u003cusername\u003e\npassword \u003cpassword\u003e\ncountry US\n```\n\n## NissanConnect North America protocol\n\nBen Woodford put together the first [protocol\nreference](https://gist.github.com/BenWoodford/141ca350445e994e69a70aabfb6db942),\nand several people have added onto that Gist.\n\nTobias Westergaard Kjeldsen has created a [Dart library](https://gitlab.com/tobiaswkjeldsen/dartnissanconnectna) for this API which he uses in his [My Leaf](https://gitlab.com/tobiaswkjeldsen/carwingsflutter) app for Android and iOS.\n\n## Contributing\n\nIssues and pull requests are welcome.  When filing a PR, please make\nsure the code has been run through `gofmt`.\n\n## License\n\nCopyright 2017-2020 Joe Shaw\n\n`leaf` is licensed under the MIT License.  See the LICENSE file\nfor details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeshaw%2Fleaf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjoeshaw%2Fleaf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjoeshaw%2Fleaf/lists"}