{"_id":"@codebolt/kuzu","name":"@codebolt/kuzu","dist-tags":{"latest":"0.11.3"},"versions":{"0.11.3":{"name":"@codebolt/kuzu","version":"0.11.3","description":"An in-process property graph database management system built for query speed and scalability.","main":"index.js","module":"./index.mjs","types":"./kuzu.d.ts","exports":{".":{"require":"./index.js","import":"./index.mjs","types":"./kuzu.d.ts"}},"type":"commonjs","homepage":"https://kuzudb.com/","repository":{"type":"git","url":"git+https://github.com/codeboltai/kuzu.git"},"scripts":{"install":"node install.js","test":"mocha test --timeout 20000","clean":"node clean.js","clean-all":"node clean.js all","build":"node build.js"},"author":{"name":"Kùzu Team"},"license":"MIT","optionalDependencies":{"@codebolt/kuzu-darwin-arm64":"0.11.3","@codebolt/kuzu-darwin-x64":"0.11.3","@codebolt/kuzu-linux-x64":"0.11.3","@codebolt/kuzu-linux-arm64":"0.11.3","@codebolt/kuzu-win32-x64":"0.11.3"},"devDependencies":{"chai":"^4.4.1","cmake-js":"^7.3.0","mocha":"^10.4.0","node-addon-api":"^6.0.0","tmp":"^0.2.3"},"_id":"@codebolt/kuzu@0.11.3","gitHead":"8f08fb3361a7249fa3d87ef5a6d83a5154a563aa","bugs":{"url":"https://github.com/codeboltai/kuzu/issues"},"_nodeVersion":"20.20.0","_npmVersion":"10.8.2","dist":{"integrity":"sha512-JzdOexQmhC5R+247cNR4PcbnYbXFqeRBfKpMV8OfdrqUlckGKUv6p6BX3bmXC5XKvMjqHUaaCzzhMaordiCyIQ==","shasum":"3832ea0ec13e701d46ef61815bca0a69888c37d8","tarball":"https://registry.npmjs.org/@codebolt/kuzu/-/kuzu-0.11.3.tgz","fileCount":11,"unpackedSize":49811,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQC3Gs3hXpgo7QEqrbLh4+XJeVxDmUc6J4gP2nF4Vnn7YgIhAKoN1hGiZu/lFhqQSaIiY59l8N3NWjZh5sQgLZpFIp4f"}]},"_npmUser":{"name":"utkarshx","email":"utk.shukla@gmail.com"},"directories":{},"maintainers":[{"name":"ravirawatsingh","email":"ravi@arrowai.com"},{"name":"utkarshx","email":"utk.shukla@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/kuzu_0.11.3_1772863818641_0.14245736234335893"},"_hasShrinkwrap":false}},"time":{"created":"2026-03-07T06:10:18.540Z","0.11.3":"2026-03-07T06:10:18.800Z","modified":"2026-03-07T06:10:19.061Z"},"maintainers":[{"name":"ravirawatsingh","email":"ravi@arrowai.com"},{"name":"utkarshx","email":"utk.shukla@gmail.com"}],"description":"An in-process property graph database management system built for query speed and scalability.","homepage":"https://kuzudb.com/","repository":{"type":"git","url":"git+https://github.com/codeboltai/kuzu.git"},"author":{"name":"Kùzu Team"},"bugs":{"url":"https://github.com/codeboltai/kuzu/issues"},"license":"MIT","readme":"\n# Kuzu Node.js API\n\nA high-performance graph database for knowledge-intensive applications. This Node.js wrapper enables interaction with the Kuzu database via JavaScript or TypeScript using either **CommonJS** or **ES Modules**.\n\n---\n\n## 📦 Installation\n\n```bash\nnpm install kuzu\n```\n\n---\n\n## 🚀 Quick Start\n\n### Example (ES Modules)\n\n```js\n// Import the Kùzu module (ESM)\nimport { Database, Connection } from \"kuzu\";\n\nconst main = async () => {\n  // Initialize database and connection\n  const db = new Database(\"./test\");\n  const conn = new Connection(db);\n\n  // Define schema\n  await conn.query(`\n    CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name));\n  `);\n  await conn.query(`\n    CREATE NODE TABLE City(name STRING, population INT64, PRIMARY KEY (name));\n  `);\n  await conn.query(`\n    CREATE REL TABLE Follows(FROM User TO User, since INT64);\n  `);\n  await conn.query(`\n    CREATE REL TABLE LivesIn(FROM User TO City);\n  `);\n\n  // Load data from CSV files\n  await conn.query(`COPY User FROM \"user.csv\"`);\n  await conn.query(`COPY City FROM \"city.csv\"`);\n  await conn.query(`COPY Follows FROM \"follows.csv\"`);\n  await conn.query(`COPY LivesIn FROM \"lives-in.csv\"`);\n\n  // Run a query\n  const result = await conn.query(\"MATCH (u:User) RETURN u.name, u.age;\");\n\n  // Fetch all results\n  const rows = await result.getAll();\n\n  // Output results\n  for (const row of rows) {\n    console.log(row);\n  }\n};\n\nmain().catch(console.error);\n```\n ✅ The dataset used in this example can be found in the [official Kuzu repository](https://github.com/kuzudb/kuzu/tree/master/dataset/demo-db/csv).\n\n---\n\n## 📚 API Overview\n\nThe `kuzu` package exposes the following primary classes:\n\n* `Database` – Initializes a database from a file path.\n* `Connection` – Executes queries on a connected database.\n* `QueryResult` – Provides methods like `getAll()` to retrieve results.\n\nBoth CommonJS (`require`) and ES Modules (`import`) are fully supported.\n\n---\n\n## 🛠️ Local Development (for Contributors)\n\n### Install Dev Dependencies\n\n```bash\nnpm install --include=dev\n```\n\n### Build Project\n\n```bash\nnpm run build\n```\n\n### Run Tests\n\n```bash\nnpm test\n```\n\n---\n\n## 📦 Packaging and Binary Distribution\n\nWe bundle all prebuilt binaries directly into the npm package, inspired by the approach used by [prebuildify](https://github.com/prebuild/prebuildify).\n\n>  All prebuilt binaries are shipped inside the package that is published to npm, which means there's no need for a separate download step like you find in [`prebuild`](https://github.com/prebuild/prebuild). The irony of this approach is that it is faster to download all prebuilt binaries for every platform when they are bundled than it is to download a single prebuilt binary as an install script.\n\n### Requirements (for building from source)\n\nIf a prebuilt binary is unavailable for your platform, the module will be built from source during installation. Ensure the following tools are installed:\n\n* **CMake** (≥ 3.15)\n* **Python 3**\n* A **C++20-compatible compiler**\n\n### Packaging Prebuilt Binaries\n\n1. Place your binaries inside the `prebuilt` directory.\n2. Name them using the format:\n\n   ```\n   kuzujs-${platform}-${arch}.node\n   ```\n3. Run the packaging script:\n\n```bash\nnode package\n```\n\nIf no binaries are found, a source-only tarball will be generated.\n\n---\n\n## 🚀 Publishing\n\nTo publish the package to npm:\n\n```bash\nnpm publish\n```\n\nRefer to the [npm documentation](https://docs.npmjs.com/cli/v9/commands/npm-publish) for full details on publishing and versioning.\n\n---\n\n## 🔗 Resources\n\n* [Kuzu GitHub](https://github.com/kuzudb/kuzu)\n* [Kuzu Documentation](https://docs.kuzudb.com)\n* [Issue Tracker](https://github.com/kuzudb/kuzu/issues)\n","readmeFilename":"README.md","_rev":"1-ec1197a314c533ec643427d5731ae915"}