login
alchemy login [file] [options]Configure and log in to each cloud provider used by your stack. The
command imports your stack file to discover which AuthProviders are
registered, then walks through each one — prompting for the auth method
the first time, and refreshing tokens (e.g. Cloudflare OAuth) on
subsequent runs.
Credentials are written to ~/.alchemy/profiles.json, keyed by
profile name (defaults to default, overridable with
$ALCHEMY_PROFILE or --profile).
When done, the resulting profile is printed with the same renderer as
alchemy profile show. If the stack registers no
AuthProviders, the command prints a hint to add AuthProviderLayer
entries to the stack’s providers() layer.
| Option | Description |
|---|---|
[file] | Stack file to import (defaults to alchemy.run.ts) |
--profile <name> | Profile to write to (defaults to default or $ALCHEMY_PROFILE) |
--configure | Re-run the provider’s interactive configure step before logging in |
--env-file <path> | Load environment variables from a file |
--configure treats every provider as missing, so the configure step
re-runs and overwrites the stored entry.
Examples
Section titled “Examples”# Log in with the default profilealchemy login
# Log in to a separate profilealchemy login --profile prod
# Re-configure (e.g. switch from OAuth to API token) and log inalchemy login --configure