alchemy dev [options]
Run your stack in development mode with hot reloading. Resources are deployed to the cloud while Workers run in the local dev runtime; file changes trigger automatic rebuilds and hot reloads.
How it works#
dev re-runs your stack under bun --watch (or node --watch with type-stripping flags on supported Node versions) via alchemy/bin/exec.
--yes and dev mode are implied, so approval prompts never appear.
A failed apply keeps dev alive so healthy resources keep serving — fix the error and save to redeploy.
Flags#
| Option | Description |
|---|---|
--stage <name> | Stage to use for dev (defaults to $ALCHEMY_STAGE or dev_$USER) |
--force | Force updates for resources that would otherwise no-op |
--profile <name> | Auth profile to use (defaults to $ALCHEMY_PROFILE or default) |
--env-file <path> | Load environment variables from a file |
--config, -c <file> | Stack file to run (defaults to alchemy.run.ts) |
alchemy deploy defaults to live_$USER. Using a different default
here means a bare alchemy dev will not replace a stage you deployed.
Pass --stage (or $ALCHEMY_STAGE) to run local emulation against a specific
stage — including one you also deploy.
Tear the default local-dev stage down with
alchemy destroy --stage dev_$USER.
Examples#
# Start dev mode (stage dev_$USER)
alchemy dev
# Emulate the prod program locally (replaces that stage's local/live mode)
alchemy dev --stage prod
Where next#
- logs fetches past logs or tails them with
--tail - deploy — deploy for real
- Local development — how dev mode works under the hood