{"id":19401242,"url":"https://github.com/mishamyrt/nuga-lib","last_synced_at":"2025-06-30T08:06:22.193Z","repository":{"id":214701258,"uuid":"737156557","full_name":"mishamyrt/nuga-lib","owner":"mishamyrt","description":"⌨️ Go interface for BYK916 NuPhy® keyboards","archived":false,"fork":false,"pushed_at":"2024-05-29T20:02:08.000Z","size":241,"stargazers_count":7,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-24T07:42:24.136Z","etag":null,"topics":["byk916","nuphy","reverse-engineering","usb-hid"],"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/mishamyrt.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-12-30T02:22:40.000Z","updated_at":"2025-02-28T06:44:32.000Z","dependencies_parsed_at":"2024-05-29T22:47:42.145Z","dependency_job_id":"90f55abd-7002-4bd3-8d0c-5f63cd3acff6","html_url":"https://github.com/mishamyrt/nuga-lib","commit_stats":null,"previous_names":["mishamyrt/nuga-lib"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/mishamyrt/nuga-lib","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishamyrt%2Fnuga-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishamyrt%2Fnuga-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishamyrt%2Fnuga-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishamyrt%2Fnuga-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mishamyrt","download_url":"https://codeload.github.com/mishamyrt/nuga-lib/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mishamyrt%2Fnuga-lib/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262736599,"owners_count":23356145,"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":["byk916","nuphy","reverse-engineering","usb-hid"],"created_at":"2024-11-10T11:17:39.952Z","updated_at":"2025-06-30T08:06:22.164Z","avatar_url":"https://github.com/mishamyrt.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./docs/logo@2x.png\" alt=\"Nuga library Logo\" width=\"150\" /\u003e\n    \u003ch3 align=\"center\"\u003eNuga library\u003c/h3\u003e\n    \u003cp align=\"center\"\u003eGo interface for BYK916 NuPhy® keyboards\u003c/p\u003e\n    \u003cp align=\"center\"\u003e\n        \u003ca href=\"https://github.com/mishamyrt/nuga-lib/actions/workflows/quality-assurance.yaml\"\u003e\n            \u003cimg src=\"https://github.com/mishamyrt/nuga-lib/actions/workflows/quality-assurance.yaml/badge.svg\" /\u003e\n        \u003c/a\u003e\n        \u003ca href=\"https://github.com/mishamyrt/nuga-lib/tags\"\u003e\n            \u003cimg src=\"https://img.shields.io/github/v/tag/mishamyrt/nuga-lib?sort=semver\" /\u003e\n        \u003c/a\u003e\n    \u003c/p\u003e\n\u003c/p\u003e\n\n---\n\nThis library provides the ability to control keyboard parameters through the HID USB interface. It is used in [Nuga.app](https://github.com/mishamyrt/nuga-app).\n\n## Usage\n\nFirst of all, add a library module to your project.\n\n```sh\ngo get -u github.com/mishamyrt/nuga-lib@latest\n```\n\nUse the `nuga.Open()` method to get the keyboard controller. It allows you to control the keyboard. For example, the brightness can be changed.\n\n```go\npackage main\n\nimport (\n\t\"github.com/mishamyrt/nuga-lib\"\n)\n\nfunc main() {\n\t// Setup HID\n\tnuga.Init()\n\tdefer nuga.Exit()\n\t// Open connection with keyboard\n\tdevice, _ := nuga.Open()\n\t// Read current effects\n\teffects, _ := device.Features.Light.GetEffects()\n\t// Set brightness to 50%\n\teffects.Backlight.SetBrightness(2)\n\t// Write effects\n\t_ = device.Features.Light.SetEffects(effects)\n}\n```\n\n## Terminology\n\n- Mode — keyboard light mode;\n- Effect — combination of color, speed, brightness and light mode.\n\n## Protocol\n\nThe library is based on reverse-engineering of the keyboard protocol. The knowledge that was obtained is recorded in the [`docs`](./docs/) folder.\n\n## Trademarks\n\nNuPhy® is a registered trademark of NuPhy Studio. Nuga is an unofficial product and is not affiliated with NuPhy Studio.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishamyrt%2Fnuga-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmishamyrt%2Fnuga-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmishamyrt%2Fnuga-lib/lists"}