@wyreup/core
v2.0.3
Published
Privacy-first, browser-native tool library — compress, convert, redact, and more. Every tool runs on-device.
Maintainers
Readme
@wyreup/core
Privacy-first, browser-native tool library. Tools for images, PDFs, audio, and text — every operation runs on-device using WebAssembly and browser-native APIs. Nothing uploads.
Install
npm install @wyreup/coreRequires Node >= 22.13.0. Ships browser and Node builds. Individual tools also require the browser or native capabilities used by their runtime adapters.
Model tools require the optional official runtime:
npm install @huggingface/transformers@^4.3.1When upgrading an existing installation, update its transitive lockfile entries, then reinstall. An old lockfile can retain vulnerable native dependencies even after the top-level Wyreup version changes. The patched model graph requires Transformers.js >= 4.3.1, onnxruntime-node >= 1.30.0, sharp >= 0.35.5, adm-zip >= 0.6.1 and global-agent >= 4.1.3. Check nested installed versions and run your package manager's full dependency audit.
OpenPGP migration
PGP tools use OpenPGP.js 6. Standard v4 keys, armored and binary messages, passphrase-protected keys and detached signatures remain supported. Legacy experimental v5 key packets are rejected; they are different from standard v4 keys generated by OpenPGP.js 5. Migrate legacy v5 material with a trusted local PGP application before upgrading. Do not enable experimental v5 parsing as a workaround. Keep existing key backups until you have verified the migration.
Usage
import { createDefaultRegistry } from '@wyreup/core';
import { readFile } from 'node:fs/promises';
import { randomUUID } from 'node:crypto';
const registry = createDefaultRegistry();
const tool = registry.toolsById.get('compress');
// Read input file
const bytes = await readFile('photo.jpg');
const input = new File([bytes], 'photo.jpg', { type: 'image/jpeg' });
// Run the tool
const ctx = {
onProgress: () => {},
signal: new AbortController().signal,
cache: new Map(),
executionId: randomUUID(),
};
const result = await tool.run([input], { quality: 80 }, ctx);
// result is a Blob or Blob[]Chain tools
import { createDefaultRegistry, runChain, parseChainString } from '@wyreup/core';
import { randomUUID } from 'node:crypto';
const registry = createDefaultRegistry();
const chain = parseChainString('strip-exif|compress[quality=75]');
const ctx = {
onProgress: () => {},
signal: new AbortController().signal,
cache: new Map(),
executionId: randomUUID(),
};
const outputs = await runChain(chain, [inputFile], ctx, registry);
// outputs is Blob[]Available tool categories
- Image — compress, convert, crop, resize, rotate, flip, watermark, face-blur, strip-exif, image-diff, OCR, SVG rendering, favicon, color palette, color-blind simulation, background removal, 2× upscale, image captioning
- PDF — merge, split, compress, rotate, reorder, extract/delete pages, extract images, page numbers, encrypt/decrypt, redact, extract tables/text, convert to/from images, watermark, metadata, prompt-injection scan
- Audio + video — transcribe (Whisper), audio enhance, convert, extract, trim, record, video concat/crossfade/overlay/color, video to GIF, burn subtitles
- Text — diff, redact, suspicious-scan, confusable detection, template (mustache), summarise, translate, sentiment, NER, stats, readability, unicode info/normalize, Markdown and HTML conversion
- Dev — JSON (format, diff, merge, flatten, path, schema infer/validate), YAML, XML ↔ JSON, SQL/CSS/HTML formatting, CSS/HTML minify, regex, JWT decode, OpenAPI / package.json validation
- Security & auth — hash, hmac, base32/58/64, TOTP/HOTP, JWT sign, signed URLs, signed cookies, backup codes, API/license keys, OTP-auth URIs, webhook verify/replay, file fingerprint
- Privacy — strip EXIF, face blur, PGP encrypt/decrypt/sign/verify/armor
- Data — CSV (info, dedupe, merge, diff, schema, template/mail-merge), Excel ↔ CSV/JSON, GeoJSON ↔ KML/GPX/shapefile, geo conversion
- Create — QR codes, barcodes, UUIDs, secure passwords, lorem ipsum, slugs
- Finance — compound interest, dollar-cost averaging, percentages, dates
Full catalog: wyreup.com/tools
Dual build
@wyreup/core ships two builds:
dist/browser/index.js— for browser and bundler environments (uses WebAssembly workers)dist/node/index.js— for Node and CLI environments
Your bundler resolves the right one automatically via the exports map.
More
- wyreup.com — try every tool in the browser
- CLI (@wyreup/cli) — shell interface
- MCP server (@wyreup/mcp) — agent interface
- GitHub
License
MIT
