npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@cubememory/sdk

v0.1.4

Published

Official JavaScript/TypeScript SDK for Cube Memory — semantic search with 100% exact recall

Readme

@cubememory/sdk

Official JavaScript/TypeScript SDK for Cube Memory — semantic search with 100% exact recall, isolated multi-tenant islands, and native MCP support.

npm version PyPI License: MIT

Install

npm install @cubememory/sdk

Quick Start

import { createCubeClient } from '@cubememory/sdk';

const cube = createCubeClient('https://cubememory.com.br/gateway', 'cm_live_YOUR_KEY');

// Semantic search — 100% exact cosine recall (no ANN approximation)
const results = await cube.index('my-docs').search('wireless headphones', { limit: 10 });

// Index a document
await cube.index('my-docs').insert({
  id: 'doc-001',
  text: 'Noise cancelling Sony WH-1000XM5',
  metadata: { price: 349, brand: 'Sony' },
});

// LLM Memory (agent remembers between sessions)
await cube.memory.store('User prefers dark mode and speaks Portuguese');
const ctx = await cube.memory.search('user preferences');

// PKM Notes
await cube.notes.upsert({ title: 'Meeting Q3', text: 'Discussed the roadmap...', tags: ['meeting'] });
const notes = await cube.notes.search('roadmap');

CDN (no bundler)

<script src="https://cubememory.com.br/sdk.js"></script>
<script>
  const cube = CubeMemory.createCubeClient('https://cubememory.com.br/gateway', 'cm_live_YOUR_KEY');
  cube.index('docs').search('hello world').then(console.log);
</script>

API Reference

createCubeClient(baseUrl, apiKey, options?)

Returns a CubeClient instance.

| Param | Type | Description | |---|---|---| | baseUrl | string | Gateway URL, e.g. https://cubememory.com.br/gateway | | apiKey | string | Your API key (cm_live_xxx) | | options.projectId | string | Project ID (proj_xxx) |


cube.index(name)

| Method | Description | |---|---| | .insert({ id, text, metadata? }) | Index a document | | .insertMany(docs[]) | Batch index | | .search(query, { limit?, threshold?, filter? }) | Semantic search | | .get(id) | Fetch by ID | | .delete(id) | Remove document | | .stats() | Index statistics |


cube.memory

Agent memory — persists context between LLM sessions.

| Method | Description | |---|---| | .store(text, layer?) | Save a memory (long-term or short-term) | | .search(query, limit?) | Semantic search over memories | | .list(limit?) | List all memories | | .delete(id) | Delete a memory |


cube.notes

PKM Notes — Obsidian-style knowledge base with AI auto-connections.

| Method | Description | |---|---| | .upsert({ title, text, tags?, id? }) | Create or update a note | | .list() | List all notes | | .get(id) | Get note with full content and related notes | | .search(query, limit?) | Semantic search across notes | | .delete(id) | Delete note and its chunks |


MCP Integration

Connect any LLM (Claude, GPT, Cursor, Windsurf) directly to your Cube Memory:

{
  "mcpServers": {
    "cube-memory": {
      "type": "http",
      "url": "https://cubememory.com.br/gateway/v1/mcp",
      "headers": {
        "Authorization": "Bearer cm_live_YOUR_KEY",
        "X-Project-Id": "proj_YOUR_PROJECT"
      }
    }
  }
}

Available MCP tools: search_memory, store_memory, list_memories, search_notes, get_note.


Python SDK

pip install cubememory
from cubememory import CubeClient

cube = CubeClient('https://cubememory.com.br/gateway', 'cm_live_YOUR_KEY', 'proj_YOUR_PROJECT')
results = cube.index('my-docs').search('wireless headphones', limit=10)

REST API (raw requests)

pip install requests
import requests

H = {
    'Authorization': 'Bearer cm_live_YOUR_KEY',
    'X-Project-Id': 'proj_YOUR_PROJECT',
}

# save a memory
requests.post('https://cubememory.com.br/gateway/v1/memory',
    headers=H, json={'text': 'user prefers short answers'})

# recall before LLM call (semantic search)
ctx = requests.post('https://cubememory.com.br/gateway/v1/memory/search',
    headers=H, json={'query': user_input, 'limit': 5}).json()
memories = [r['text_preview'] for r in ctx['results']]

Why Cube Memory?

| | Cube Memory | Bancos vetoriais baseados em ANN/HNSW | |---|:---:|:---:| | 100% exact recall | ✅ cosine float32 | ❌ ANN approximation | | Multi-tenant isolation | ✅ island per project | ⚠️ shared index with filters | | MCP native | ✅ built-in | ❌ | | Self-host footprint | ✅ minimal, single-host friendly | ❌ heavy multi-service clusters | | LGPD/GDPR | ✅ data never leaves your server | ❌ cloud by default |


Links