TS

tarekraafat/skalex

开发工具

本页由 AI 翻译,技术细节请以原文为准。 查看原文

21 stars 2 forks 质量 68 趋势 18Apache-2.0

以AI为先、零依赖的JavaScript数据库。内置矢量搜索、代理内存、MCP服务器和加密。Node.js、Bun、Deno、浏览器和边缘运行时。

概览

Skalex 以单一零依赖包形式发布——无服务器、无配置、无外部服务。一 npm 安装 Skalex 于 Node.js、Bun、Deno、浏览器和 Edge 运行时。所有 AI 功能——余弦相似性搜索、带压缩的语义代理内存、通过任何大型语言模型进行 db.ask() NLP 查询,以及为 Claude Desktop 和光标提供一行 MCP 服务器——都内置于核心中,且无额外依赖。 所有数据都存放在进程的堆中——db.connect() 会加载完整数据集,实现即时、零开销访问。存储适配器控制的是数据的存储位置,而不是容量。专为单进程、本地优先且数据集能容纳在内存中的工作负载设计:AI 代理、CLI 工具、桌面应用、边缘工作工具、离线优先应用。不能替代 PostgreSQL 或 MongoDB,适用于大规模、多进程或分布式系统。 - : 安装包,其他不安装。无驱动,无 ORM,无服务器进程。- : 完整核心捆绑包为 ~28 KB 压缩包。

概述(AI 翻译)

人工智能优先 ·同构 ·零依赖 ·轻量级 ·局部优先

Skalex 将向量搜索、代理内存、自然语言查询、MCP服务器和AES-256-GCM加密**整合在一个零依赖包中——无服务器、无配置、无外部服务。一个npm install skalex支持Node.js、Bun、Deno、浏览器和边缘运行时。所有AI功能——余弦相似性搜索、带压缩的语义代理内存、通过任意LLM的db.ask()自然语言处理查询,以及Claude桌面和光标的一行MCP服务器——都内置于核心中,没有任何额外依赖。

架构 + 拟合: 所有数据都存放在您的进程堆中 - db.connect() 加载完整数据集,实现即时零开销访问。存储适配器控制数据存储位置,而非容纳多少。专为单进程、本地优先且数据集能放入内存的工作负载设计:AI 代理、CLI 工具、桌面应用、边缘工作者、离线优先应用。不能替代 PostgreSQL 或 MongoDB 用于大规模、多进程或分布式系统。


特色

零上方覆盖。最大射程。

  • 零依赖:安装包,不安装其他。不使用驱动程序,不使用ORM,不使用服务器进程。

本页由 AI 翻译,技术细节请以原文为准。

README

以下为原文 README 节选,完整内容请查看原文。

Skalex

AI-first · Isomorphic · Zero-dependency · Lightweight · Local-first

Skalex ships vector search, agent memory, natural language queries, an MCP server, and AES-256-GCM encryption in a single zero-dependency package - no server, no config, no external services. One npm install skalex on Node.js, Bun, Deno, browsers, and edge runtimes. All AI capabilities - cosine similarity search, semantic agent memory with compression, db.ask() NLP queries via any LLM, and a one-line MCP server for Claude Desktop and Cursor - are built into the core with zero additional dependencies.

Architecture + fit: all data lives in your process’s heap - db.connect() loads the full dataset for instant, zero-overhead access. Storage adapters control where data persists, not how much fits. Designed for single-process, local-first workloads where the dataset fits in RAM: AI agents, CLI tools, desktop apps, edge workers, offline-first apps. Not a replacement for PostgreSQL or MongoDB for large-scale, multi-process, or distributed systems.


Features

Zero overhead. Maximum reach.

  • Zero dependencies: install the package, nothing else. No driver, no ORM, no server process.
  • Lightweight, and staying that way: the full core bundle is ~28 KB gzipped. That is a promise, not a snapshot - a hard byte budget is enforced in CI on every push and PR, so Skalex will not quietly bloat.
  • Full build matrix: ESM, ESM minified, CJS, CJS minified, browser ESM (dist/skalex.browser.js, no node:* imports), UMD/IIFE (dist/skalex.umd.min.js, CDN default)
  • Runs everywhere: Node.js ≥18, Bun, Deno 2.x, browser (Chrome/Firefox/Safari), edge runtimes. Verified by 1,164 tests (935 unit/integration + 229 cross-runtime smoke) gated by CI on every push and PR
  • Pluggable storage: FsAdapter (Node), LocalStorageAdapter (browser), EncryptedAdapter (AES-256-GCM), or bring your own

Queries that scale with your data.

  • Full operator set: $eq $ne $gt $gte $lt $lte $in $nin $regex $fn $or $and $not
  • Dot-notation nested field queries
  • Secondary field indexes: O(1) lookups via IndexEngine
  • Unique constraints, filter pre-sorter for performance
在 GitHub 查看完整 README

安装

This server does not publish a one-line install command.

Open the repository installation guide 新手?先看 mcpskill.org 教程 →