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

@ai2aim.ai/hivemind-sdk

v3.1.1

Published

Node.js/TypeScript SDK for the Hivemind API

Downloads

187

Readme

@ai2aim.ai/hivemind-sdk

Node.js / TypeScript SDK for the API-key-scoped Hivemind API.

The current contract is:

  • no public organization id in request paths
  • no public employee-id surface
  • no public billing, tier, or project/content APIs
  • each API key owns its own data scope
  • the SDK only sends the matching credential type per route group: API key for scoped routes, admin key for admin routes, and webhook secret for webhook routes
  • social content generation is available through /v1/generate/social with platform-specific analysis, SEO review, and guardrail output

Install

cd sdk
npm install
npm run build

Then from another project:

npm install ../path-to/VERTEX-AI/sdk

Quick Start

import { HivemindClient } from "@ai2aim.ai/hivemind-sdk";

const client = new HivemindClient({
  baseUrl: process.env.HIVEMIND_BASE_URL!,
  apiKey: process.env.HIVEMIND_API_KEY!,
});

const health = await client.health();
const result = await client.search({
  query: "Summarize the indexed knowledge base.",
  num: 5,
});

const social = await client.generateSocialContent({
  prompt: "Promote our AI writing assistant for startup marketers.",
  platforms: ["x", "linkedin", "instagram"],
  objective: "leads",
  tone: "professional",
  writing_style: "thought_leadership",
  length: "short",
  call_to_action: "Book a demo this week.",
  primary_keyword: "AI writing assistant",
  secondary_keywords: ["startup marketing", "content workflow"],
  variation_count: 2,
});

console.log(health.status);
console.log(result.organic);
console.log(social.variants[0]?.body);

Bootstrap A New API Key Scope

const admin = new HivemindClient({
  baseUrl: process.env.HIVEMIND_BASE_URL!,
  adminKey: process.env.HIVEMIND_ADMIN_KEY!,
});

const issued = await admin.issueApiKey({
  name: "Acme Marketing",
  settings: { timezone: "UTC", brand_voice: "playful" },
});

console.log(issued.api_key);
console.log(issued.scope.name);

Main Methods

Core

client.root();
client.health();
client.adminLogin({ admin_key });

API key scope

client.issueApiKey({ name, settings });
client.getCurrentScope();
client.rotateApiKey();

Knowledge and generation

client.uploadDocument(file, "handbook.pdf");
client.search({ query: "best B2B onboarding examples", num: 5 });

client.generateVideo(params);
client.generateImage(params);
client.generateMusic(params);
client.generateSocialContent(params);
client.getJob(jobId);
client.waitForJob(jobId);

Audio, analytics, and agents

client.transcribeAudio(params);
client.synthesizeAudio(params);
client.trainModel(params);
client.predict(params);
client.forecast(params);
client.createAgent(params);
client.queryAgent(params);
client.dataChat(params);

Jira, blueprints, and managed documents

client.connectJira(params);
client.getJiraStatus();
client.syncJira(params);
client.disconnectJira();

client.createBlueprint(params);
client.listBlueprints();
client.getBlueprint(blueprintId);
client.updateBlueprint(blueprintId, params);
client.publishBlueprint(blueprintId);
client.archiveBlueprint(blueprintId);
client.deleteBlueprint(blueprintId);

client.createDocumentFromBlueprint(params);
client.listManagedDocuments();
client.getManagedDocument(documentId);
client.updateDocumentSection(documentId, params);
client.performDocumentWorkflow(documentId, params);
client.generateDocumentSection(documentId, params);
client.deleteManagedDocument(documentId);

Scraping and admin

client.getScrapingConfig();
client.scrape({ urls: ["https://example.com"] });
client.getScrapeStatus(taskId);
client.scrapeAndWait(["https://example.com"]);

client.getAdminConfig();
client.getAdminConfigOverrides();
client.updateAdminSetting({ key, value });
client.getLogLevel();
client.setLogLevel({ level: "DEBUG" });
client.getLoggers();
client.getInboundTraffic();
client.resetInboundTraffic();
client.getOutboundStatus();
client.getCors();
client.setCors("*");
client.getRateLimits();
client.resetRateLimit(scopeId);
client.listJobs();
client.getFeatureFlags();
client.getFeatureFlag(key);
client.setFeatureFlag({ key, enabled: true });
client.deleteFeatureFlag(key);
client.getMaintenanceMode();
client.setMaintenanceMode({ enabled: true, message: "Maintenance" });
client.getCacheStats();
client.flushCache();
client.getAdminAudit();
client.getSystemInfo();

CLI

After building, the hivemind binary is available.

hivemind init
hivemind config
hivemind health
hivemind helper validate
hivemind helper env
hivemind search "content marketing trends 2026"
hivemind api-key:issue "Acme Marketing"
hivemind api-key:scope
hivemind api-key:rotate
hivemind social "Launch our AI assistant for startup marketers" --platforms x,linkedin,instagram --objective leads --tone professional --style thought_leadership --keyword "AI writing assistant" --variations 2
hivemind music ambient uplifting --wait
hivemind scrape https://example.com --wait
hivemind scrape:status <task_id>
hivemind start-web

Dashboard

hivemind start-web launches a local browser dashboard with:

  • connection settings
  • API key issuance and rotation
  • search
  • document upload
  • generation jobs
  • social content generation
  • scraping
  • admin quick actions
  • manual request runner

Error Handling

All API failures throw HivemindError.

import { HivemindClient, HivemindError } from "@ai2aim.ai/hivemind-sdk";

try {
  await client.search({ query: "hello", num: 3 });
} catch (err) {
  if (err instanceof HivemindError) {
    console.error(err.statusCode, err.detail);
  }
}