@coji/durably
v0.15.0
Published
Step-oriented resumable batch execution for Node.js and browsers using SQLite
Downloads
748
Maintainers
Readme
@coji/durably
Steps that survive crashes. SQLite to PostgreSQL.
Documentation | GitHub | Live Demo
Note: This package is ESM-only. CommonJS is not supported.
Installation
# libSQL (recommended default)
npm install @coji/durably kysely zod @libsql/client @libsql/kysely-libsql
# PostgreSQL (multi-worker)
npm install @coji/durably kysely zod pgSee Choosing a Database for all backends.
Quick Start
import { createDurably, defineJob } from '@coji/durably'
import { z } from 'zod'
const myJob = defineJob({
name: 'my-job',
input: z.object({ id: z.string() }),
run: async (step, input) => {
await step.run('step-1', async () => {
/* ... */
})
},
})
const durably = createDurably({ dialect, jobs: { myJob } })
await durably.init() // migrate + start
await durably.jobs.myJob.trigger({ id: '123' })Documentation
For full documentation, visit coji.github.io/durably.
For LLMs / AI Agents
This package includes docs/llms.md with API documentation optimized for LLMs and coding agents. You can read it directly from node_modules/@coji/durably/docs/llms.md or access it at coji.github.io/durably/llms.txt.
License
MIT
