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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@nebula-ai/sdk

v1.1.7

Published

Official JavaScript/TypeScript SDK for Nebula AI Memory

Readme

@nebula-ai/sdk

Persistent memory layer for AI applications. Store, search, and retrieve information with semantic understanding.

Installation

npm install @nebula-ai/sdk

Quick Start

import Nebula from '@nebula-ai/sdk';

// Initialize client
const client = new Nebula({
  apiKey: 'your-api-key'
});

// Create a collection
const collection = await client.createCluster({
  name: 'my_notes'
});

// Store a memory
const memoryId = await client.storeMemory({
  collection_id: collection.id,
  content: 'Machine learning is transforming healthcare',
  metadata: { topic: 'AI', importance: 'high' }
});

// Search memories
const results = await client.search({
  query: 'machine learning healthcare',
  collection_ids: [collection.id],
  limit: 5
});

results.forEach(result => {
  console.log(`Score: ${result.score?.toFixed(2)}`);
  console.log(`Content: ${result.content}`);
});

Core Operations

Collections

// Create
const collection = await client.createCluster({
  name: 'my_collection',
  description: 'Optional description'
});

// List
const collections = await client.listClusters();

// Get by ID or name
const collection = await client.getCluster(collectionId);
const collection = await client.getClusterByName('my_collection');

// Update
await client.updateCluster({
  collectionId,
  name: 'new_name'
});

// Delete
await client.deleteCluster(collectionId);

Store Memories

// Single memory
const memoryId = await client.storeMemory({
  collection_id: collection.id,
  content: 'Your content here',
  metadata: { category: 'example' }
});

// Batch storage
const memoryIds = await client.storeMemories([
  { collection_id: collection.id, content: 'First memory' },
  { collection_id: collection.id, content: 'Second memory' }
]);

Retrieve Memories

// List memories
const memories = await client.listMemories({
  collection_ids: [collection.id],
  limit: 10
});

// Filter with metadata
const memories = await client.listMemories({
  collection_ids: [collection.id],
  metadata_filters: {
    'metadata.category': { $eq: 'example' }
  }
});

// Get specific memory
const memory = await client.getMemory('memory-id');

Search

// Semantic search
const results = await client.search({
  query: 'your search query',
  collection_ids: [collection.id],
  limit: 10
});

Delete

// Single deletion
const deleted = await client.delete('memory-id'); // Returns boolean

// Batch deletion
const result = await client.delete(['id1', 'id2', 'id3']); // Returns detailed results

Conversations

// Store conversation messages
const conversationId = await client.storeMemory({
  collection_id: collection.id,
  content: 'What is machine learning?',
  role: 'user',
  metadata: { content_type: 'conversation' }
});

await client.storeMemory({
  collection_id: collection.id,
  content: 'Machine learning is a subset of AI...',
  role: 'assistant',
  parent_id: conversationId,
  metadata: { content_type: 'conversation' }
});

// List conversation memories
const conversations = await client.listMemories({
  collection_ids: [collection.id],
  metadata_filters: { 'metadata.content_type': { $eq: 'conversation' } }
});

// Get messages from a conversation memory
const conversation = await client.getMemory(conversationId);
const messages = conversation.chunks ?? [];

Error Handling

import Nebula, {
  NebulaAuthenticationException,
  NebulaRateLimitException,
  NebulaValidationException
} from '@nebula-ai/sdk';

try {
  await client.search({ query: 'query', collection_ids: [collectionId] });
} catch (error) {
  if (error instanceof NebulaAuthenticationException) {
    console.log('Invalid API key');
  } else if (error instanceof NebulaRateLimitException) {
    console.log('Rate limit exceeded');
  }
}

Documentation

Support

Email [email protected]