Setup
Sign up at turso.tech, then create an API token with the Turso CLI:
turso auth api-tokens mint alchemyTurso only supports API tokens. There is no browser sign-in.
Add the provider
Section titled “Add the provider”Add Turso.providers() next to your cloud’s providers:
import * as Turso from "alchemy/Turso";
providers: Layer.mergeAll(Cloudflare.providers(), Turso.providers()),Store the token in a profile
Section titled “Store the token in a profile”alchemy profile edit --add TursoPaste the token when asked. You can leave the organization blank.
If you belong to more than one organization, enter its name. turso org list shows them.
See Profiles to learn how profiles work.
Use environment variables in CI
Section titled “Use environment variables in CI”Set TURSO_API_TOKEN and Alchemy uses it instead of your profile:
TURSO_API_TOKEN=... alchemy deployTURSO_API_KEY works too. Set TURSO_ORGANIZATION if you belong to more than one organization.
Pass a token in code
Section titled “Pass a token in code”Use a token you already have, for example in tests:
Effect.provide( Turso.fromToken({ apiToken: "...", organization: "my-org", }),)apiToken can be a string or a Redacted value.