Skip to main content
wobble-bibble is available as an npm package and works with all major JavaScript package managers.

Package managers

npm install wobble-bibble

Requirements

wobble-bibble requires:
  • Node.js: >=24.0.0
  • Bun: >=1.3.9 (if using Bun runtime)
The library has zero runtime dependencies and is published as an ES module with full TypeScript type definitions.

Package details

Bundle size

Lightweight with zero dependenciesSize

Type safety

Full TypeScript support with generated type definitions

License

MIT License - free for commercial and personal use

npm package

Published as wobble-bibble on npm registrynpm version

Import syntax

wobble-bibble uses named exports. Import only what you need:
import {
  getPrompt,
  getPrompts,
  getPromptIds,
  getMasterPrompt,
  getStackedPrompt,
  stackPrompts
} from 'wobble-bibble';

Verify installation

Create a test file to verify the installation:
test.ts
import { getPromptIds, validateTranslationResponse } from 'wobble-bibble';

// List available prompts
console.log('Available prompts:', getPromptIds());

// Test validation
const segments = [{ id: 'P1', text: 'نص عربي للاختبار' }];
const response = 'P1 - Arabic text for testing';
const result = validateTranslationResponse(segments, response);

console.log('Validation passed:', result.errors.length === 0);
Run with your package manager:
node test.ts
Expected output:
Available prompts: [
  'master_prompt',
  'hadith',
  'fiqh',
  'tafsir',
  'fatawa',
  'encyclopedia_mixed',
  'jarh_wa_tadil',
  'usul_al_fiqh'
]
Validation passed: true

Module format

The package is published as an ES module with the following exports:
package.json
{
  "type": "module",
  "main": "dist/index.js",
  "module": "dist/index.js",
  "types": "dist/index.d.ts",
  "exports": {
    ".": {
      "import": "./dist/index.js",
      "types": "./dist/index.d.ts"
    }
  }
}
The package uses "sideEffects": false in package.json, enabling optimal tree-shaking in bundlers like webpack, Rollup, and esbuild.

Development setup

If you want to contribute to wobble-bibble or run it from source:
1

Clone the repository

git clone https://github.com/ragaeeb/wobble-bibble.git
cd wobble-bibble
2

Install dependencies

The project uses Bun as the package manager:
bun install
3

Generate prompts

Prompts are stored as Markdown files and must be generated into TypeScript:
bun run generate
This reads prompts/*.md and creates .generated/prompts.ts.
4

Build the library

Build the TypeScript source to the dist/ directory:
bun run build
This runs TypeScript type checking and bundles with tsdown.
5

Run tests

Run the test suite:
bun test
Or test the production build:
bun run test:dist

Next steps

Quickstart

Get started with prompts and validation in 5 minutes

API reference

Explore all available functions and types

Build docs developers (and LLMs) love