Alchemy’s CLI provides a convenient way to manage your infrastructure and create new projects.
deploy
Section titled “deploy”alchemy deploy [script] [options]
Deploy an Alchemy project by running alchemy deploy
.
script
(optional): Path to the entrypoint file. Defaults to./alchemy.run.ts
or./alchemy.run.js
--app
- (optional) Specify which application to deploy. Defaults to all apps.--stage
- Specify which stage/environment to target. Defaults to your username ($USER
, or$USERNAME
on Windows)--profile
- The Alchemy profile to use for authoriziing requests (default:default
)--env-file
- Path to environment file to load--watch
- Watch for changes to infrastructure and redeploy automatically (default: false)--force
- Apply updates to resources even if there are no changes (default: false)--adopt
- Adopt existing resources that are not yet managed by your Alchemy app (default: false)--cwd
- Path to the project directory (defaults to current directory)--quiet
- Suppress Create/Update/Delete messages (default:false
)-h, --help
- Display help for command
destroy
Section titled “destroy”alchemy destroy [script] [options]
Destroy all resources in an Alchemy project.
script
(optional): Path to the entrypoint file. Defaults to./alchemy.run.ts
or./alchemy.run.js
--app
- (optional) Specify which application to deploy. Defaults to all apps.--stage
- Specify which stage/environment to target. Defaults to your username ($USER
, or$USERNAME
on Windows)--profile
- The Alchemy profile to use for authoriziing requests (default:default
)--cwd
- Path to the project directory (defaults to current directory)--quiet
- Suppress Create/Update/Delete messages (default:false
)--env-file
- Path to environment file to load-h, --help
- Display help for command
alchemy dev [script] [options]
Run an Alchemy program in dev-mode with local simulation and hot reloading.
script
(optional): Path to the entrypoint file. Defaults to./alchemy.run.ts
or./alchemy.run.js
--app
- (optional) Specify which application to deploy. Defaults to all apps.--stage
- Specify which stage/environment to target. Defaults to your username ($USER
, or$USERNAME
on Windows)--profile
- The Alchemy profile to use for authoriziing requests (default:default
)--env-file
- Path to environment file to load--force
- Apply updates to resources even if there are no changes (default: false)--adopt
- Adopt existing resources that are not yet managed by your Alchemy app (default: false)--cwd
- Path to the project directory (defaults to current directory)--quiet
- Suppress Create/Update/Delete messages (default:false
)-h, --help
- Display help for command
alchemy run [script] [options]
Run an Alchemy program with read-only access to your infrastructure. No changes will be applied to your resources.
script
(optional): Path to the entrypoint file. Defaults to./alchemy.run.ts
or./alchemy.run.js
--app
- (optional) Specify which application to deploy. Defaults to all apps.--stage
- Specify which stage/environment to target. Defaults to your username ($USER
, or$USERNAME
on Windows)--profile
- The Alchemy profile to use for authoriziing requests (default:default
)--env-file
- Path to environment file to load--watch
- Watch for changes to infrastructure and redeploy automatically (default:false
)--cwd
- Path to the project directory (defaults to current directory)--quiet
- Suppress Create/Update/Delete messages (default:false
)-h, --help
- Display help for command
create
Section titled “create”alchemy create [name] [options]
Create a new Alchemy project from a template.
name
(optional): Project name or path--template
- Project template type (choices: “typescript”, “vite”, “bun-spa”, “astro”, “react-router”, “sveltekit”, “tanstack-start”, “rwsdk”, “nuxt”)--yes
- Skip prompts and use defaults (default:false
)--overwrite
- Overwrite existing directory (default:false
)--install
- Install dependencies after scaffolding--pm
- Package manager to use (choices: “bun”, “npm”, “pnpm”, “yarn”, “deno”)--vibe-rules
- Setup vibe-rules for the specified editor (choices: “cursor”, “windsurf”, “vscode”, “zed”, “claude-code”, “gemini”, “codex”, “amp”, “clinerules”, “roo”, “unified”)-h, --help
- Display help for command
alchemy init [options]
Initialize Alchemy in an existing project. This command adds Alchemy infrastructure to projects that were created using other tools (like bun init
, vite create
, npm create astro
, etc.).
--framework
- Force a specific framework instead of auto-detection (choices: “typescript”, “vite”, “bun-spa”, “astro”, “react-router”, “sveltekit”, “tanstack-start”, “rwsdk”, “nuxt”, “nextjs”)--yes
- Skip prompts and use defaults (default:false
)-h, --help
- Display help for command
The init
command will:
- Auto-detect your framework from
package.json
dependencies - Create an
alchemy.run.ts
file with framework-specific configuration - Add Alchemy scripts to your
package.json
(deploy
,destroy
,alchemy:dev
) - Install Alchemy and any required framework adapters as dev dependencies
- Update configuration files as needed (e.g.,
vite.config.ts
,bunfig.toml
, etc.)
configure
Section titled “configure”alchemy configure [options]
Configure the login method for a cloud provider.
-p, --profile
- The profile to configure (default:default
)-h, --help
- Display help for command
alchemy login [options]
Login to a configured cloud provider. Run alchemy configure
to configure a provider.
-p, --profile
- The profile to login to (default:default
)-h, --help
- Display help for command
logout
Section titled “logout”alchemy logout [options]
Logout of a configured cloud provider.
-p, --profile
- The profile to logout from (default:default
)-h, --help
- Display help for command
util create-cloudflare-token
Section titled “util create-cloudflare-token”alchemy util create-cloudflare-token
A utility for creating Cloudflare tokens.
-p, --profile
- Create a cloudflare token mirroring the oauth scopes in the specified profile--god-token
- Create a “god token” with full write access to everything in a cloudflare account