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

spres-ai

v1.0.0

Published

Official Spres AI SDK for Node.js

Readme

Node SDK

npm install axios

Quick Start

const BrainboxNodeSDK = require('./brainbox-sdk');

const sdk = new BrainboxNodeSDK(
  'http://localhost:8000',
  'your-api-key',
  'company-1'
);

// Ingest logs
const result = await sdk.ingest('logs', 'Error log content', '/var/log/app.log');
console.log(`Task ID: ${result.task_id}`);

// Chat
const response = await sdk.chat('What happened?');
console.log(`Response: ${response.response}`);

Methods

  • ingest(sourceType, content, filePath, metadata) - Queue data for ingestion
  • chat(question, sessionId) - Ask AI a question
  • getIngestStatus(taskId) - Check ingestion status
  • createChatSession(title) - Create chat session
  • healthCheck() - Check backend health

Function Locator (Built-in)

Find functions in your codebase without needing a separate tool.

Find a Specific Function

const sdk = new BrainboxNodeSDK('http://localhost:8000', 'api-key', 'company-1');

// Find login function
const loginFuncs = sdk.findFunction('login', './src');
loginFuncs.forEach(func => {
    console.log(`Found: ${func.name}`);
    console.log(`Location: ${func.file_path}:${func.line_number}`);
    console.log(`Signature: ${func.signature}`);
    console.log(`Parameters: ${func.parameters.join(', ')}`);
});

Find All Functions

// Get all functions in codebase
const allFuncs = sdk.findAllFunctions('./src');
console.log(`Total functions: ${allFuncs.length}`);

Find Functions in Specific File

// Get all functions in a file
const authFuncs = sdk.findFunctionByFile('./src/auth.js');
authFuncs.forEach(func => {
    console.log(`  ${func.name} at line ${func.line_number}`);
});

Find Async Functions

// Find all async/await functions
const asyncFuncs = sdk.findAsyncFunctions('./src');
console.log(`Found ${asyncFuncs.length} async functions`);

asyncFuncs.forEach(func => {
    console.log(`  ${func.name} (async) in ${func.file_path}`);
});

Function Info Object

const func = sdk.findFunction('login', './src')[0];

// Access function details
console.log(func.name);           // "login"
console.log(func.file_path);      // "/app/auth.js"
console.log(func.line_number);    // 45
console.log(func.signature);      // "function login(username, password)"
console.log(func.parameters);     // ["username", "password"]
console.log(func.is_async);       // false
console.log(func.language);       // "javascript"
console.log(func.class_name);     // null

// Convert to object
const funcObj = func.toObject();

Supported Languages

  • JavaScript (.js, .jsx files)
  • TypeScript (.ts, .tsx files)
  • React components

See README.md for detailed documentation.