Skip to content
PluginStats

cactus-needle weekly downloads statistics

By afshinm · npm · AI SDKs

Local Needle tool calling and Whistle speech transcription for browsers and Node.js, standalone or with Vercel AI SDK.

View on npm Fresh · Oct 26, 2026 · data Oct 22, 2026

cactus-needle has 1,372 recorded weekly downloads on npm.

Weekly downloads
1,372
Official API · Oct 22, 2026
7-day growth
—
Insufficient history
30-day growth
—
Insufficient history
90-day growth
—
Insufficient history
Rank
—
Among tracked npm listings

About cactus-needle

cactus-needle

Local tool calling, structured extraction, embeddings, and speech transcription for JavaScript and TypeScript, powered by Needle and Whistle.

Both models run in Node.js and browsers, on the CPU in WebAssembly workers. Use the standalone API or the optional Vercel AI SDK provider. Inference needs no API key, server, or GPU.

The standalone client and AI SDK provider run Needle and Whistle in local workers.

Install

npm install cactus-needle

Environments

Choose imports for your environment. Text and speech are available in both.

EnvironmentStandaloneAI SDK provider
Node.js 22.18+cactus-needlecactus-needle/ai-sdk
Browsercactus-needle/browsercactus-needle/ai-sdk/browser

Browsers require HTTPS or localhost, WebAssembly, and module workers. Vite handles the packaged worker and WASM assets; see browser setup for other bundlers.

Capabilities

CapabilityModelStandalone methods
Tool callingNeedlecomplete(), generate(), run()
Structured extractionNeedleextract()
Text embeddingsNeedleembed()
Speech transcriptionWhistletranscribe()
Live transcriptionWhistlestream()
Audio encoder featuresWhistleembed()

The standalone examples below use Node.js imports. For browsers, import the same names from cactus-needle/browser; the methods are the same.

Tool calling

Define the actions your application supports. Needle selects tools and fills their arguments from the user's request. It is intended for tools and structured data, not general chat.

import { Needle, tool } from 'cactus-needle';

const needle = new Needle({
  tools: {
    set_lights: tool({
      description: 'Turn the lights in a room on or off.',
      inputSchema: {
        type: 'object',
        properties: { room: { type: 'string' }, on: { type: 'boolean' } },
        required: ['room', 'on'],
      },
    }),
  },
});

try {
  const result = await needle.complete('Turn on the kitchen lights');
  console.log(result.function_calls);
  // [{ name: 'set_lights', arguments: { room: 'kitchen', on: true } }]
} finally {
  await needle.close();
}

complete() and generate() return predictions. To execute them and feed results back to the model, add an execute callback to each tool and call needle.run(text).

Speech to text
import * as needle from 'cactus-needle';

try {
  console.log((await needle.transcribe('clip.wav')).text);
} finally {
  await needle.close();
}

Like Python's needle.transcribe(), this helper loads and reuses Whistle. It accepts uncompressed WAV or PCM samples, up to 30 seconds per call. In Node.js, a string names a local file; in a browser, it names an audio URL. Browsers also accept a File from a file input. Decode MP3, WebM, and other compressed formats to PCM first.

Use new Whistle() to manage your own speech session. See the speech guide for live transcription, supported languages, word timestamps, and audio features.

Model loading

Standalone constructors and shared helpers load on first use. Needle's default weights are 35.3 MB; Whistle's are 16.9 MB. Only the model you use is loaded. Missing default weights download from Hugging Face and are cached on disk in Node.js, or in browser storage when available.

Keep an instance while your application needs it, then call close(). Changing tools on that instance keeps the model loaded. Top-level transcribe(), stream(), and extract() share default models; top-level close() releases them.

For custom weights, offline use, and the eager createNeedle() / createWhistle() factories, see Node.js loading or browser loading.

Vercel AI SDK

An optional integration for the same local models. Supports AI SDK 6 and 7. Standalone users do not need ai.

Install the SDK and, for this example, Zod:

npm install ai zod

In Node.js, provision weights before using the provider:

