Skip to main content

Installation

Prerequisites

  • Bun 1.1+ or Node.js 20+
  • For S3 backend: an AWS account with an S3 bucket
  • For GCS backend: a Google Cloud project with a GCS bucket

Monorepo Setup

If you're working from the osqueue monorepo:

git clone https://github.com/AnthonyAltieri/osqueue.git
cd osqueue
bun install
bun run build

Package Installation

For consumers, install only the packages you need:

PackageInstallUse case
@osqueue/clientnpm i @osqueue/clientSubmit and manage jobs from any service
@osqueue/workernpm i @osqueue/workerProcess jobs with typed handlers
@osqueue/brokernpm i @osqueue/brokerRun a broker server
@osqueue/storagenpm i @osqueue/storageDirect storage backend access
@osqueue/typesnpm i @osqueue/typesShared types and error classes

The client, worker, and broker packages re-export the types they need, so @osqueue/types is only required if you need error classes or storage interfaces directly.

ESM Only

All packages are ESM-only. Make sure your project is configured for ES modules:

{
"type": "module"
}

Or use .mts file extensions with TypeScript.