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

@hololand/inference

v1.0.0

Published

Unified AI inference layer - Local (Ollama/llama.cpp) + BYOK Cloud Providers

Readme

@hololand/inference

Unified AI inference layer for Hololand — Local-first with BYOK cloud fallback.

Features

  • 🏠 Local First — Ollama integration for free, private AI
  • ☁️ BYOK Cloud — Bring your own API keys (OpenAI, Anthropic, Google, Grok, Azure)
  • 🤖 HoloScript Optimized — Pre-configured Brittney models for code generation
  • 🔄 Automatic Fallback — Seamlessly switch between providers
  • 🎯 Smart Routing — Task-based model selection

Installation

npm install @hololand/inference

Quick Start

import { createInferenceClient } from '@hololand/inference';

// Create client (local-first by default)
const client = createInferenceClient({
  activeProvider: 'local',
  local: {
    enabled: true,
    ollamaUrl: 'http://localhost:11434',
    defaultModel: 'brittney-v4-expert:latest',
  },
});

// Initialize providers
await client.initialize();

// Chat with AI
const response = await client.chat({
  messages: [
    { role: 'user', content: 'Create a HoloScript scene with a spinning cube' }
  ],
});

console.log(response.content);

Streaming

// Stream responses for real-time output
for await (const chunk of client.chatStream({ messages })) {
  process.stdout.write(chunk.content);
}

BYOK Providers

Configure your own API keys to use cloud providers:

const client = createInferenceClient({
  activeProvider: 'openai',
  providers: {
    openai: {
      type: 'openai',
      apiKey: 'sk-...',
      enabled: true,
    },
    anthropic: {
      type: 'anthropic',
      apiKey: 'sk-ant-...',
      enabled: true,
    },
    google: {
      type: 'google',
      apiKey: 'AIza...',
      enabled: true,
    },
    grok: {
      type: 'grok',
      apiKey: 'grok-...',
      enabled: true,
    },
  },
  fallbackToCloud: true,
});

Supported Providers

| Provider | Type | Description | |----------|------|-------------| | Ollama | local | Local LLM inference (FREE) | | OpenAI | openai | GPT-4, GPT-4o, GPT-4o-mini | | Anthropic | anthropic | Claude 4, Claude 3.5 | | Google | google | Gemini 2.0, Gemini Pro | | Grok | grok | xAI Grok-3, Grok-2 | | Azure | azure | Azure OpenAI Service | | InfinityAssistant | infinityassistant | InfinityAssistant.io cloud |

Pre-configured Brittney Models

Optimized for HoloScript code generation:

import { BRITTNEY_MODELS } from '@hololand/inference';

// Local models (Ollama GGUF)
BRITTNEY_MODELS.local.expert    // 'brittney-v4-expert:latest'
BRITTNEY_MODELS.local.holoscript // 'brittney-v1:latest'
BRITTNEY_MODELS.local.general   // 'brittney-v2:latest'

// Cloud fine-tuned (OpenAI)
BRITTNEY_MODELS.cloud.holoscript // Fine-tuned GPT-4o-mini for HoloScript
BRITTNEY_MODELS.cloud.general    // Fine-tuned for general Brittney tasks

HoloScript Context

Pass scene context for better code generation:

const response = await client.chat({
  messages: [{ role: 'user', content: 'Add physics to the orb' }],
  holoContext: {
    currentScene: 'demo.holo',
    holograms: [
      { id: 'orb1', type: 'sphere', position: { x: 0, y: 1.5, z: -2 } }
    ],
    recentCommands: ['create orb', 'set color cyan']
  }
});

Spatial Fleet Integration

Built-in bridge for spatial fleet visualization:

import { FleetVisualizationBridge, generateFleetVisualizationHoloScript } from '@hololand/inference';

const bridge = new FleetVisualizationBridge();

// Generate HoloScript from fleet data
const holoCode = generateFleetVisualizationHoloScript(fleetData);

Status & Health

const status = await client.getStatus();

console.log(status.ready);           // true if any provider available
console.log(status.activeProvider);  // 'local'
console.log(status.providers);       // Array of provider statuses
console.log(status.localModelDownloaded); // true if Brittney model ready

API Reference

createInferenceClient(settings?)

Create a new inference client with optional settings.

client.initialize()

Initialize all configured providers. Call once before using.

client.chat(request)

Send a chat completion request. Returns InferenceResponse.

client.chatStream(request)

Stream chat responses. Returns AsyncIterable<StreamChunk>.

client.configureProvider(type, config)

Configure or update a BYOK provider at runtime.

client.getStatus()

Get status of all configured providers.

Types

import type {
  ProviderType,
  ChatMessage,
  InferenceRequest,
  InferenceResponse,
  StreamChunk,
  InferenceSettings,
} from '@hololand/inference';

License

MIT © Brian Joseph