Open-source Grok Bot alternative for named AI teammates. Local-first desktop, web, and mobile clients with per-bot tools, instructions, and memory. Independent fork of T3 Code.
---
title: Setup
description: Install Alchemy, create a Cloudflare account, and connect the two — OAuth or API token, saved to a local profile. No environment variables required.
---
import { Code, Tabs, TabItem } from "@astrojs/starlight/components";
import { effectVersion } from "../../../versions";
export const pkgs = `"alchemy@next" "effect@${effectVersion}" "@effect/platform-bun@${effectVersion}" "@effect/platform-node@${effectVersion}"`;
Everything you need before deploying to Cloudflare: the alchemy
package, a Cloudflare account, and stored credentials.
## Install
Install <code>alchemy@next</code> and <code>effect@{effectVersion}</code>
in your project:
<Tabs syncKey="pkgManager">
<TabItem label="bun" icon="bun">
<Code code={`bun add ${pkgs}`} lang="sh" />
</TabItem>
<TabItem label="npm" icon="npm">
<Code code={`npm install ${pkgs}`} lang="sh" />
</TabItem>
<TabItem label="pnpm" icon="pnpm">
<Code code={`pnpm add ${pkgs}`} lang="sh" />
</TabItem>
<TabItem label="yarn" icon="seti:yarn">
<Code code={`yarn add ${pkgs}`} lang="sh" />
</TabItem>
</Tabs>
:::tip
We recommend [Bun](https://bun.sh) for the best development
experience, but Node.js 22+ works too.
:::
## Create a Cloudflare account
If you don't have one yet,
[sign up for Cloudflare](https://dash.cloudflare.com/sign-up) — the
free plan is enough for everything in the tutorial.
## Connect alchemy to Cloudflare
There is no separate credentials step. The first time you run
`alchemy deploy` (or `plan`, `dev`, `destroy`), alchemy walks each
provider registered in your stack through an interactive login. For
Cloudflare you can:
- **Sign in with OAuth** — opens the browser, no tokens to manage.
- **Paste an API token** — if you prefer explicit, scoped tokens.
The OAuth flow asks whether you want to customize scopes — answer
yes to pick exactly which ones to grant at a multiselect prompt (the
default set covers typical use).
Either way the result is saved to your **`default`**
[profile](/environments/profiles) at `~/.alchemy/profiles.json` — no
environment variables and no `wrangler login` required.
To run the flow explicitly, or re-run it later:
```sh
# Refresh credentials for the current profile
alchemy login
# Re-run the interactive setup (e.g. switch from OAuth → API token)
alchemy login --configure
```
`login` imports your stack file to discover which providers are
needed, so the prompts match the providers you actually use.
## Profiles
A profile is a named bundle of credentials. Every command uses the
profile named `default` unless you pass `--profile <name>` or set
`$ALCHEMY_PROFILE` — handy for separating work and personal
accounts, or staging and prod credentials:
```sh
# Log into a separate profile
alchemy login --profile prod --configure
# Deploy with it
alchemy deploy --stage prod --profile prod
```
Inspect what's stored (credentials are redacted) with:
```sh
alchemy profile show
```
See [Profiles](/environments/profiles) for the full picture.
:::note[Running in CI?]
CI environments can't do interactive logins. There, alchemy reads
credentials from the environment instead: `CLOUDFLARE_ACCOUNT_ID`
plus either `CLOUDFLARE_API_TOKEN` or `CLOUDFLARE_API_KEY` +
`CLOUDFLARE_EMAIL`. See the [CI guide](/environments/ci) for the full
GitHub Actions setup.
:::
## Where next
- [Tutorial part 1](/cloudflare/tutorial/part-1) — create a Stack,
deploy your first resource.
- [Cloudflare overview](/cloudflare) — the map of resources and
guides.
- [Secrets & env](/cloudflare/security/secrets-env) — wire `.env` values and
secrets into your Workers (deploy credentials live in your profile;
app secrets are bindings).