{"id":41215778,"url":"https://github.com/alchemy-run/distilled","last_synced_at":"2026-04-02T19:55:26.099Z","repository":{"id":65342697,"uuid":"589900569","full_name":"alchemy-run/distilled","owner":"alchemy-run","description":"Effect-native SDKs for cloud providers","archived":false,"fork":false,"pushed_at":"2026-01-31T06:28:42.000Z","size":76115,"stargazers_count":271,"open_issues_count":13,"forks_count":13,"subscribers_count":5,"default_branch":"main","last_synced_at":"2026-01-31T20:11:12.819Z","etag":null,"topics":["aws","aws-sdk","cloudflare","effect","effect-ts"],"latest_commit_sha":null,"homepage":"https://distilled.cloud","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alchemy-run.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2023-01-17T07:55:58.000Z","updated_at":"2026-01-31T09:42:45.000Z","dependencies_parsed_at":"2025-07-30T22:20:01.736Z","dependency_job_id":"8778e6b6-5d41-4ce8-ab95-25630518aab7","html_url":"https://github.com/alchemy-run/distilled","commit_stats":null,"previous_names":["alchemy-run/itty-aws","sam-goodwin/itty-aws","alchemy-run/distilled-aws","alchemy-run/distilled"],"tags_count":41,"template":false,"template_full_name":null,"purl":"pkg:github/alchemy-run/distilled","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemy-run%2Fdistilled","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemy-run%2Fdistilled/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemy-run%2Fdistilled/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemy-run%2Fdistilled/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alchemy-run","download_url":"https://codeload.github.com/alchemy-run/distilled/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alchemy-run%2Fdistilled/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28974246,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T08:16:14.655Z","status":"ssl_error","status_checked_at":"2026-02-01T08:06:51.373Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-sdk","cloudflare","effect","effect-ts"],"created_at":"2026-01-23T00:01:14.279Z","updated_at":"2026-02-01T09:00:47.655Z","avatar_url":"https://github.com/alchemy-run.png","language":"TypeScript","readme":"# distilled\n\nEffect-native SDKs for cloud providers with tagged errors, retry policies and streaming pagination.\n\n```typescript\nimport * as S3 from \"distilled-aws/s3\"\n\nconst bucket = yield* S3.getBucket({\n  Bucket: \"my-bucket\"\n}).pipe(\n  Effect.catchTag(\"NoSuchBucket\", () =\u003e\n    Effect.void\n  )\n)\n```\n\n## Cloud Providers\n\nEffect-native clients for major cloud providers, with tagged errors and tree-shakeable imports.\n\n### [distilled-aws](./distilled-aws)\n\nComplete AWS SDK with typed errors for S3, Lambda, DynamoDB, SQS, and 200+ services. Every API includes documented and undocumented error codes.\n\n```bash\nnpm install distilled-aws effect @effect/platform\n```\n\n```typescript\nimport * as S3 from \"distilled-aws/s3\"\nimport * as Lambda from \"distilled-aws/lambda\"\nimport * as DynamoDB from \"distilled-aws/dynamodb\"\n\n// All operations return Effect\u003cA, TypedErrors, R\u003e\nconst result = yield* S3.getObject({\n  Bucket: \"my-bucket\",\n  Key: \"data.json\"\n}).pipe(\n  Effect.catchTag(\"NoSuchKey\", () =\u003e Effect.succeed(null))\n)\n```\n\n[Read the full documentation →](./distilled-aws/README.md)\n\n### [distilled-cloudflare](./distilled-cloudflare)\n\nCloudflare API client for Workers, R2, KV, D1, Queues, and more. Patched OpenAPI spec with complete error coverage.\n\n```bash\nnpm install distilled-cloudflare effect @effect/platform\n```\n\n```typescript\nimport * as R2 from \"distilled-cloudflare/r2\"\nimport * as Workers from \"distilled-cloudflare/workers\"\nimport * as Queues from \"distilled-cloudflare/queues\"\n\n// Typed error handling\nyield* R2.getBucket({\n  accountId: \"...\",\n  bucketName: \"my-bucket\"\n}).pipe(\n  Effect.catchTag(\"NoSuchBucket\", () =\u003e createBucket())\n)\n```\n\n[Read the full documentation →](./distilled-cloudflare/README.md)\n\n### [distilled-planetscale](./distilled-planetscale)\n\nPlanetScale MySQL serverless database client. Type-safe database management, branching, deploy requests, and schema migrations with complete error coverage.\n\n```bash\nnpm install distilled-planetscale effect @effect/platform\n```\n\n```typescript\nimport * as ps from \"distilled-planetscale\"\n\n// Database and branch management\nconst databases = yield* ps.listDatabases({ organization })\n\n// Typed error handling\nyield* ps.getDatabase({\n  organization: \"my-org\",\n  database: \"my-db\"\n}).pipe(\n  Effect.catchTag(\"GetDatabaseNotfound\", () =\u003e createDatabase())\n)\n```\n\n[Read the full documentation →](./distilled-planetscale/README.md)\n\n## Why distilled?\n\n### Tagged Errors\n\nEvery API operation has properly typed, discriminated error unions. No more guessing what went wrong.\n\n```typescript\nconst bucket = yield* S3.getBucket({\n  Bucket: \"my-bucket\"\n}).pipe(\n  Effect.catchTag(\"NoSuchBucket\", () =\u003e\n    Effect.succeed(null)\n  ),\n  Effect.catchTag(\"AccessDenied\", () =\u003e\n    Effect.fail(new AuthError())\n  )\n)\n```\n\n- Specs patched to include undocumented errors\n- Exhaustive error handling with catchTag\n- IDE autocomplete for all error tags\n\n### Retry Policies\n\nDeclarative, composable retry logic with type-safe schedules. Handle transient failures without callback hell.\n\n```typescript\nconst result = yield* S3.getObject({\n  Bucket: \"my-bucket\",\n  Key: \"data.json\"\n}).pipe(\n  Effect.retry({\n    while: (e) =\u003e e._tag === \"SlowDown\",\n    schedule: Schedule.exponential(\"100 millis\")\n  }),\n  Effect.timeout(\"5 seconds\")\n)\n```\n\n- Exponential backoff, jitter, and more\n- Retry only on specific error tags\n- Compose schedules for complex policies\n\n### Streaming Pagination\n\nPaginated APIs return Effect Streams. No manual token juggling—just iterate.\n\n```typescript\n// Stream all pages\nyield* S3.listObjectsV2\n  .pages({ Bucket: \"my-bucket\" })\n  .pipe(Stream.runForEach(Console.log))\n\n// Or stream individual items\nyield* DynamoDB.scan\n  .items({ TableName: \"users\" })\n  .pipe(Stream.runCollect)\n```\n\n- `.pages()` streams full response objects\n- `.items()` streams individual items\n- Lazy evaluation—fetch only what you need\n\n### Streaming I/O\n\nUpload and download with Effect Streams. Process data as it flows without buffering entire payloads.\n\n```typescript\n// Upload a stream\nyield* S3.putObject({\n  Bucket: \"my-bucket\",\n  Key: \"large-file.bin\",\n  Body: Stream.fromIterable(chunks),\n})\n\n// Download as a stream\nconst { Body } = yield* S3.getObject({ ... })\nconst text = yield* Body.pipe(\n  Stream.decodeText(),\n  Stream.mkString\n)\n```\n\n- `Stream\u003cUint8Array\u003e` for uploads and downloads\n- Composable with all Stream operators\n- Backpressure handled automatically\n\n### Tree-Shakeable\n\nNo monolithic client classes. Import only what you need—your bundle stays lean.\n\n```typescript\n// Only bundles getBucket and createBucket\nimport * as S3 from \"distilled-aws/s3\"\n\n// NOT this:\n// import { S3Client } from \"@aws-sdk/client-s3\"\n// new S3Client() bundles ALL 100+ operations\n```\n\n- Module-scoped functions, not class methods\n- Config via Effect Layers, not constructors\n- Perfect for serverless and edge runtimes\n\n## The Mission\n\nType-safe, tagged error specs aren't just good for developers—they're essential for AI code generation.\n\ndistilled SDKs are built to power [alchemy.run](https://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.\n\nProper error tags mean sound, reliable tooling. No more hallucinated error handling. No more runtime surprises.\n\n**AI-Ready Specs:**\n- Exhaustive error unions\n- Typed request/response schemas\n- Patched and verified specs\n- Reliable code generation\n\n## Contributing\n\nThe TDD workflow for discovering missing errors:\n\n1. Write a test that triggers an error\n2. Run the test and observe `UnknownError` / `UnknownCloudflareError`\n3. Add the error to the spec/patch file\n4. Regenerate the SDK\n5. Import the typed error class and handle it\n\nSee the individual package READMEs for detailed contribution guidelines:\n\n- [distilled-aws/README.md](./distilled-aws/README.md)\n- [distilled-cloudflare/README.md](./distilled-cloudflare/README.md)\n- [distilled-planetscale/README.md](./distilled-planetscale/README.md)\n\n## License\n\nMIT\n","funding_links":[],"categories":["TypeScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemy-run%2Fdistilled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falchemy-run%2Fdistilled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falchemy-run%2Fdistilled/lists"}