{"id":16654336,"url":"https://github.com/cyrbil/go_keepasshttp","last_synced_at":"2025-04-09T18:11:17.282Z","repository":{"id":57553996,"uuid":"179848575","full_name":"cyrbil/go_keepasshttp","owner":"cyrbil","description":"Client for KeePassHTTP to fetch and edit credentials from Golang","archived":false,"fork":false,"pushed_at":"2024-04-30T12:39:30.000Z","size":29,"stargazers_count":3,"open_issues_count":2,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-23T20:11:38.806Z","etag":null,"topics":["go","golang","golang-library","golang-package","keepass","keepasshttp"],"latest_commit_sha":null,"homepage":null,"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/cyrbil.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","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}},"created_at":"2019-04-06T15:11:06.000Z","updated_at":"2022-05-18T04:29:42.000Z","dependencies_parsed_at":"2025-02-15T12:41:28.599Z","dependency_job_id":null,"html_url":"https://github.com/cyrbil/go_keepasshttp","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fgo_keepasshttp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fgo_keepasshttp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fgo_keepasshttp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cyrbil%2Fgo_keepasshttp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cyrbil","download_url":"https://codeload.github.com/cyrbil/go_keepasshttp/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248085277,"owners_count":21045138,"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":["go","golang","golang-library","golang-package","keepass","keepasshttp"],"created_at":"2024-10-12T09:49:30.655Z","updated_at":"2025-04-09T18:11:17.265Z","avatar_url":"https://github.com/cyrbil.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Go KeePassHTTP\n\n[![version.svg][version.svg]][version.url]\n[![godoc.svg][godoc.svg]][godoc.url]\n[![report.svg][report.svg]][report.url]\n[![stability.svg][stability.svg]][stability.url]\n \n[![license.svg][license.svg]][license.url]\n[![travis_build.svg][travis_build.svg]][travis.url]\n[![codecov.svg][codecov.svg]][codecov.url]\n[![code_size.svg][code_size.svg]][download.url]\n\n\nGo client for [KeePassHTTP][keepasshttp.url] to interact with [KeePass][keepass.url]'s credentials.\n\n\n## Installation\n\n    $ go get -u github.com/cyrbil/go_keepasshttp/keepasshttp\n\n## Usage\n\n#### Initialisation\n\n    package main\n    \n    import (\n    \t\"fmt\"\n    \t\"github.com/cyrbil/go_keepasshttp/keepasshttp\"\n    )\n    \n    func main() {\n    \tkph := keepasshttp.New()\n    \t...\n    \n    \n#### Get single credential\n\n    credential, err := kph.Get(\u0026keepasshttp.Filter{Url: \"my_credential_name_or_url\"})\n    if err != nil { panic(err) }\n    fmt.Printf(\"Login: %#v - Password: %#v\", credential.Login, credential.Password)\n    \n    \n#### Find all credentials's name\n\n    credentials, err := kph.List()\n    if err != nil { panic(err) }\n    for _, credential = range credentials {\n        fmt.Printf(\"Login: %#v\", credential.Login)\n    }\n    \n    \n#### Fetch all partially matching credentials\n\n    credentials, err = kph.Search(\u0026keepasshttp.Filter{\n        SubmitUrl: \"github.com\", // Filter has other useful fields\n    })\n    if err != nil { panic(err) }\n    for _, credential := range credentials {\n        fmt.Printf(\"Login: %#v - Password: %#v\", credential.Login, credential.Password)\n    }\n    \n    \n#### Create a new KeePassHTTP entry\n\n    err = kph.Create(\u0026keepasshttp.Credential{\n        Login: \"hello\",\n        Password: \"world\",\n        Url: \"github.com\",\n    })\n    if err != nil { panic(err) }\n    \n    \n#### Update a KeePassHTTP entry\n\n    credential.Password = \"new password\"\n    err = credential.Commit()\n    if err != nil { panic(err) }\n    // or\n    err = kph.Update(\u0026keepasshttp.Credential{\n        Uuid: credential.Uuid,\n        Login: \"hello\",\n        Password: \"world\",\n        Url: \"github.com\",\n    })\n    if err != nil { panic(err) }\n\n\n\n## Configuration\n\nBy default, this module will write AES association key to `~/.go_keepass_http`\nand use `http://localhost:19455/` to connect to the [KeePassHTTP][keepasshttp.url] server.\n\nTo change theses parameters, instantiate `keepasshttp.KeePassHTTP` with different values.\n\n\tkph := keepasshttp.New()\n\tkph.Storage = \"file.bin\"\n\tkph.Url = \"http://remote/keepasshttp/server\"\n    \n   \n    \n## Testing\n\nYou can simply run the tests using:\n\n    $ cd keepasshttp\n    $ go test\n    \n\n`KeePassHTTP` calls are mocked, to run the tests against a real server, you need to:\n \n   - open `tests/test_database.kdbx` in `KeePass` password is `test`\n   - set `TEST_WITH_KEEPASS` environment variable\n   - run test normally\n   - `KeePassHTTP` will ask to store new key (enter `unittest` as name and press `yes` to overwrite) and yield various messages, this is all normal\n\n\n\n## Coverage\n\nTo run tests with coverage:\n\n    $ go get golang.org/x/tools/cmd/cover\n    $ go test -cover\n    \n\n[comment]: # (Urls references)\n[version.url]: https://github.com/cyrbil/go_keepasshttp/releases\n[godoc.url]: https://godoc.org/github.com/cyrbil/go_keepasshttp/keepasshttp\n[report.url]: https://goreportcard.com/report/github.com/cyrbil/go_keepasshttp\n[stability.url]: https://goreportcard.com/report/github.com/cyrbil/go_keepasshttp\n[license.url]: ./LICENSE.txt\n[travis.url]: https://travis-ci.com/cyrbil/go_keepasshttp\n[codecov.url]: https://codecov.io/gh/cyrbil/go_keepasshttp\n[download.url]: https://github.com/cyrbil/go_keepasshttp/archive/master.zip\n[keepasshttp.url]: https://github.com/pfn/keepasshttp\n[keepass.url]: https://keepass.info/\n\n[comment]: # (Images references)\n[version.svg]: https://img.shields.io/github/tag/cyrbil/go_keepasshttp.svg?label=version \"Version\"\n[godoc.svg]: https://godoc.org/github.com/golang/gddo?status.svg \"GoDoc\"\n[report.svg]: https://goreportcard.com/badge/github.com/cyrbil/go_keepasshttp \"Report\"\n[stability.svg]: https://img.shields.io/badge/stability-stable-success.svg \"Stability\"\n[license.svg]: https://img.shields.io/github/license/cyrbil/go_keepasshttp.svg \"MIT\"\n[travis_build.svg]: https://travis-ci.com/cyrbil/go_keepasshttp.svg?branch=master \"travis.org\"\n[codecov.svg]: https://codecov.io/gh/cyrbil/go_keepasshttp/branch/master/graph/badge.svg \"codecov.io\"\n[code_size.svg]: https://img.shields.io/github/languages/code-size/cyrbil/go_keepasshttp.svg \"All files\"\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrbil%2Fgo_keepasshttp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcyrbil%2Fgo_keepasshttp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcyrbil%2Fgo_keepasshttp/lists"}