{"id":20801906,"url":"https://github.com/philips-software/gino-keva","last_synced_at":"2025-10-12T02:02:57.989Z","repository":{"id":39607334,"uuid":"373051289","full_name":"philips-software/gino-keva","owner":"philips-software","description":"A simple Git Notes Key Value store","archived":false,"fork":false,"pushed_at":"2023-08-08T16:53:42.000Z","size":233,"stargazers_count":25,"open_issues_count":9,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-31T04:41:11.840Z","etag":null,"topics":["git","golang-application","key-value-store"],"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/philips-software.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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":"2021-06-02T05:34:58.000Z","updated_at":"2023-08-13T02:50:30.000Z","dependencies_parsed_at":"2023-02-11T08:30:57.611Z","dependency_job_id":null,"html_url":"https://github.com/philips-software/gino-keva","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fgino-keva","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fgino-keva/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fgino-keva/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/philips-software%2Fgino-keva/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/philips-software","download_url":"https://codeload.github.com/philips-software/gino-keva/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252793564,"owners_count":21805054,"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":["git","golang-application","key-value-store"],"created_at":"2024-11-17T18:25:29.403Z","updated_at":"2025-10-12T02:02:57.929Z","avatar_url":"https://github.com/philips-software.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build and Test](https://github.com/philips-software/gino-keva/actions/workflows/main.yml/badge.svg)](https://github.com/philips-software/gino-keva/actions/workflows/main.yml)\n[![Go Report Card](https://goreportcard.com/badge/github.com/philips-software/gino-keva)](https://goreportcard.com/report/github.com/philips-software/gino-keva)\n\n\u003c!-- omit in toc --\u003e\n\n# Gino Keva - Git Notes Key Values\n\nGino Keva works as a simple Key Value store built on top of Git Notes, using an event sourcing architecture.\n- Events are added to the current commit when manipulating key/values via get or unset actions\n- Gino Keva compiles a snapshot of all historical key/values by replaying all events up to the current commit\n\n\u003c!-- omit in toc --\u003e\n\n## Table of Contents\n\n- [Gino Keva - Git Notes Key Values](#gino-keva---git-notes-key-values)\n  - [Table of Contents](#table-of-contents)\n  - [Use case](#use-case)\n    - [Use case - Store new component version](#use-case---store-new-component-version)\n    - [Use case - List all component versions corresponding for a certain commit](#use-case---list-all-component-versions-corresponding-for-a-certain-commit)\n  - [Requirements](#requirements)\n  - [How to use](#how-to-use)\n    - [Warning: Push your changes](#warning-push-your-changes)\n    - [Set key/value pairs](#set-keyvalue-pairs)\n    - [List all key/value pairs](#list-all-keyvalue-pairs)\n    - [Use custom notes reference](#use-custom-notes-reference)\n  - [FAQ](#faq)\n    - [I need additional git configuration? How can I do that?](#i-need-additional-git-configuration-how-can-i-do-that)\n    - [I need a custom output format](#i-need-a-custom-output-format)\n\n## Use case\n\n_Although Gino Keva was written with the below use case in mind, it intends to be a generic tool. Don't get discouraged if your intended use is very different. Instead feel free to open a ticket, so we can discuss if we can make it work._\n\nThe need for Gino Keva was born in an environment where ~20 components (some would call micro-services) live together in a single repository. Every component is deployed in a docker container; together they form an application/service. There's a single build pipeline that triggers upon any change. The pipeline will then fan out and trigger an independent build (and test) for each component impacted by the change. For each component, this results in a new docker container which is versioned and pushed to the registry. Once all components are rebuilt, the set of containers (of which some newly built) can be deployed and tested and eventually be promoted to production.\n\nDue to the selective build mechanism, the versions of components are not coupled. Some will rarely change, others frequently. Now how to keep track of the set of containers that make up the application? It makes sense to keep this build metadata  inside the version control system, so we have it available for each commit that was built. But we'd hate to see the build pipeline polluting the git history with artificial commits. This is where Gino Keva was born.\n\n\u003c!-- omit in toc --\u003e\n\n### Use case - Store new component version\n\nGino Keva is used to store the newly built version of any component as a key/value pair in git notes, linked to commit it was built from: `COMPONENT_foo=1.1.0`.\n\n\u003c!-- omit in toc --\u003e\n\n### Use case - List all component versions corresponding for a certain commit\n\nFor each deployment, the list of containers which make up the application is simply collected based on the output of `gino-keva list`:\n\n| Before              | After                           |\n| ------------------- | ------------------------------- |\n| COMPONENT_foo=1.0.0 | COMPONENT_foo=1.1.0 (updated)   |\n| COMPONENT_BAR=1.2.3 | COMPONENT_BAR=1.2.3 (untouched) |\n| ....                | ....                            |\n\n## Requirements\n\n- Git CLI: Gino Keva uses the git CLI as installed on the host. Tested with version 2.32.0, however any recent version should do.\n\n## How to use\n\nSee below examples on how to use gino-keva, or run `gino-keva --help` for help.\n\n### Warning: Push your changes\n\nBy default, gino-keva will not push your changes to the upstream. You likely would like to change this behaviour by specifying `--push`, or setting the environment variable `GINO_KEVA_PUSH=1`.\nIf you do not do this, subsequent fetches will overwrite any local changes made.\n\n### Set key/value pairs\n\n\n````console\nfoo@bar (f10b970d):~$ gino-keva set key my_value\nfoo@bar (f10b970d):~$ gino-keva set counter 12\nfoo@bar (f10b970d):~$ gino-keva set foo bar\n````\n\n### List all key/value pairs\n\n```console\nfoo@bar (f10b970d):~$ gino-keva list\ncounter=12\nfoo=bar\nkey=my_value\n```\n\nfoo@bar (f10b970d):~$ git commit --allow-empty -m \"Dummy commit\"\nfoo@bar (a8517558):~$ gino-keva set pi 3.14\nfoo@bar (a8517558):~$ gino-keva list --output=json\n{\n  \"counter\": \"12\",\n  \"foo\": \"bar\",\n  \"key\": \"my_value\",\n  \"pi\": \"3.14\"\n}\n```\n\n### Unset keys\n\nFinally, you can unset keys using `unset`:\n\n```console\nfoo@bar (a8517558):~$ gino-keva unset foo\nfoo@bar (a8517558):~$ gino-keva list\ncounter=12\nkey=my_value\npi=3.14\n```\n\n### Use custom notes reference\n\nBy default the notes are saved to `refs/notes/gino-keva`, but this can be changed with the `--ref` command-line switch. To store your key/value under `refs/notes/banana`:\n\n```console\nfoo@bar (a8517558):~$ gino-keva --ref=banana set color yellow\n```\n\n## FAQ\n\n### I need additional git configuration? How can I do that?\n\nSince Gino Keva simply uses the git CLI, you can use (most of) the options it provides to set/override the configuration. You could either use `git config` to setup the system is desired, or use environment variables to achieve the same.\n\nExample: Add a key/value pair as the \"whatever \\\u003cwhatever@example.com\u003e\" user\n\n```\nGIT_CONFIG_COUNT=2 \\\nGIT_CONFIG_KEY_0=\"user.name\" GIT_CONFIG_VALUE_0=\"whatever\" \\\nGIT_CONFIG_KEY_1=\"user.email\" GIT_CONFIG_VALUE_1=\"whatever@example.com\" \\\ngino-keva set foo bar\n```\n\n### I need a custom output format\n\nGino Keva supports just simple `key=value` format (default), or json (`--output=json`). However, you can parse the output in any format you'd like.\n\nExample: Use gino-keva as part of a GitHub action:\n\n```console\nfoo@bar:~$ gino-keva list | awk -F= '{print \"::set-output name=\"$1\"::\"$2}'\n::set-output name=COUNTER::12\n::set-output name=key::my_value\n::set-output name=PI::3.14\n```\n\nExample: Use gino-keva as part of an Azure Devops pipeline:\n\n```console\nfoo@bar:~$ gino-keva list | awk -F= '{print \"##vso[task.setvariable variable=\"$1\"]\"$2}'\n##vso[task.setvariable variable=COUNTER]12\n##vso[task.setvariable variable=key]my_value\n##vso[task.setvariable variable=PI]3.14\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fgino-keva","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphilips-software%2Fgino-keva","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphilips-software%2Fgino-keva/lists"}