{"id":29154340,"url":"https://github.com/0xDebabrata/citrus","last_synced_at":"2025-07-01T02:34:40.927Z","repository":{"id":153319687,"uuid":"628732975","full_name":"0xDebabrata/citrus","owner":"0xDebabrata","description":"(distributed) vector database","archived":false,"fork":false,"pushed_at":"2024-08-18T05:47:30.000Z","size":957,"stargazers_count":104,"open_issues_count":2,"forks_count":13,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-06-26T16:18:56.389Z","etag":null,"topics":["approximate-nearest-neighbor-search","embeddings","hnsw","nearest-neighbor-search","semantic-search","semantic-search-engine","similarity-search","vector-database","vector-search-engine","vectors"],"latest_commit_sha":null,"homepage":"https://searchcitrus.com","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/0xDebabrata.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":"FUNDING.yml","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},"funding":{"github":"0xDebabrata"}},"created_at":"2023-04-16T21:00:38.000Z","updated_at":"2025-06-03T07:48:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"bcec6267-6151-4d03-a285-a1f601fc0d16","html_url":"https://github.com/0xDebabrata/citrus","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/0xDebabrata/citrus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xDebabrata%2Fcitrus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xDebabrata%2Fcitrus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xDebabrata%2Fcitrus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xDebabrata%2Fcitrus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/0xDebabrata","download_url":"https://codeload.github.com/0xDebabrata/citrus/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/0xDebabrata%2Fcitrus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262884154,"owners_count":23379338,"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":["approximate-nearest-neighbor-search","embeddings","hnsw","nearest-neighbor-search","semantic-search","semantic-search-engine","similarity-search","vector-database","vector-search-engine","vectors"],"created_at":"2025-07-01T02:33:49.235Z","updated_at":"2025-07-01T02:34:40.890Z","avatar_url":"https://github.com/0xDebabrata.png","language":"Python","funding_links":["https://github.com/sponsors/0xDebabrata"],"categories":["Vector Database Engines"],"sub_categories":[],"readme":"# 🍋 citrus.\n### open-source (distributed) vector database\n\n## Installation\n\n```bash\npip install citrusdb\n```\n\n## Getting started\n\n#### 1. Create index\n```py\nimport citrusdb\n\n# Initialize client\ncitrus = citrusdb.Client()\n\n# Create index\ncitrus.create_index(\n  name=\"example\",\n  max_elements=1000,            # increases dynamically as you insert more vectors\n)\n```\n\n#### 2. Insert elements\n```py\nids = [1, 2, 3]\ndocuments = [\n  \"Your time is limited, so don't waste it living someone else's life\",\n  \"I'd rather be optimistic and wrong than pessimistic and right.\",\n  \"Running a start-up is like chewing glass and staring into the abyss.\"\n]\n\ncitrus.add(index=\"example\", ids=ids, documents=documents)\n```\nYou can directly pass vector embeddings as well. If you're passing a list of strings like we have done here, ensure you have your `OPENAI_API_KEY` in the environment. By default we use OpenAI to to generate the embeddings. Please reach out if you're looking for support from a different provider!\n\n#### 3. Search\n```py\nresults = citrus.query(\n    index=\"example\",\n    documents=[\"What is it like to launch a startup\"],\n    k=1,\n    include=[\"document\", \"metadata\"]\n)\n\nprint(results)\n```\nYou can specify if you want the associated text document and metadata to be returned.\nBy default, only the IDs are returned.\n\nGo launch a repl on [Replit](https://replit.com) and see what result you get after running the query! `result` will contain the `ids` of the top `k` search hits.\n\n## Example\n[chat w/ replit ai podcast](https://replit.searchcitrus.com)\n\n[pokedex search](https://replit.com/@debabratajr/pokedex-search)\n\n## Facing issues?\nFeel free to open issues on this repository! Discord server coming soon!\n\n*PS: citrus isn't fully distributed just yet. We're getting there though ;)*\n\n---\n\n\u003cp align=\"center\"\u003e\n  Special thanks to\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg align=\"center\" src=\"https://www.getdevkit.com/logo.png\" width=100 height=100 alt=\"DevKit\" /\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.getdevkit.com\"\u003eDevKit - The Essential Developer Toolkit\u003c/a\u003e\u003cbr /\u003e\n  DSoC 2023\n\u003c/p\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xDebabrata%2Fcitrus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F0xDebabrata%2Fcitrus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F0xDebabrata%2Fcitrus/lists"}