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

@boole/boole

v0.2.0

Published

Local-first LLM inference SDK for JavaScript & TypeScript. Run GGUF models on your own hardware via llama.cpp, with an App/Function/Sandbox API and a 10x cost cut over always-remote inference.

Readme

Boole

Local-first LLM inference for JavaScript & TypeScript. Run GGUF models on your own hardware via llama.cpp — get cloud-SDK ergonomics without the cloud bill.

npm version license node

npm install @boole/boole

Why Boole

Most inference SDKs assume every call leaves your machine. You pay per token, per second of GPU time, per cold start — even for workloads your own laptop or workstation could handle in milliseconds. Boole flips the default: inference runs locally unless you tell it not to.

  • ~10x cheaper by default — no metered API calls for work your hardware can already do.
  • No cold starts — models load once into a long-lived local process, not a fresh container on every request.
  • No data leaves your machine — prompts, context, and outputs stay local unless you explicitly opt into remote burst.
  • Familiar shapeApp, Function, and Sandbox primitives will feel immediately natural if you've used a serverless inference SDK before.
  • Burst when you need to — for models too large for local hardware, or workloads that need to scale past one machine, the same function can transparently hand off to remote compute (opt-in, v1).

Quickstart

import { App } from "@boole/boole";

const app = new App({ name: "my-app" });

const generate = app.function(
  { model: "TheBloke/Mistral-7B-Instruct-v0.2-GGUF", quant: "Q4_K_M" },
  async (ctx, prompt: string) => ctx.llm.generate(prompt),
);

const result = await generate.call("Write a haiku about GPUs");
console.log(result);

The first call downloads and caches the GGUF weights to ~/.boole/models; every call after that loads from disk and runs entirely on your machine.

Core concepts

| Primitive | What it does | |---|---| | App | Top-level container that groups functions and shared config. | | Function | A typed, callable unit of inference work, bound to a specific model. | | Sandbox | An isolated local execution context for running arbitrary code with resource limits (timeout, memory cap). | | Client | SDK entry point — model cache directory, default backend, auth for future remote mode. | | RemoteBurst (opt-in) | Routes a Function call to remote compute when local hardware can't handle it. |

Streaming generation

for await (const token of ctx.llm.stream(prompt)) {
  process.stdout.write(token);
}

Running untrusted code in a Sandbox

const sandbox = app.sandbox({ timeoutMs: 5000, memoryLimitMb: 512 });
const { stdout } = await sandbox.exec("node", ["-e", "console.log(1 + 1)"]);

Platform support

Boole uses native bindings (via node-llama-cpp) to talk to llama.cpp directly, with GPU offload where available.

| Platform | CPU | GPU acceleration | |---|---|---| | macOS (Apple Silicon) | ✅ | ✅ Metal | | macOS (Intel) | ✅ | — | | Linux (x64/arm64) | ✅ | ✅ CUDA / Vulkan | | Windows (x64) | ✅ | ✅ CUDA / Vulkan |

Prebuilt binaries are used where available; unsupported platform/architecture combinations fall back to compiling from source on install.

Configuration

import { Client } from "@boole/boole";

const client = new Client({
  modelCacheDir: "~/.boole/models", // where GGUF files are stored
  defaultBackend: "llama-cpp",      // inference backend
});

Roadmap

  • [x] Local inference via llama.cpp / GGUF
  • [x] App / Function / Sandbox primitives
  • [ ] RemoteBurst — opt-in remote fallback for oversized models / scaled workloads
  • [ ] Structured output / grammar-constrained generation helpers
  • [ ] Bun runtime support

Contributing

Issues and PRs welcome. See CONTRIBUTING.md for local dev setup (pnpm install, pnpm test, pnpm build).