GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Alchemy
  • Docs
  • Reference
  • Blog
  • Compare
  • GitHub
  • Discord
  • CLI
  • Domain
  • AWSlambda · ECS · S3 · DynamoDB
  • Cloudflareworkers · durable objects · R2 · D1
  • Flyapps · machines · volumes
  • GCPcloud run · storage · pub/sub
  • Hetznerservers · networks · volumes

This view

  • Original page
  • New address

GeezerVison is showing alchemy.run — Getting started

Getting started

Tip

Want the idea before the install? What is Alchemy? explains the model in a few minutes. Otherwise, read on and it’s the next page.

Prerequisites

Section titled “Prerequisites”
  • Node.js 24.11.1+ or Bun
  • A Cloudflare account

Create a project

Section titled “Create a project”
  • pnpm
  • bun
  • npm
  • yarn
Terminal window
mkdir my-app && cd my-app && pnpm init
Terminal window
mkdir my-app && cd my-app && bun init -y
Terminal window
mkdir my-app && cd my-app && npm init -y
Terminal window
mkdir my-app && cd my-app && yarn init -y

Install

Section titled “Install”
  • pnpm
  • bun
  • npm
  • yarn
Terminal window
pnpm add alchemy@latest @alchemy.run/cloudflare@latest effect @effect/platform-bun @effect/platform-node
Terminal window
bun add alchemy@latest @alchemy.run/cloudflare@latest effect @effect/platform-bun @effect/platform-node
Terminal window
npm install alchemy@latest @alchemy.run/cloudflare@latest effect @effect/platform-bun @effect/platform-node
Terminal window
yarn add alchemy@latest @alchemy.run/cloudflare@latest effect @effect/platform-bun @effect/platform-node

Create your Stack

Section titled “Create your Stack”

Every Alchemy program starts with a Stack — create alchemy.run.ts:

alchemy.run.ts
import * as Alchemy from "alchemy";
import * as Cloudflare from "@alchemy.run/cloudflare";
import * as Effect from "effect/Effect";
export default Alchemy.Stack(
"MyApp",
{
providers: Cloudflare.providers(),
state: Cloudflare.state(),
},
Effect.gen(function* () {
const bucket = yield* Cloudflare.R2.Bucket("Bucket");
return {
bucketName: bucket.bucketName,
};
}),
);

Deploy

Section titled “Deploy”

Run alchemy deploy to create the Bucket on Cloudflare:

  • pnpm
  • bun
  • npm
  • yarn
Terminal window
pnpm alchemy deploy
Terminal window
bun alchemy deploy
Terminal window
npx alchemy deploy
Terminal window
yarn alchemy deploy

Connect Cloudflare first with alchemy profile edit --add Cloudflare. Sign in with OAuth in the browser or paste an API token. The credentials are saved to your default profile at ~/.alchemy/profiles.json. No environment variables required. Logging in only ever happens through the profile command; a deploy with nothing configured fails with the exact command to run.

Once you’re authenticated, Alchemy shows a plan, asks for confirmation, and provisions the resource:

Plan: 1 to create
+ Bucket (Cloudflare.R2.Bucket)

Proceed?
◉ Yes ○ No
✓ Bucket (Cloudflare.R2.Bucket) created
{
  bucketName: "myapp-bucket-a1b2c3d4e5",
}

That’s it — you have a live R2 Bucket on Cloudflare.

Full command reference: CLI.

Tip

To re-run the credential prompt later (e.g. to switch from OAuth to an API token), use alchemy profile edit --reconfigure Cloudflare. For a separate profile, run alchemy profile create prod followed by alchemy profile edit --profile prod. See Profiles for the full picture.

Where next

Section titled “Where next”

You have a live Stack. What is Alchemy? explains what just happened and the model the rest of the docs build on. The tutorial then builds a full app on Cloudflare, starting from this exact Stack.

What is Alchemy?Your infrastructure and the code that runs on it, built with Effects and Layers.TutorialBuild a full app on Cloudflare starting from this Stack: a Worker, bindings, tests, local dev, CI, and telemetry.Infrastructure as EffectsThe model the rest of the docs build on: Runtimes, Bindings, Layers, and the Construction and Runtime phases.CloudflareWorkers, Durable Objects, R2, KV, D1, Queues, Workflows, and Containers, with a tutorial and a guide for each.AWSLambda, S3, SQS, DynamoDB, EC2, ECS, and EKS, with a tutorial and a guide for each.CLIEvery command and its flags: deploy, plan, destroy, dev, tail, logs, and state.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.