woolball-xyz/woolball-client

Turn any open tab into an AI compute node

TypeScript

6

89 commits

updated Mar 6, 2026

See the code

README

woolball-client 🧶

npm Quality Gate Status

Turn any open tab into an AI compute node

woolball-client establishes a connection between a user's browser and a running woolball-server instance. It utilizes WebSocket to receive job requests, executes the specified model locally using WebGPU or WASM, and transmits the outcome back to the server in real-time.

⚠️ Important: Before using this library, make sure you have the woolball-server running

AI Tasks

ProviderTaskModelsStatus
Transformers.jsSpeech-to-TextONNX Models✅ Implemented
Transformers.jsText-to-SpeechONNX Models✅ Implemented
Kokoro.jsText-to-SpeechONNX Models✅ Implemented
Transformers.jsTranslationONNX Models✅ Implemented
Prompt APITranslationGemini Nano🧪 Experimental
Transformers.jsText-GenerationONNX Models✅ Implemented
WebLLMText GenerationMLC Models✅ Implemented
MediaPipeText GenerationLiteRT Models✅ Implemented
Prompt APIText GenerationGemini Nano🧪 Experimental
Transformers.jsImage-Text-to-TextONNX Models⚠️ Partial
Prompt APIImage-Text-to-TextGemini Nano🧪 Experimental

Browser API Tasks

APITaskDescriptionStatus
Canvas APICharacter-to-ImageConverts a character to an image✅ Implemented
Canvas APIHTML-to-ImageConverts HTML content to an image✅ Implemented

Quick Start

  1. Install the package:
npm install woolball-client
  1. Import and use in your code:
import Woolball from 'woolball-client';

// Initialize with a client ID
const woolball = new Woolball('your-client-id', 'ws.server.com'); // ws://localhost:9003 by default

// Listen for task events

Usage Options

Web Application

See the usage directory for a complete React-based web application example that demonstrates how to integrate the Woolball client into a web application.

Chrome Extension

A Chrome extension is available in the chrome-extension directory, allowing users to contribute their browser's computing resources to a Woolball server while browsing.

To build and use the Chrome extension:

# Build the Woolball client library
npm run build:all

# Install extension dependencies
cd chrome-extension
npm install

# Build the extension
npm run build

Then load the extension in Chrome from the chrome-extension/dist directory.

Demo Pages

Simple demo pages are available in the demo directory:

# Serve the demo pages
npm run serve:demo

Development

# Install dependencies
npm install

# Build the library
npm run build:all

# Run tests
npm test

# Run end-to-end tests
npm run test:e2e

License

This project is licensed under the MPL-2.0 License - see the LICENSE file for details.

Contributors

eduardoworrel

89 commits

woolball-xyz/woolball-client

Turn any open tab into an AI compute node

TypeScript

6

89 commits

updated Mar 6, 2026

See the code

README

woolball-client 🧶

npm Quality Gate Status

Turn any open tab into an AI compute node

woolball-client establishes a connection between a user's browser and a running woolball-server instance. It utilizes WebSocket to receive job requests, executes the specified model locally using WebGPU or WASM, and transmits the outcome back to the server in real-time.

⚠️ Important: Before using this library, make sure you have the woolball-server running

AI Tasks

ProviderTaskModelsStatus
Transformers.jsSpeech-to-TextONNX Models✅ Implemented
Transformers.jsText-to-SpeechONNX Models✅ Implemented
Kokoro.jsText-to-SpeechONNX Models✅ Implemented
Transformers.jsTranslationONNX Models✅ Implemented
Prompt APITranslationGemini Nano🧪 Experimental
Transformers.jsText-GenerationONNX Models✅ Implemented
WebLLMText GenerationMLC Models✅ Implemented
MediaPipeText GenerationLiteRT Models✅ Implemented
Prompt APIText GenerationGemini Nano🧪 Experimental
Transformers.jsImage-Text-to-TextONNX Models⚠️ Partial
Prompt APIImage-Text-to-TextGemini Nano🧪 Experimental

Browser API Tasks

APITaskDescriptionStatus
Canvas APICharacter-to-ImageConverts a character to an image✅ Implemented
Canvas APIHTML-to-ImageConverts HTML content to an image✅ Implemented

Quick Start

  1. Install the package:
npm install woolball-client
  1. Import and use in your code:
import Woolball from 'woolball-client';

// Initialize with a client ID
const woolball = new Woolball('your-client-id', 'ws.server.com'); // ws://localhost:9003 by default

// Listen for task events

Usage Options

Web Application

See the usage directory for a complete React-based web application example that demonstrates how to integrate the Woolball client into a web application.

Chrome Extension

A Chrome extension is available in the chrome-extension directory, allowing users to contribute their browser's computing resources to a Woolball server while browsing.

To build and use the Chrome extension:

# Build the Woolball client library
npm run build:all

# Install extension dependencies
cd chrome-extension
npm install

# Build the extension
npm run build

Then load the extension in Chrome from the chrome-extension/dist directory.

Demo Pages

Simple demo pages are available in the demo directory:

# Serve the demo pages
npm run serve:demo

Development

# Install dependencies
npm install

# Build the library
npm run build:all

# Run tests
npm test

# Run end-to-end tests
npm run test:e2e

License

This project is licensed under the MPL-2.0 License - see the LICENSE file for details.

Contributors

eduardoworrel

89 commits

Languages

TypeScript

99.3%