{"id":24204559,"url":"https://github.com/9elt/junkdb","last_synced_at":"2026-05-13T02:31:58.314Z","repository":{"id":225629684,"uuid":"766456277","full_name":"9elt/junkdb","owner":"9elt","description":"A trivial database to store script states","archived":false,"fork":false,"pushed_at":"2024-10-31T21:37:07.000Z","size":63,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-03T12:34:13.839Z","etag":null,"topics":["database","scripting"],"latest_commit_sha":null,"homepage":"","language":"C","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/9elt.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}},"created_at":"2024-03-03T10:17:32.000Z","updated_at":"2024-10-31T21:37:11.000Z","dependencies_parsed_at":"2025-03-03T12:41:57.141Z","dependency_job_id":null,"html_url":"https://github.com/9elt/junkdb","commit_stats":null,"previous_names":["9elt/junkdb"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/9elt/junkdb","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elt%2Fjunkdb","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elt%2Fjunkdb/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elt%2Fjunkdb/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elt%2Fjunkdb/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/9elt","download_url":"https://codeload.github.com/9elt/junkdb/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/9elt%2Fjunkdb/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32965213,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-12T23:30:32.555Z","status":"online","status_checked_at":"2026-05-13T02:00:07.132Z","response_time":115,"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":["database","scripting"],"created_at":"2025-01-13T23:17:24.414Z","updated_at":"2026-05-13T02:31:58.299Z","avatar_url":"https://github.com/9elt.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Junk DB\n\nA trivial database to store script states\n\nWhen using  the default [*configuration*](./src/config.h), a junk database has a ***8KB* fixed size**, storing a **single numeric status** and *1009* **hashes of generic data**.\n\nThe latter cannot be read back, but only added, removed or checked for existence. **Older entries are overwritten** when the database limit is exceeded. Databases are **automatically created** on first access.\n\n## Installation\n\n#### Linux\n\n```\n$ git clone https://github.com/9elt/junkdb\n$ cd junkdb\n$ sh install.sh\n```\n\nThis will locally install `junkdb`, `junkdb-cli` and set up your `data` directory.\n\n## Protocol\n\n```\n\u003cdatabase\u003e \u003cACTION\u003e \u003cpayload\u003e\n```\n\n#### Actions\n\n`GET`    Get the database *status*\n\n`SET`    Set the database *status*, the *payload* must be an integer\n\n`HAS`    Check if the database contains the *payload*\n\n`ADD`    Add the *payload* to the database\n\n`REM`    Remove the *payload* from the database\n\n`DEL`    Delete the database\n\n#### Example\n\n```\nmy-databse SET 32\n```\n\n## Client\n\n#### Usage\n\n```\njunkdb-cli \u003cdatabase\u003e [options] \u003cpayload\u003e [options]\njunkdb-cli \u003crequest\u003e [options] --raw [options]\n```\n#### Options\n\n| option    | short | description                                 |\n|-----------|-------|---------------------------------------------|\n| --strip   | -s    | strip response status                       |\n| --raw     |       | execute raw request                         |\n| --get     | -G    | get the database status                     |\n| --set     | -S    | set the database status                     |\n| --has     | -H    | check if the database contains the payload  |\n| --add     | -A    | add the payload to the database             |\n| --remove  | -R    | remove the payload from the database        |\n| --delete  | -D    | delete the datbase                          |\n| --help    | -h    | show this help message                      |\n| --version | -V    | show junkdb-cli version                     |\n\n\n#### Example\n\n```\n$ junkdb-cli 'my-database' --set 32\nOK\n```\n```\n$ junkdb-cli 'my-database' --get\nOK 32\n```\n```\n$ junkdb-cli 'my-database' --has 'Hello World!'\nOK false\n```\n```\n$ junkdb-cli 'my-database' --add 'Hello World!'\nOK\n```\n```\n$ junkdb-cli 'my-database' --has 'Hello World!'\nOK true\n```\n```\n$ junkdb-cli 'my-database' --remove 'Hello World!'\nOK\n```\n```\n$ junkdb-cli 'my-database' --delete\nOK\n```\n```\n$ junkdb-cli 'my-database SET 32' --raw \nOK\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9elt%2Fjunkdb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F9elt%2Fjunkdb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F9elt%2Fjunkdb/lists"}