{"id":46492,"library":"sqlite-vec-darwin-x64","title":"sqlite-vec (macOS x64)","description":"A platform-specific binary package for the sqlite-vec vector search SQLite extension on macOS x64 systems. Version 0.1.9 (pre-1.0, active development with monthly releases). Provides fast k-means clustering and approximate nearest neighbor search as a loadable extension. Alternative to vector extensions with minimal dependencies and no external server.","status":"active","version":"0.1.9","language":"javascript","source_language":"en","source_url":"https://github.com/asg017/sqlite-vec","tags":["javascript"],"install":[{"cmd":"npm install sqlite-vec-darwin-x64","lang":"bash","label":"npm"},{"cmd":"yarn add sqlite-vec-darwin-x64","lang":"bash","label":"yarn"},{"cmd":"pnpm add sqlite-vec-darwin-x64","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"This is a platform-specific package; use the parent package 'sqlite-vec' which auto-selects the correct binary.","wrong":"import sqlite_vec from 'sqlite-vec'","symbol":"sqlite_vec","correct":"import sqlite_vec from 'sqlite-vec-darwin-x64'"},{"note":"Package may be ESM-only; CommonJS require might not work.","wrong":"const { getVectorLoadablePath } = require('sqlite-vec-darwin-x64')","symbol":"getVectorLoadablePath","correct":"import { getVectorLoadablePath } from 'sqlite-vec-darwin-x64'"},{"note":"Default export is a function to initialize the extension in Better-SQLite3.","wrong":"","symbol":"default","correct":"import sqlite_vec_init from 'sqlite-vec-darwin-x64'"}],"quickstart":{"code":"import Database from 'better-sqlite3';\nimport sqlite_vec from 'sqlite-vec-darwin-x64';\n\nconst db = new Database(':memory:');\ndb.loadExtension(sqlite_vec());\n\ndb.exec(`\n  CREATE VIRTUAL TABLE vec_items USING vec0(\n    item_id INTEGER PRIMARY KEY,\n    embedding FLOAT[8]\n  );\n`);\n\nconst insert = db.prepare('INSERT INTO vec_items(item_id, embedding) VALUES (?, ?)');\ninsert.run(1, new Float32Array([0.1, 0.2, 0.3, 0.4, 0.5, 0.6, 0.7, 0.8]));\ninsert.run(2, new Float32Array([0.9, 0.8, 0.7, 0.6, 0.5, 0.4, 0.3, 0.2]));\n\nconst rows = db.prepare(`\n  SELECT item_id, distance\n  FROM vec_items\n  WHERE embedding MATCH ?\n  ORDER BY distance\n  LIMIT 3\n`).all(new Float32Array([0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5, 0.5]));\n\nconsole.log(rows);","lang":"typescript","description":"Install the macOS x64 binary, load extension into Better-SQLite3, create a vector table, insert vectors, and perform a nearest neighbor search."},"warnings":[{"fix":"Use 'sqlite-vec' as the main package instead; it will choose the correct binary for your platform.","message":"Directly importing platform-specific package bypasses the parent package's automatic selection.","severity":"gotcha","affected_versions":">=0.1.0"},{"fix":"Pin exact version (e.g., '0.1.9') in package.json to avoid unexpected changes.","message":"Package is pre-1.0 and may introduce breaking changes in minor versions.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Watch the changelog and use versioned documentation.","message":"The 'vec0' virtual table interface may change in future releases.","severity":"deprecated","affected_versions":">=0.1.0"},{"fix":"Load the extension exactly once per database connection.","message":"Extension must be loaded before any vector usage; calling sqlite_vec() multiple times may cause errors.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'-1.0':28 '0.1.9':26 'activ':29 'altern':49 'approxim':41 'binari':10 'cluster':39 'depend':55 'develop':30 'extens':20,48,52 'extern':58 'fast':35 'javascript':60 'k':37 'k-mean':36 'loadabl':47 'maco':4,22 'mean':38 'minim':54 'month':32 'nearest':42 'neighbor':43 'packag':11 'platform':8 'platform-specif':7 'pre':27 'provid':34 'releas':33 'search':18,44 'server':59 'specif':9 'sqlite':2,15,19 'sqlite-vec':1,14 'system':24 'vec':3,16 'vector':17,51 'version':25 'x64':5,23","created_at":"2026-06-07T13:00:10.940086+00:00","updated_at":"2026-06-07T13:00:10.940086+00:00","problems":[{"fix":"Install the parent 'sqlite-vec' package which automatically picks the correct binary for the current platform.","cause":"Package not installed or platform mismatch (e.g., Linux instead of macOS).","error":"Error: Cannot find module 'sqlite-vec-darwin-x64'"},{"fix":"Call db.loadExtension(sqlite_vec()) before creating vec0 tables.","cause":"SQLite extension not loaded into the database connection.","error":"Error: The extension 'vec0' is not available"},{"fix":"Explicitly convert to Float32Array: new Float32Array([...])","cause":"Attempting to insert an array or other typed array instead of Float32Array.","error":"TypeError: embeddings must be Float32Array"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/asg017/sqlite-vec#readme","github":"https://github.com/asg017/sqlite-vec","docs":null,"changelog":null,"pypi":null,"npm":"sqlite-vec-darwin-x64","openapi_spec":null,"status_page":null,"smithery":null,"categories":["database"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-07","next_check":"2026-09-05","install_tag":null}}