distilled.cloud

Effect-native SDKs for cloud providers

Type-safe. Tree-shakeable. Properly tagged errors.

import * as S3 from "distilled-aws/s3"

const bucket = yield* S3.getBucket({
  Bucket: "my-bucket"
}).pipe(
  Effect.catchTag("NoSuchBucket", () =>
    Effect.succeed(null)
  )
)

SDKs

Effect-native clients for major cloud providers, with properly tagged errors and tree-shakeable imports.

distilled-aws

Complete AWS SDK with typed errors for S3, Lambda, DynamoDB, SQS, and 200+ services. Every API includes documented and undocumented error codes.

distilled-cloudflare

Cloudflare API client for Workers, R2, KV, D1, Queues, and more. Patched OpenAPI spec with complete error coverage.

distilled-planetscale

PlanetScale MySQL serverless database client. Type-safe queries with proper connection and query error handling.

distilled-neon Coming Soon

Neon serverless Postgres client. Branching, autoscaling, and type-safe database operations with complete error coverage.

distilled-azure Coming Soon

Azure cloud services SDK. Blob Storage, Functions, Cosmos DB, and more with properly tagged errors.

distilled-gcp Coming Soon

Google Cloud Platform SDK. Cloud Storage, Cloud Functions, BigQuery, and Firestore with typed error handling.

The Problem

Cloud APIs are notoriously under-documented

Every cloud provider ships incomplete specs. Errors are discovered at runtime, not compile time.

Missing Error Codes

APIs return cryptic error codes that aren't in the documentation. You only discover them in production.

Incomplete Specs

OpenAPI and Smithy specs are missing properties, wrong types, or outdated. The docs lie.

Runtime Surprises

Errors you can't catch because they're not in the types. Your "exhaustive" switch statement isn't.

Bundle Bloat

Import one function, bundle hundreds. Class-based SDKs can't tree-shake.

Why distilled?

Cloud SDKs built for modern TypeScript applications

Tagged Errors

Every API operation has properly typed, discriminated error unions. No more guessing what went wrong.

  • Specs patched to include undocumented errors
  • Discriminated unions for exhaustive handling
  • IDE autocomplete for all error tags
const bucket = yield* S3.getBucket({
  Bucket: "my-bucket"
}).pipe(
  Effect.catchTag("NoSuchBucket", () =>
    Effect.succeed(null)
  ),
  Effect.catchTag("AccessDenied", () =>
    Effect.fail(new AuthError())
  )
)

Tree-Shakeable

No monolithic client classes. Import only what you need—your bundle stays lean.

  • Module-scoped functions, not class methods
  • Config via Effect Layers, not constructors
  • Perfect for serverless and edge runtimes
// Only bundles getBucket and createBucket
import * as S3 from "distilled-aws/s3"

// NOT this:
// import { S3Client } from "@aws-sdk/client-s3"
// new S3Client() bundles ALL 100+ operations

Effect-Native

Built from the ground up with Effect. Automatic retries, composable error handling, and type-safe concurrency.

  • First-class Effect integration
  • Automatic retries with Schedule
  • Structured concurrency out of the box
const result = yield* S3.getBucket({
  Bucket: "my-bucket"
}).pipe(
  Effect.retry(
    Schedule.exponential("100 millis").pipe(
      Schedule.compose(Schedule.recurs(3))
    )
  ),
  Effect.timeout("5 seconds")
)

The Mission

Documenting the world's APIs for AI

Type-safe, properly tagged error specs aren't just good for developers—they're essential for AI code generation.

distilled SDKs are built to power alchemy.run—next-generation Infrastructure-as-Code in native TypeScript. When AI generates infrastructure code, it needs to know every possible error and how to handle it.

Proper error tags mean sound, reliable tooling. No more hallucinated error handling. No more runtime surprises.

AI-Ready Specs
Exhaustive error unions
Typed request/response schemas
Patched and verified specs
Reliable code generation