# alchemy

> Infrastructure as Effects for TypeScript.

Latest version **2.0.0-beta.80** (published 2026-10-02) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install alchemy
pnpm add alchemy
yarn add alchemy
bun add alchemy
```

Provides the command `alchemy`.

## Health

**Score 65/100 (B)** — status: active.

Positive: esm support; no vulnerabilities; has provenance; recently updated; high maintenance score.

Warnings: low downloads; no types; large bundle.

## Facts

| | |
|---|---|
| Version | 2.0.0-beta.80 |
| Published | 2026-10-02 |
| First published | 2014-08-04 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM |
| Dependencies | 36 |
| Unpacked size | 135.5 MB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Provenance | attested (GitHub Actions) |
| GitHub stars | 1493 |
| Author | Sam Goodwin <sam@alchemy.run> |
| Maintainers | pear-alchemy, blankparticle, sam-goodwin |
| Keywords | alchemy, effect, infrastructure-as-code |

## Links

- npm: https://www.npmjs.com/package/alchemy
- Repository: https://github.com/alchemy-run/alchemy
- Homepage: https://alchemy.run
- Issues: https://github.com/alchemy-run/alchemy/issues
- npm.io page: https://npm.io/package/alchemy

## Dependencies (36)

- [yaml](https://npm.io/package/yaml.md) ^2.9.0
- [pathe](https://npm.io/package/pathe.md) ^2.0.3
- [fflate](https://npm.io/package/fflate.md) ^0.8.3
- [capnweb](https://npm.io/package/capnweb.md) ^0.12.0
- [rolldown](https://npm.io/package/rolldown.md) 1.2.5
- [picomatch](https://npm.io/package/picomatch.md) ^4.0.4
- [tinyglobby](https://npm.io/package/tinyglobby.md) ^0.2.17
- [@prisma/dev](https://npm.io/package/@prisma/dev.md) ^0.20.0
- [@octokit/rest](https://npm.io/package/@octokit/rest.md) ^22.0.1
- [@effect/sql-d1](https://npm.io/package/@effect/sql-d1.md) ^4.0.0
- [@libsql/client](https://npm.io/package/@libsql/client.md) ^0.17.0
- [@neon/functions](https://npm.io/package/@neon/functions.md) 0.11.0
- [@octokit/webhooks](https://npm.io/package/@octokit/webhooks.md) ^14.2.0
- [@types/aws-lambda](https://npm.io/package/@types/aws-lambda.md) ^8.10.152
- [@alchemy.run/floci](https://npm.io/package/@alchemy.run/floci.md) 2.0.0-beta.80
- [@alchemy.run/sigil](https://npm.io/package/@alchemy.run/sigil.md) 0.1.0-alpha.1
- [libsodium-wrappers](https://npm.io/package/libsodium-wrappers.md) ^0.8.3
- [@distilled.cloud/aws](https://npm.io/package/@distilled.cloud/aws.md) 1.0.0-rc.13
- [@distilled.cloud/gcp](https://npm.io/package/@distilled.cloud/gcp.md) 1.0.0-rc.13
- [@distilled.cloud/acme](https://npm.io/package/@distilled.cloud/acme.md) 1.0.0-rc.13
- [@distilled.cloud/core](https://npm.io/package/@distilled.cloud/core.md) 1.0.0-rc.13
- [@distilled.cloud/neon](https://npm.io/package/@distilled.cloud/neon.md) 1.0.0-rc.13
- [@effect/sql-sqlite-do](https://npm.io/package/@effect/sql-sqlite-do.md) ^4.0.0
- [@distilled.cloud/axiom](https://npm.io/package/@distilled.cloud/axiom.md) 1.0.0-rc.13
- [@alchemy.run/node-utils](https://npm.io/package/@alchemy.run/node-utils.md) 2.0.0-beta.80
- [@distilled.cloud/fly-io](https://npm.io/package/@distilled.cloud/fly-io.md) 1.0.0-rc.13
- [@distilled.cloud/prisma](https://npm.io/package/@distilled.cloud/prisma.md) 1.0.0-rc.13
- [@distilled.cloud/stripe](https://npm.io/package/@distilled.cloud/stripe.md) 1.0.0-rc.13
- [@distilled.cloud/doppler](https://npm.io/package/@distilled.cloud/doppler.md) 1.0.0-rc.13
- [@distilled.cloud/hetzner](https://npm.io/package/@distilled.cloud/hetzner.md) 1.0.0-rc.13
- [@distilled.cloud/railway](https://npm.io/package/@distilled.cloud/railway.md) 1.0.0-rc.13
- [@distilled.cloud/zerossl](https://npm.io/package/@distilled.cloud/zerossl.md) 1.0.0-rc.13
- [@distilled.cloud/infisical](https://npm.io/package/@distilled.cloud/infisical.md) 1.0.0-rc.13
- [@distilled.cloud/cloudflare](https://npm.io/package/@distilled.cloud/cloudflare.md) 1.0.0-rc.13
- [@distilled.cloud/planetscale](https://npm.io/package/@distilled.cloud/planetscale.md) 1.0.0-rc.13
- [@alchemy.run/cloudflare-runtime](https://npm.io/package/@alchemy.run/cloudflare-runtime.md) 2.0.0-beta.80

## Recent versions

- 2.0.0-beta.80 (latest) — 2026-10-02
- 2.0.0-beta.72 (next) — 2026-08-12
- 2.0.0-beta.79 — 2026-09-18
- 2.0.0-beta.78 — 2026-09-17
- 2.0.0-beta.77 — 2026-09-09
- 2.0.0-beta.76 — 2026-08-31
- 2.0.0-beta.75 — 2026-08-30
- 2.0.0-beta.74 — 2026-08-21
- 2.0.0-beta.73 — 2026-08-21
- 2.0.0-beta.71 — 2026-08-12
- 2.0.0-beta.70 — 2026-08-06
- 2.0.0-beta.69 — 2026-08-06
- 2.0.0-beta.68 — 2026-08-06
- 2.0.0-beta.67 — 2026-08-01
- 0.94.0 — 2026-08-01
- … 358 more at https://npm.io/package/alchemy/versions

## README

<div align="center">

<a href="https://alchemy.run">
  <img src="https://raw.githubusercontent.com/alchemy-run/alchemy/main/images/readme-hero.webp" alt="Alchemy — Infrastructure as Effects" width="360" />
</a>

<br />

[![npm](https://img.shields.io/npm/v/alchemy?style=flat-square&color=3f5a2a&label=alchemy)](https://www.npmjs.com/package/alchemy)
[![license](https://img.shields.io/badge/license-Apache%202.0-3f5a2a?style=flat-square)](./LICENSE)
[![discord](https://img.shields.io/badge/discord-join-3f5a2a?style=flat-square&logo=discord&logoColor=white)](https://alchemy.run/discord)

**Infrastructure-as-Effects** — cloud infrastructure and application logic as a single, type-safe [Effect](https://effect.website) program.

[Docs](https://alchemy.run) · [Tutorial](https://alchemy.run/tutorial/part-1) · [Examples](./examples) · [Discord](https://alchemy.run/discord)

</div>

---

A Worker bound to a R2 bucket and serving objects from it:

```typescript
const Bucket = Cloudflare.R2.Bucket("bucket");

