{"id":15343680,"url":"https://github.com/spacewander/lmdbcli","last_synced_at":"2026-05-03T19:33:06.247Z","repository":{"id":57604873,"uuid":"124618991","full_name":"spacewander/lmdbcli","owner":"spacewander","description":"lmdbcli is the redis-cli for lmdb with Lua script support","archived":false,"fork":false,"pushed_at":"2020-03-26T02:58:01.000Z","size":944,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-27T14:52:51.636Z","etag":null,"topics":["cli","lmdb","lua","repl"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/spacewander.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":"2018-03-10T03:34:49.000Z","updated_at":"2024-08-02T15:23:43.000Z","dependencies_parsed_at":"2022-09-13T01:33:50.013Z","dependency_job_id":null,"html_url":"https://github.com/spacewander/lmdbcli","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/spacewander/lmdbcli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Flmdbcli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Flmdbcli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Flmdbcli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Flmdbcli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/spacewander","download_url":"https://codeload.github.com/spacewander/lmdbcli/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/spacewander%2Flmdbcli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32582693,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: 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":["cli","lmdb","lua","repl"],"created_at":"2024-10-01T10:48:32.444Z","updated_at":"2026-05-03T19:33:06.214Z","avatar_url":"https://github.com/spacewander.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![screenshot](./screenshot.png)\n\n[![Travis](https://travis-ci.org/spacewander/lmdbcli.svg?branch=master)](https://travis-ci.org/spacewander/lmdbcli)\n[![GoReportCard](http://goreportcard.com/badge/spacewander/lmdbcli)](http://goreportcard.com/report/spacewander/lmdbcli)\n[![codecov.io](https://codecov.io/github/spacewander/lmdbcli/coverage.svg?branch=master)](https://codecov.io/github/spacewander/lmdbcli?branch=master)\n[![license](https://img.shields.io/badge/License-GPLv3-green.svg)](https://github.com/spacewander/lmdbcli/blob/master/LICENSE)\n\n## Feature\n\n* Support CRUD commands in repl-like command line. You can consider it as `redis-cli` for lmdb.\n* You can eval Lua script with given database. It makes maintaining lmdb more easily.\n\nFeel free to create an issue or pull request if you think this tool could be improved to satisfy\nyour requirements.\n\n## Installation\n\n`go get -u github.com/spacewander/lmdbcli`\n\nIn this way you will install the lmdbcli works well with latest lmdb (0.9.24).\n\nIf you are using an old version of lmdb, you need to change the `lmdb-go`'s version\nin `go.mod`, and rebuild.\n\nCurrently supported version (tested):\n* 0.9.24\n* 0.9.21\n\nOther versions of lmdb may be supported but I haven't tested.\nPlease run `go test ./...` to confirm if the lmdbcli works with your lmdb version.\n\nNote that the lmdb binding is writtern via `cgo`.\nIf you get `GLIBC_XX symbol not found` error when running the binary,\nyou need to rebuild it in correspondent environment to fix the dynamic symbol.\n\n## Usage\n\n`lmdbcli  [-e script] /path/to/db`\n\n## Commands\n\n```\n$ ./lmdbcli /tmp/node\nnode\u003e help\nstat) STAT get mdb_stat with 'stat' or 'stat db'\nexists) EXISTS check if a key exists with 'exists [db...] key'\nvalues) VALUES lists all keys and their values matched given glob pattern with 'values [db...] pattern'\nhex_encode) hex_encode toggles the hex encode mode. When the mode is on, if the output string contains non-ascii or non-printable characters, the string will be hex encoded and surrounded with [].\ndel) DEL remove a key with 'del [db...] key'\nkeys) KEYS lists all keys matched given glob pattern with 'keys [db...] pattern'\nget) GET a value with 'get [db...] key'\nset) SET a value with 'set [db...] key'\nput) PUT is an alias of SET\nnode\u003e ? # type '?' works the same as 'help'\n...\n```\n\n## Lua support\n\nYou could run a lua script on specific database like this: `lmdbcli -e your.lua db_path`.\n`lmdbcli` provides a couple of API within the global variable `lmdb`. For example:\n```lua\nlmdb.get(\"key\") -- return the value of `key` as a lua string\n-- is equal to `\u003e get key` in the command line\n```\n\nSee [test.lua](./test.lua) as a concrete example.\n\n### Lua utility functions\n\nTo avoid writing/copying common Lua snippets, we provide some builtin utils function\nexported via `lmdb.utils` table.\n\n#### local str = tohex(str)\n\nEncode input string via base32. It could be used to format MD5 binary value.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacewander%2Flmdbcli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspacewander%2Flmdbcli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspacewander%2Flmdbcli/lists"}