{"id":45345864,"url":"https://github.com/xakep666/gkpxc","last_synced_at":"2026-02-21T11:30:41.424Z","repository":{"id":42622763,"uuid":"461171888","full_name":"xakep666/gkpxc","owner":"xakep666","description":"KeepassXC RPC (browser integration) golang client","archived":false,"fork":false,"pushed_at":"2025-09-13T15:37:33.000Z","size":37,"stargazers_count":7,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-13T16:33:10.723Z","etag":null,"topics":["go","keepassxc"],"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/xakep666.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":"2022-02-19T11:31:16.000Z","updated_at":"2024-10-29T15:28:06.000Z","dependencies_parsed_at":"2022-09-08T03:22:02.928Z","dependency_job_id":null,"html_url":"https://github.com/xakep666/gkpxc","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/xakep666/gkpxc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xakep666%2Fgkpxc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xakep666%2Fgkpxc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xakep666%2Fgkpxc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xakep666%2Fgkpxc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xakep666","download_url":"https://codeload.github.com/xakep666/gkpxc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xakep666%2Fgkpxc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29679771,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T11:29:27.227Z","status":"ssl_error","status_checked_at":"2026-02-21T11:29:20.292Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5: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":["go","keepassxc"],"created_at":"2026-02-21T11:30:40.805Z","updated_at":"2026-02-21T11:30:41.416Z","avatar_url":"https://github.com/xakep666.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"KeepassXC RPC client for Go\n========\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/xakep666/gkpxc.svg)](https://pkg.go.dev/github.com/xakep666/gkpxc)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![Go Test](https://github.com/xakep666/gkpxc/actions/workflows/testing.yml/badge.svg)](https://github.com/xakep666/gkpxc/actions/workflows/testing.yml)\n\nThis library allows to interact with [KeepassXC Browser Integration](https://keepassxc.org/docs/KeePassXC_GettingStarted.html#_setup_browser_integration) server.\nIt's protocol not documented well but can be found in [source code](https://github.com/keepassxreboot/keepassxc/blob/2.7.1/src/browser/BrowserAction.cpp#L34).\nThis repository also contains additional \"adapter\" utilities for storing credentials in KeepassXC database.\n\n# Additional utilities\n* [Docker Credential Helper](./dockercred/README.md)\n\n# Usage\nProtocol uses \"request-response\" model but also contains some asynchronous notifications.\nTypical workflow:\n0. Create client\n1. Request database hash using `Client.GetDatabaseHash`.\n2. Lookup association credentials by received hash and use it `Client.SetAssociationCredentials`.\n3. Request a new association if such credentials was not found on step 2 using `Client.Associate`.\n        Then get them using `Client.AssociationCredentials` and store in safe place.\n4. Optionally subscribe to asynchronous events.\n5. Make requests.\n6. Close client.\n\n## Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"fmt\"\n\n\t\"github.com/xakep666/gkpxc\"\n)\n\nfunc main() {\n\tclient, err := gkpxc.NewClient(context.Background(), gkpxc.WithLockChangeHandler(func(locked bool) {\n\t\tfmt.Printf(\"lock changed: %t\\n\", locked)\n\t}))\n\tif err != nil {\n\t\tpanic(err)\n    }\n\t\n\tdefer client.Close()\n\n\tdbHash, err := client.GetDatabaseHash(context.Background(), false)\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\t\n\tfmt.Printf(\"KeepassXC version: %s, Database hash: %s\\n\", dbHash.Version, dbHash.Hash)\n\t\n\terr = client.Associate(context.Background())\n\tif err != nil {\n\t\tpanic(err)\n    }\n\t\n\tassociationCreds := client.AssociationCredentials()\n\t// store them somewhere\n\tfmt.Printf(\"Association ID: %s, Association private key: %v\\n\", associationCreds.ID, associationCreds.PrivateKey)\n\t\n\tgroups, err := client.GetDatabaseGroups(context.Background())\n\tif err != nil {\n\t\tpanic(err)\n    }\n\t\n\tfor _, group := range groups.Groups.Groups {\n\t\tfmt.Printf(\"Group UUID: %s, name: %s\\n\", group.UUID, group.Name)\n    }\n}\n```\n\n# Testing\n\nThis library contains two kind of tests: unit and integration.\n\nUnit-tests runs with just `go test`.\n\nIntegration tests adds some requirements:\n* KeepassXC at least 2.7.0 installed on your system\n* KeepassXC is not running\n* Requirements for additional utilities (see in corresponding README's).\n\nTo specify custom KeepassXC executable location use `KEEPASSXC_EXECUTABLE` environment variable (i.e. [testing.yml](.github/workflows/testing.yml)).\n\nTo run integration tests use `go test -tags integration ./...`.\n\nNote that some tests contain long sleeps used to wait for KeepassXC startup.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxakep666%2Fgkpxc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxakep666%2Fgkpxc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxakep666%2Fgkpxc/lists"}