import { generateText } from 'ai';
import { downloadModel } from 'cactus-needle';
import { createNeedle } from 'cactus-needle/ai-sdk';
import { z } from 'zod';

const modelPath = await downloadModel();
const needle = createNeedle({ modelPath });

const { toolCalls } = await generateText({
  model: needle('needle3'),
  tools: {
    set_lights: {
      description: 'Turn the lights in a room on or off.',
      inputSchema: z.object({ room: z.string(), on: z.boolean() }),
    },
  },
  prompt: 'Turn on the kitchen lights',
});

console.log(toolCalls);

In browsers, import createNeedle from cactus-needle/ai-sdk/browser and use createNeedle(); default weights download and cache on first use. The provider creates and closes a worker for each SDK request.

The adapter supports tool calling, structured output, text embeddings, and batch transcription through needle.transcriptionModel('whistle'). It accepts one user turn plus optional system messages; text streaming is buffered. Use the standalone API for tool loops and live audio. See the AI SDK guide for examples.

Documentation

License

Apache-2.0. An independent wrapper for Cactus Compute's Needle and Whistle. See LICENSE, NOTICE, and the upstream license.

Description from the npm listing.

  • needle
  • whistle
  • local-ai
  • wasm
  • tool-calling
  • embeddings
  • speech-to-text
  • offline
  • ai-sdk
  • vercel

README badge

Show your rank in a README or on your website. The badge updates automatically.

Charts

Images: 30d · 1y · all time · 1600×900 dark

Adoption over time

cactus-needle weekly downloads on npm, last 90 days: 1,372 weekly downloads as of Oct 22, 2026.cactus-needleWeekly downloads on npm · Last 90 days1,372downloads / week1.2K1.3K1.3K1.4K1.4K1.5K1.5K1.6KJul 24Aug 8Aug 23Sep 7Sep 22Oct 7Oct 22downloads / weekOct 22, 2026 – Oct 22, 2026 · 1 observations · Updated Oct 22, 2026pluginstats.com
cactus-needle weekly downloads on npm, last 90 days: 1,372 weekly downloads as of Oct 22, 2026.

7/30/90-day growth

cactus-needle weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.cactus-needleWeekly downloads growth on npm1,372downloads / week now7-day growthinsufficient historyInsufficient history30-day growthinsufficient historyInsufficient history90-day growthinsufficient historyInsufficient historyGrowth vs. nearest observation to each baseline date · Updated Oct 22, 2026pluginstats.com
cactus-needle weekly downloads growth on npm: 7-day growth unavailable, 30-day growth unavailable, 90-day growth unavailable.

Ranking history

cactus-needle has no ranking history on npm yet.cactus-needlenpm ranking · by weekly downloads · Last 90 daysNo ranking observations in this periodno observations · 0 observations · Updated Oct 22, 2026pluginstats.com
cactus-needle has no ranking history on npm yet.

Listing placement

All npm2,577 listings · 129 pages · 1,289 shown · page 78, #19 (overall #1,559)
All npm: every listing in weekly downloads order

Listing placement

AI SDKs284 listings · 15 pages · page 7, #14 (overall #134)
AI SDKs: every listing in weekly downloads order

Filled points are observed values; hollow points come from Internet Archive snapshots of the listing page. Dashed segments span periods with no observations — values between points are not interpolated.

Each band is one page of 20. Weekly downloads on a linear scale. Placement is projected from weekly downloads, so it can differ from the marketplace's own sort order. Hover a dot to see the listing.

Recent observations

Full history (1)
Recent weekly downloads observations for cactus-needle
Date (UTC)Weekly downloadsChange vs. previous
1,372—

Similar npm AI SDKs plugins

All 20 cactus-needle alternatives

Data source

Weekly downloads (trailing 7 complete days) come from the official npm downloads API. Downloads include CI and mirrors and are not equivalent to installs or users. npm publishes no ratings.

Listing: https://www.npmjs.com/package/cactus-needle. First seen Oct 26, 2026; last successful collection Oct 26, 2026. See the methodology.