{"id":19204199,"url":"https://github.com/viniciuscestarii/elixkey","last_synced_at":"2026-05-15T11:34:22.784Z","repository":{"id":255484554,"uuid":"852218157","full_name":"ViniciusCestarii/ElixKey","owner":"ViniciusCestarii","description":"CLI and key-value db made only with Elixir and its native libraries","archived":false,"fork":false,"pushed_at":"2024-11-05T16:42:51.000Z","size":7367,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-20T13:38:30.675Z","etag":null,"topics":["cli","db","elixir"],"latest_commit_sha":null,"homepage":"","language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ViniciusCestarii.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-09-04T12:37:35.000Z","updated_at":"2024-11-05T16:42:55.000Z","dependencies_parsed_at":"2024-09-13T05:25:12.737Z","dependency_job_id":"a9b3c045-d651-4617-bdd0-80bc514d7cde","html_url":"https://github.com/ViniciusCestarii/ElixKey","commit_stats":null,"previous_names":["viniciuscestarii/cumbuca-desafio","viniciuscestarii/elixkey"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FElixKey","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FElixKey/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FElixKey/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ViniciusCestarii%2FElixKey/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ViniciusCestarii","download_url":"https://codeload.github.com/ViniciusCestarii/ElixKey/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240275924,"owners_count":19775615,"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":["cli","db","elixir"],"created_at":"2024-11-09T13:06:36.279Z","updated_at":"2026-05-15T11:34:22.748Z","avatar_url":"https://github.com/ViniciusCestarii.png","language":"Elixir","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ElixKey: Cumbuca desafio Elixir DB e CLI\n\n[![Build Status](https://github.com/ViniciusCestarii/cumbuca-desafio/actions/workflows/test.yml/badge.svg)](https://github.com/ViniciusCestarii/cumbuca-desafio/actions/workflows/test.yml)\n\nSolução do [desafio proposto pela Cumbuca](https://github.com/appcumbuca/desafios/blob/master/desafio-back-end-pleno.md)\n\n## Descrição\n\nO desafio é desenvolver uma interface de linha de comando (CLI) e um banco de dados key-value utilizando exclusivamente a linguagem Elixir e suas bibliotecas nativas.\n\n## Solução\n\nA CLI foi implementada utilizando a biblioteca nativa IO do Elixir, onde o usuário pode interagir com o banco de dados key-value através de comandos como `SET`, `GET`, `BEGIN`, `ROLLBACK` e `COMMIT`.\n\nO banco de dados key-value foi implementado com persistência, armazenando os dados em um arquivo binário. As transações e o estado da aplicação são mantidos em memória utilizando estruturas `Map`.\n\nAdicionados novos comandos: `EXIT`, `EXISTS` e `DELETE`.\n\n## Commands\n\n### `SET \u003ckey\u003e \u003cvalue\u003e`\nSets the value associated with the specified key.\n\nreturns: TRUE or FALSE if the key already exists and the value.\n\n### `GET \u003ckey\u003e`\n\nGets the value associated with the specified key.\n\nreturns: The value associated with the key or NIL if the key does not exist.\n\n### `DELETE \u003ckey\u003e`\n\nDeletes the value associated with the specified key.\n\nreturns: TRUE or FALSE if the key exists.\n\n### `EXISTS \u003ckey\u003e`\n\nChecks if the key exists.\n\nreturns: TRUE or FALSE if the key exists.\n\n### `BEGIN`\n\nStarts a new transaction.\n\nreturns: nesting level of transactions.\n\n### `ROLLBACK`\n\nRolls back the current transaction.\n\nreturns: nesting level of transactions.\n\n### `COMMIT`\n\nCommits the current transaction.\n\nreturns: nesting level of transactions.\n\n### `EXIT`\n\nExits the CLI.\n\nreturns: Goodbye message.\n\n## Pré-requisitos\n\nPrimeiro, será necessário [instalar o Elixir](https://elixir-lang.org/install.html)\nem versão igual ou superior a 1.16.\nCom o Elixir instalado, você terá a ferramenta de build `mix`.\n\nPara buildar o projeto, use o comando `mix escript.build` nesta pasta.\nIsso irá gerar um binário com o mesmo nome do projeto na pasta.\nExecutando o binário, sua CLI será executada.\n\nExecutando binário no Linux:\n\n```bash\n./elix_key\n```\n\nExecutando binário no Windows:\n\n```bash\nescript elix_key\n```\n\n\n## Running with Docker\n\nBuild the image:\n\n```bash\ndocker build -t elix_key .\n```\n\nRun the container:\n\n```bash\ndocker run -it --rm elix_key\n```\n\n## Running tests with Docker\nBuild the image:\n\n```bash\ndocker build -t elix_key .\n```\n\nRun the tests:\n\n```bash\ndocker run --rm elix_key mix test\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciuscestarii%2Felixkey","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fviniciuscestarii%2Felixkey","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fviniciuscestarii%2Felixkey/lists"}