Installation
Requirements
- Node.js 18+ (for the Node adapter and local development)
- npm 9+ (for workspaces support)
Individual runtimes have their own requirements:
- AWS Lambda — Node.js 18+ runtime
- Cloudflare Workers — compatibility check via
wrangler - Bun 1.x or Deno 2.x — no adapter needed,
app.fetchmatches natively
Quick install (scaffold)
The fastest way to start is the interactive scaffolding CLI:
bash
npm create nodalite
# or
npx nodalite createIt generates a project with all necessary dependencies pre-configured. See the Scaffolding guide for details.
Manual install
Install the core library:
bash
npm install nodalite
# or the scoped form:
npm install @nodalite/coreThen add adapters as needed:
bash
# Adapters (choose your runtime)
npm install @nodalite/adapter-node
npm install @nodalite/adapter-lambda
npm install @nodalite/adapter-edge
# Background workers (Node-only)
npm install @nodalite/workers
# Scheduler (Node-only)
npm install @nodalite/scheduler
# ML inference (optional, needs onnxruntime-node or custom engine)
npm install @nodalite/mlMonorepo setup (for contributors)
Clone the repo and install everything:
bash
git clone https://github.com/AkkilMG/nodalite.git
cd nodalite
npm installBuild every package:
bash
npm run build --workspaces --if-presentRun all tests:
bash
npm testOptional: ONNX native dependency
@nodalite/ml's onnxEngine() requires the onnxruntime-node package (~270MB native binary). It's a peer dependency — install it only if you need it:
bash
npm install onnxruntime-nodeIf you don't, Model still works with any custom InferenceEngine implementation, or you can use the WASM backend instead. See ML Inference.