{"id":29687394,"url":"https://github.com/kostya-zero/kvdb","last_synced_at":"2025-07-23T04:37:08.811Z","repository":{"id":304171546,"uuid":"967188745","full_name":"kostya-zero/kvdb","owner":"kostya-zero","description":"Lightweight key‑value store written in Go.","archived":false,"fork":false,"pushed_at":"2025-07-19T12:21:51.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-19T16:56:18.559Z","etag":null,"topics":[],"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/kostya-zero.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-04-16T04:23:31.000Z","updated_at":"2025-07-19T12:21:55.000Z","dependencies_parsed_at":"2025-07-11T15:03:17.167Z","dependency_job_id":"423f2312-4744-43f0-9a3f-bd29e5c3b92c","html_url":"https://github.com/kostya-zero/kvdb","commit_stats":null,"previous_names":["kostya-zero/kvdb"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/kostya-zero/kvdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fkvdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fkvdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fkvdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fkvdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kostya-zero","download_url":"https://codeload.github.com/kostya-zero/kvdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kostya-zero%2Fkvdb/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266619198,"owners_count":23957274,"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-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"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":[],"created_at":"2025-07-23T04:36:58.792Z","updated_at":"2025-07-23T04:37:08.796Z","avatar_url":"https://github.com/kostya-zero.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# `KVDB`\n\nKVDB is a lightweight key‑value store written in Go. It keeps data in\nnamed maps so multiple services can share a single server without clobbering\neach other's keys. The server exposes a plain TCP protocol and can optionally\npersist all updates to a file.\n\n## Installation\n\n#### GitHub Releases\n\nDownload an archive from [GitHub Releases](\"https://github.com/kostya-zero/kvdb/releases\") and extract the KVDB binary\nto directory that is added to `PATH`.\n\n#### Docker\n\nClone this repository and use Docker CLI to build and run container.\n\n```shell\ndocker build -t kvdb .\ndocker run -p 5511:5511 kvdb\n```\n\n## Usage\n\nRun the server with the `serve` command.\n\n```shell\nkvdb serve \n```\n\nAll options for KVDB should be provided as environment variables. Available variables:\n\n- `KVDB_PORT` - TCP port to bind to (default `5511`).\n- `KVDB_DATABASE` - path to the database file. When omitted, data is kept in memory only.\n- `KVDB_SAVE_INTERVAL` - the save interval in milliseconds. After this time, KVDB will run save if it is needed.\n\nExamples:\n\n```shell\n# Start with defaults (port 5511, in-memory database)\nkvdb serve\n\n# Persist data to kvdb.db and expose on custom port\nexport KVDB_PORT=7777\nexport KVDB_DATABASE/var/lib/kvdb/kvdb.db\nkvdb serve \n```\n\n## API overview\n\nThe server communicates over plain TCP. \nEach request is a single line command and the response is a text string. \nThebasic commands are:\n\n- `CREATEDB \u003cdb\u003e` – create a new database map.\n- `REMOVE DB \u003cdb\u003e` – remove a database.\n- `REMOVE KEY \u003cdb\u003e.\u003ckey\u003e` – delete a key.\n- `SET \u003cdb\u003e.\u003ckey\u003e \"\u003cvalue\u003e\"` – add a new key with value.\n- `GET \u003cdb\u003e.\u003ckey\u003e` – return the value for a key.\n- `UPDATE \u003cdb\u003e.\u003ckey\u003e \"\u003cvalue\u003e\"` – replace the current value.\n\nResponses are either `OK` or one of the following error codes: `ALREADY_EXISTS`, `DATABASE_NOT_FOUND`, `KEY_NOT_FOUND`,\n`KEY_NOT_PROVIDED`, `ILLEGAL_CHARACTERS`, or `BAD_QUERY`.\n\nYou can test the server with tools like `nc`:\n\n```shell\n$ nc 127.0.0.1 5511\nCREATEDB users\nSET users.alice \"alice@example.com\"\nGET users.alice\n```\n\n## License\n\nKVDB is licensed under MIT License. Learn more in [LICENSE](LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostya-zero%2Fkvdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkostya-zero%2Fkvdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkostya-zero%2Fkvdb/lists"}