Typed TypeScript wrappers and helpers for Cloudflare bindings and APIs — one tree-shakeable module per service.
import { getBinding } from '@rtorcato/cf-common/env'
import { kv } from '@rtorcato/cf-common/kv'
export default {
async fetch(req, env) {
const store = kv(getBinding(env, 'CACHE'))
const hit = await store.getJSON<User>('u:42')
return Response.json(hit ?? { id: 42 })
},
}npm install @rtorcato/cf-commonOne module per Cloudflare service
Each lands as a typed, tree-shakeable subpath. See the roadmap for status.
Typed CloudflareError model + result helpers.
Typed env access and getBinding helpers.
Typed get/put/list with JSON + TTL helpers.
Object get/put/list, presigned URLs, multipart.
Typed query helper, batch, migration runner.
Typed producer/consumer, batch ack helpers.
Base class + typed storage accessor.
match/put wrappers with key + TTL helpers.
Typed run() per model family.
Upsert/query helpers with typed metadata.
Connection helper.
Account-level client over fetch, typed responses.
Sibling projects
More from @rtorcato — same conventions, same release pipeline.
Tree-shakeable TypeScript utilities — tiny bundles, full type safety, CLI included.
Framework-agnostic building blocks for Node.js APIs — errors, auth, rate limiting, OpenAPI, Express + Hono.
Tree-shakeable TypeScript wrappers around 40+ browser Web APIs — one subpath per spec.
Shared, tree-shakeable TypeScript database utilities for Node projects.
Published React 19 component library — shared UI primitives.
SwiftUI package of reusable views and helpers to build apps faster.
Shared Biome, TypeScript and Vitest presets that power the @rtorcato/* family.