{"id":25177004,"url":"https://github.com/lovromazgon/badger-cli","last_synced_at":"2025-07-30T15:14:23.632Z","repository":{"id":250564777,"uuid":"834811458","full_name":"lovromazgon/badger-cli","owner":"lovromazgon","description":"A simple CLI for badger DB","archived":false,"fork":false,"pushed_at":"2024-10-31T16:53:10.000Z","size":18,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-21T22:51:26.051Z","etag":null,"topics":["badger","badgerdb","cli","go"],"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/lovromazgon.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":"2024-07-28T12:41:44.000Z","updated_at":"2025-05-08T10:01:38.000Z","dependencies_parsed_at":"2025-05-06T23:26:56.681Z","dependency_job_id":"d3879362-e92f-404e-a8ce-69a2146b842c","html_url":"https://github.com/lovromazgon/badger-cli","commit_stats":null,"previous_names":["lovromazgon/badger-cli"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/lovromazgon/badger-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovromazgon%2Fbadger-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovromazgon%2Fbadger-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovromazgon%2Fbadger-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovromazgon%2Fbadger-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lovromazgon","download_url":"https://codeload.github.com/lovromazgon/badger-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lovromazgon%2Fbadger-cli/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267889584,"owners_count":24161229,"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-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","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":["badger","badgerdb","cli","go"],"created_at":"2025-02-09T13:20:02.513Z","updated_at":"2025-07-30T15:14:23.599Z","avatar_url":"https://github.com/lovromazgon.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# badger-cli\n\n[![License](https://img.shields.io/github/license/lovromazgon/badger-cli)](https://github.com/ConduitIO/conduit/blob/main/LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/lovromazgon/badger-cli)](https://goreportcard.com/report/github.com/lovromazgon/badger-cli)\n\n`badger-cli` is a simple command-line interface for interacting with [Badger DB](https://github.com/dgraph-io/badger), \na fast key-value database written in Go.\n\n![demo](https://github.com/user-attachments/assets/370d3b7a-b4b7-49f0-9ff9-b1279ddb8181)\n\n## Features\n\n- Connect to an existing Badger DB\n- Get, set, and delete key-value pairs\n- List keys with optional glob pattern matching\n- Read-only mode for safe database inspection\n\n## Installation\n\nInstall using homebrew:\n\n```sh\nbrew install lovromazgon/tap/badger-cli\n```\n\nOr build it from source using Go:\n\n```sh\ngo install github.com/lovromazgon/badger-cli\n```\n\nOr download the binary manually from the [latest release](https://github.com/lovromazgon/badger-cli/releases/latest).\n\n## Usage\n\n```sh\n$ badger-cli -h\n\nUsage: badger-cli [options] \u003cdatabase_path\u003e\n\nA command-line interface for a Badger key-value database.\n\nOptions:\n    -r, --readonly  Open database in read-only mode\n    -h, --help      Show help\n\nExamples:\n    badger-cli /path/to/db\n    badger-cli --readonly /path/to/db\n```\n\n### Read-only Mode\n\nTo open the database in read-only mode (useful for inspecting production databases safely):\n\n```sh\nbadger-cli --readonly /path/to/your/badger/db\n# or\nbadger-cli -r /path/to/your/badger/db\n```\n\nIn read-only mode:\n- The prompt will show `[READONLY] \u003e`\n- Only `get` and `list` commands are available\n- `set` and `delete` commands are disabled\n- The database is opened with read-only permissions\n- The database must already exist (will not create new databases)\n- If the database is already in use by another process, you may need to run without -readonly first to ensure proper initialization\n\nOnce the CLI is running, you can use the following commands:\n\n- `get \u003ckey\u003e`: Retrieve the value for a given key\n- `set \u003ckey\u003e \u003cvalue\u003e`: Set a value for a given key (not available in read-only mode)\n- `delete \u003ckey\u003e`: Delete a key-value pair (not available in read-only mode)\n- `list [pattern]`: List all keys, optionally filtered by a glob pattern\n- `exit`: Exit the CLI\n\n### Examples\n\nNormal mode:\n```sh\n\u003e set mykey myvalue\nValue set successfully\n\u003e get mykey\nmyvalue\n\u003e list my*\nmykey\n\u003e delete mykey\nValue deleted successfully\n\u003e list\nNo matching keys found\n\u003e exit\n```\n\nRead-only mode:\n```sh\n[READONLY] \u003e get mykey\nmyvalue\n[READONLY] \u003e list my*\nmykey\n[READONLY] \u003e set newkey newvalue\nError: Cannot set values in read-only mode\n[READONLY] \u003e delete mykey\nError: Cannot delete values in read-only mode\n[READONLY] \u003e exit\n```\n\n## Glob Pattern Matching\n\nThe `list` command supports glob pattern matching:\n\n- `*`: Matches any sequence of characters\n- `?`: Matches any single character\n- `[abc]`: Matches any character in the set\n- `[a-z]`: Matches any character in the range\n\nExamples:\n- `list app_*`: Lists all keys starting with \"app_\"\n- `list *_config`: Lists all keys ending with \"_config\"\n- `list user_??`: Lists all keys starting with \"user_\" followed by exactly two characters\n\n## Acknowledgements\n\nThe initial version of this CLI was developed with assistance from an AI language model. The code has since been modified and expanded.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovromazgon%2Fbadger-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flovromazgon%2Fbadger-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flovromazgon%2Fbadger-cli/lists"}