{"id":13718912,"url":"https://github.com/asg017/sqlite-vec","last_synced_at":"2026-04-02T15:13:12.502Z","repository":{"id":234807158,"uuid":"789538509","full_name":"asg017/sqlite-vec","owner":"asg017","description":"A vector search SQLite extension that runs anywhere!","archived":false,"fork":false,"pushed_at":"2026-03-30T02:50:10.000Z","size":894,"stargazers_count":7315,"open_issues_count":175,"forks_count":298,"subscribers_count":63,"default_branch":"main","last_synced_at":"2026-03-30T02:59:35.198Z","etag":null,"topics":["sqlite","sqlite-extension"],"latest_commit_sha":null,"homepage":"","language":"C","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/asg017.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2024-04-20T20:43:01.000Z","updated_at":"2026-03-30T02:02:50.000Z","dependencies_parsed_at":"2024-04-27T20:23:18.627Z","dependency_job_id":"1710514b-00b3-4e73-8b5e-12b5b5aaa5c1","html_url":"https://github.com/asg017/sqlite-vec","commit_stats":null,"previous_names":["asg017/sqlite-vec"],"tags_count":84,"template":false,"template_full_name":null,"purl":"pkg:github/asg017/sqlite-vec","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-vec","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-vec/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-vec/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-vec/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/asg017","download_url":"https://codeload.github.com/asg017/sqlite-vec/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/asg017%2Fsqlite-vec/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31259166,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-31T18:32:52.363Z","status":"ssl_error","status_checked_at":"2026-03-31T18:32:51.507Z","response_time":111,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["sqlite","sqlite-extension"],"created_at":"2024-08-03T01:00:39.410Z","updated_at":"2026-04-02T15:13:12.482Z","avatar_url":"https://github.com/asg017.png","language":"C","readme":"# `sqlite-vec`\n\n[![](https://dcbadge.vercel.app/api/server/VCtQ8cGhUs)](https://discord.gg/Ve7WeCJFXk)\n\nAn extremely small, \"fast enough\" vector search SQLite extension that runs\nanywhere! A successor to [`sqlite-vss`](https://github.com/asg017/sqlite-vss)\n\n\u003c!-- deno-fmt-ignore-start --\u003e\n\n\u003e [!IMPORTANT]\n\u003e _`sqlite-vec` is a pre-v1, so expect breaking changes!_\n\n\u003c!-- deno-fmt-ignore-end --\u003e\n\n- Store and query float, int8, and binary vectors in `vec0` virtual tables\n- Written in pure C, no dependencies, runs anywhere SQLite runs\n  (Linux/MacOS/Windows, in the browser with WASM, Raspberry Pis, etc.)\n- Store non-vector data in metadata, auxiliary, or partition key columns\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hacks.mozilla.org/2024/06/sponsoring-sqlite-vec-to-enable-more-powerful-local-ai-applications/\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/logos/mozilla.dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./.github/logos/mozilla.svg\"\u003e\n    \u003cimg alt=\"Mozilla Builders logo\" width=400\u003e\n  \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ci\u003e\n\u003ccode\u003esqlite-vec\u003c/code\u003e is a\n\u003ca href=\"https://hacks.mozilla.org/2024/06/sponsoring-sqlite-vec-to-enable-more-powerful-local-ai-applications/\"\u003eMozilla Builders project\u003c/a\u003e,\nwith additional sponsorship from\n\u003ca href=\"https://fly.io/\"\u003e\u003cimg width=14px src=\"./.github/logos/flyio.small.ico\"/\u003e Fly.io \u003c/a\u003e,\n\u003ca href=\"https://tur.so/sqlite-vec\"\u003e\u003cimg width=14px src=\"./.github/logos/turso.small.ico\"/\u003e Turso\u003c/a\u003e,\n\u003ca href=\"https://sqlitecloud.io/\"\u003e\u003cimg width=14px src=\"./.github/logos/sqlitecloud.small.svg\"/\u003e SQLite Cloud\u003c/a\u003e, and\n\u003ca href=\"https://shinkai.com/\"\u003e\u003cimg width=14px src=\"./.github/logos/shinkai.small.svg\"/\u003e Shinkai\u003c/a\u003e.\nSee \u003ca href=\"#sponsors\"\u003ethe Sponsors section\u003c/a\u003e for more details.\n\u003c/i\u003e\n\u003c/p\u003e\n\n## Installing\n\nSee [Installing `sqlite-vec`](https://alexgarcia.xyz/sqlite-vec/installation.html)\nfor more details.\n\n| Language       | Install                                              | More Info                                                                             |                                                                                                                                                                                                    |\n| -------------- | ---------------------------------------------------- | ------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Python         | `pip install sqlite-vec`                             | [`sqlite-vec` with Python](https://alexgarcia.xyz/sqlite-vec/python.html)             | [![PyPI](https://img.shields.io/pypi/v/sqlite-vec.svg?color=blue\u0026logo=python\u0026logoColor=white)](https://pypi.org/project/sqlite-vec/)                                                               |\n| Node.js        | `npm install sqlite-vec`                             | [`sqlite-vec` with Node.js](https://alexgarcia.xyz/sqlite-vec/js.html)            | [![npm](https://img.shields.io/npm/v/sqlite-vec.svg?color=green\u0026logo=nodedotjs\u0026logoColor=white)](https://www.npmjs.com/package/sqlite-vec)                                                         |\n| Ruby           | `gem install sqlite-vec`                             | [`sqlite-vec` with Ruby](https://alexgarcia.xyz/sqlite-vec/ruby.html)                 | ![Gem](https://img.shields.io/gem/v/sqlite-vec?color=red\u0026logo=rubygems\u0026logoColor=white)                                                                       |\n| Go             | `go get -u github.com/asg017/sqlite-vec/bindings/go` | [`sqlite-vec` with Go](https://alexgarcia.xyz/sqlite-vec/go.html)                     | [![Go Reference](https://pkg.go.dev/badge/github.com/asg017/sqlite-vec-go-bindings/cgo.svg)](https://pkg.go.dev/github.com/asg017/asg017/sqlite-vec-go-bindings/cgo)                                              |\n| Rust           | `cargo add sqlite-vec`                               | [`sqlite-vec` with Rust](https://alexgarcia.xyz/sqlite-vec/rust.html)                 | [![Crates.io](https://img.shields.io/crates/v/sqlite-vec?logo=rust)](https://crates.io/crates/sqlite-vec)                                                                                          |\n| Datasette      | `datasette install datasette-sqlite-vec`             | [`sqlite-vec` with Datasette](https://alexgarcia.xyz/sqlite-vec/datasette.html)       | [![Datasette](https://img.shields.io/pypi/v/datasette-sqlite-vec.svg?color=B6B6D9\u0026label=Datasette+plugin\u0026logoColor=white\u0026logo=python)](https://datasette.io/plugins/datasette-sqlite-vec)          |\n| rqlite         | `rqlited -extensions-path=sqlite-vec.tar.gz`         | [`sqlite-vec` with rqlite](https://alexgarcia.xyz/sqlite-vec/rqlite.html)                        | [![rqlite](https://img.shields.io/badge/rqlite-sqlite_extensions-blue)](https://rqlite.io/docs/guides/extensions/)           |\n| `sqlite-utils` | `sqlite-utils install sqlite-utils-sqlite-vec`       | [`sqlite-vec` with sqlite-utils](https://alexgarcia.xyz/sqlite-vec/sqlite-utils.html) | [![sqlite-utils](https://img.shields.io/pypi/v/sqlite-utils-sqlite-vec.svg?color=B6B6D9\u0026label=sqlite-utils+plugin\u0026logoColor=white\u0026logo=python)](https://datasette.io/plugins/datasette-sqlite-vec) |\n| Github Release |                                                      |                                                                                       | ![GitHub tag (latest SemVer pre-release)](https://img.shields.io/github/v/tag/asg017/sqlite-vec?color=lightgrey\u0026include_prereleases\u0026label=Github+release\u0026logo=github)                              |\n\n\n## Sample usage\n\n```sql\n.load ./vec0\n\ncreate virtual table vec_examples using vec0(\n  sample_embedding float[8]\n);\n\n-- vectors can be provided as JSON or in a compact binary format\ninsert into vec_examples(rowid, sample_embedding)\n  values\n    (1, '[-0.200, 0.250, 0.341, -0.211, 0.645, 0.935, -0.316, -0.924]'),\n    (2, '[0.443, -0.501, 0.355, -0.771, 0.707, -0.708, -0.185, 0.362]'),\n    (3, '[0.716, -0.927, 0.134, 0.052, -0.669, 0.793, -0.634, -0.162]'),\n    (4, '[-0.710, 0.330, 0.656, 0.041, -0.990, 0.726, 0.385, -0.958]');\n\n\n-- KNN style query\nselect\n  rowid,\n  distance\nfrom vec_examples\nwhere sample_embedding match '[0.890, 0.544, 0.825, 0.961, 0.358, 0.0196, 0.521, 0.175]'\norder by distance\nlimit 2;\n/*\n┌───────┬──────────────────┐\n│ rowid │     distance     │\n├───────┼──────────────────┤\n│ 2     │ 2.38687372207642 │\n│ 1     │ 2.38978505134583 │\n└───────┴──────────────────┘\n*/\n```\n\n## Sponsors\n\nDevelopment of `sqlite-vec` is supported by multiple generous sponsors! Mozilla\nis the main sponsor through the new Builders project.\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://hacks.mozilla.org/2024/06/sponsoring-sqlite-vec-to-enable-more-powerful-local-ai-applications/\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/logos/mozilla.dark.svg\"\u003e\n    \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./.github/logos/mozilla.svg\"\u003e\n    \u003cimg alt=\"Mozilla Builders logo\" width=400\u003e\n  \u003c/picture\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n`sqlite-vec` is also sponsored by the following companies:\n\n\u003ca href=\"https://fly.io/\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/logos/flyio.dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./.github/logos/flyio.svg\"\u003e\n  \u003cimg alt=\"Fly.io logo\" src=\"./.github/logos/flyio.svg\" width=\"48%\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://tur.so/sqlite-vec\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/logos/turso.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./.github/logos/turso.svg\"\u003e\n  \u003cimg alt=\"Turso logo\" src=\"./.github/logos/turso.svg\" width=\"48%\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://sqlitecloud.io/\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/logos/sqlitecloud.dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./.github/logos/sqlitecloud.svg\"\u003e\n  \u003cimg alt=\"SQLite Cloud logo\" src=\"./.github/logos/flyio.svg\" width=\"48%\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\n\u003ca href=\"https://shinkai.com\"\u003e\n\u003cpicture\u003e\n  \u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"./.github/logos/shinkai.dark.svg\"\u003e\n  \u003csource media=\"(prefers-color-scheme: light)\" srcset=\"./.github/logos/shinkai.svg\"\u003e\n\n  \u003cimg alt=\"Shinkai logo\" src=\"./.github/logos/shinkai.svg\" width=\"48%\"\u003e\n\u003c/picture\u003e\n\u003c/a\u003e\n\nAs well as multiple individual supporters on\n[Github sponsors](https://github.com/sponsors/asg017/)!\n\nIf your company interested in sponsoring `sqlite-vec` development, send me an\nemail to get more info: https://alexgarcia.xyz\n\n## See Also\n\n- [**`sqlite-ecosystem`**](https://github.com/asg017/sqlite-ecosystem), Maybe\n  more 3rd party SQLite extensions I've developed\n- [**`sqlite-rembed`**](https://github.com/asg017/sqlite-rembed), Generate text\n  embeddings from remote APIs like OpenAI/Nomic/Ollama, meant for testing and\n  SQL scripts\n- [**`sqlite-lembed`**](https://github.com/asg017/sqlite-lembed), Generate text\n  embeddings locally from embedding models in the `.gguf` format\n","funding_links":["https://github.com/sponsors/asg017/)!"],"categories":["Open Sources","C","向量数据库、向量搜索、最近邻搜索","Multidimensional data / Vectors","Repos","sqlite","Vector Databases (RAG)","extentions"],"sub_categories":["网络服务_其他"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasg017%2Fsqlite-vec","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fasg017%2Fsqlite-vec","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fasg017%2Fsqlite-vec/lists"}