export default Cloudflare.Worker(
  "api",
  { main: import.meta.url },
  Effect.gen(function* () {
    const bucket = yield* Cloudflare.R2.ReadWriteBucket(Bucket);
    return {
      fetch: Effect.gen(function* () {
        const request = yield* HttpServerRequest;
        const object = yield* bucket.get(request.url);
        return HttpServerResponse.stream(object!.body);
      })
    };
  }).pipe(Effect.provide(Cloudflare.R2.ReadWriteBucketBinding)),
);
```

One `ReadWriteBucket(Bucket)` call wires the binding, env var, and typed client — at deploy time and at runtime.

---

- **One program, one language.** Resources, Lambdas/Workers, IAM, and SDKs live in the same Effect program — no YAML, no second runtime.
- **Bindings, not glue code.** `S3.GetObject(bucket)` wires the IAM policy, env var, and a typed SDK call in a single line.
- **Errors in the type system.** Every cloud API failure is a tagged Effect error you handle — or don't — on purpose.
- **AWS + Cloudflare today.** S3, SQS, DynamoDB, Kinesis, Lambda, EC2 / Workers, R2, D1, Durable Objects, Containers.
- **Same code, every stage.** Local dev, `plan` / `deploy`, smoke tests, and CI all share one mental model.

```sh
bun add alchemy@latest effect@rc
```

## GitHub Action

Use the root action to deploy `prod` from `main`, deploy PR previews as
`staging-{number}`, and destroy PR previews when the PR closes:

```yaml
- uses: alchemy-run/alchemy@v1
  env:
    CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
    CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
    GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```

The workflow must install the `alchemy` CLI before this action runs.

## Bootstrap with an AI coding agent

Paste this into Claude Code, Cursor, or any agent that can fetch a URL:

```
You are an Alchemy expert. Read https://alchemy.run/llms.txt to load the
full documentation index, then act as my pair on this project.

Goal: help me set up, build, test, and deploy a cloud application with
`alchemy` (Infrastructure-as-Effects, powered by Effect).

Follow the patterns from the docs and the /examples folder. Stay idiomatic
to Effect: use Layers for wiring, return Effects from lifecycle code, and
keep infra and runtime in the same program. Ask before introducing new
dependencies or breaking conventions.
```

## Learn more

- [What is Alchemy?](https://alchemy.run/what-is-alchemy) — the framework in 2 minutes
- [Getting Started](https://alchemy.run/getting-started) — your first Stack
- [Tutorial](https://alchemy.run/tutorial/part-1) — five-part walkthrough to a tested, CI-deployed app
- [Examples](./examples) — runnable projects on AWS and Cloudflare
- [llms.txt](https://alchemy.run/llms.txt) — agent-ready documentation index

> **alchemy** is in alpha. Expect breaking changes. Come hang in our [Discord](https://alchemy.run/discord).

## Credits

### Blacksmith

Thanks to [Blacksmith](https://blacksmith.sh/?ref=alchemy.run) for sponsoring our CI runners. Their fast Linux, macOS, and Windows runners help us test our packages across platforms and deploy our content-heavy website in mere minutes.

## License

Licensed under the [Apache License 2.0](./LICENSE). See
[Third-Party Licenses](./THIRD_PARTY_LICENSES.md) for code incorporated from
upstream projects.

---
_Source: https://npm.io/package/alchemy · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
