---
name: publish-to-alchemy-new
description: Make an Alchemy project deployable on alchemy.new. Writes or updates alchemy.new.jsonc, checks the one-click deploy rule, packs a ready archive, and publishes it to the alchemy.new registry. Use when a publisher wants a listing on alchemy.new, a Deploy with alchemy.new link, or one-click deploys with generated secrets.
---

# Publish to alchemy.new

alchemy.new deploys **versioned packages** from its own registry into a visitor's cloud account in one click. Publishers upload a ready `.tar.gz` archive. Deploys download that archive.

The archive must contain the entrypoint, built output, and production `node_modules`, including `node_modules/alchemy/bin/cli.js`. Upload `alchemy.new.jsonc` separately. Do not put it in the archive. alchemy.new does not install guest dependencies. Alchemy resources such as `Website.Vite` may build during the deploy, so their toolchain must be in `dependencies`. A branch, an unreleased commit, or a file that exists only in a working tree cannot deploy.

Write `alchemy.new.jsonc` first. Local write needs no registry session.

alchemy.new is not affiliated with Alchemy at alchemy.run. It uses Alchemy as the deployment engine.

## Goal

A visitor searches alchemy.new, clicks **Deploy**, signs in with their cloud provider, and the project deploys with no other input. They can click **Customize** to change parameters first. Every required value therefore needs a safe `default` or a `generate` rule.

## Workflow

1. Inspect the repository on disk. Follow [references/inspect.md](references/inspect.md).
2. Read [references/manifest.md](references/manifest.md) and the public contract at `https://alchemy.new/docs`. Use schema version 1. Do not invent fields.
3. Write or update `alchemy.new.jsonc` at the package root. Start from [references/first-deploy.alchemy.new.jsonc](references/first-deploy.alchemy.new.jsonc).
4. Check the one-click rule with [references/parameters.md](references/parameters.md). Every required parameter that is active under the default choices has a `default` or a `generate` rule.
5. Pack a ready archive with [references/release.md](references/release.md). Release CI installs dependencies, builds the app and any container images, and uploads the archive plus `alchemy.new.jsonc` to the alchemy.new registry. Offer to publish; do not publish without the user's approval.
6. Until a release that contains the manifest and the ready artifact exists, do not call the deploy URL working. After the release is published, present the deploy URL. Direct deploy does not need a registry listing.
7. Ask whether to upload the package to the alchemy.new registry. Upload is opt-in. Never upload because the file exists.
8. If the user says yes, follow [references/upload.md](references/upload.md). If they say no or later, stop. The published release is enough for the deploy URL.

## Write

Infer identity from the repository. Ask the user only when a required field cannot be derived.

- Set `$schema` to `https://alchemy.new/schema/project.json` and `schemaVersion` to `1`.
- Derive `id`, `name`, `description`, and `publisher` from `package.json`, the README, and the git remote.
- Set `source` to the registry package without a version: `{ "kind": "registry", "org": "example-org", "project": "example-stack" }`. The published version is the version.
- Point `deployment.entrypoint` at the file that exports or runs the stack, relative to the package root. The ready archive must contain it.
- Set `providers` from resources in the entrypoint. Use `cloudflare` when the stack uses Cloudflare.
- Use `parameters: []` when the stack can deploy without project-specific env.
- When you declare parameters, follow [references/parameters.md](references/parameters.md).

If the file already exists, update it in place. Keep a stable `id`. Change a feature parameter from `required: true` to `required: false` when the code continues without that value.

Do not write provider credentials, tokens, passwords, or private defaults. A secret has no manifest default. Use `generate: "password"` for a password that a person signs in with. Create machine secrets in the stack with `Alchemy.Random`.

## One click

alchemy.new rejects a manifest when a required parameter has neither `default` nor `generate`. Fix each one:

- The project works without it: set `required: false`.
- A person signs in with it, and the app reads it on every deploy: add `"generate": "password"`. alchemy.new creates it at deploy time and shows it to the visitor once. Each deploy creates a new one.
- Only the app reads it, such as a signing or encryption key: create it in the stack with `Alchemy.Random` when the variable is empty, and set `required: false`. Alchemy keeps it in state across deploys.
- A safe public value works: add `default`.
- It belongs to an optional feature or an alternate implementation: gate it with `when` behind a non-default path.

Provider credentials are never parameters. The deploy flow collects them.

## After the release

Build a deploy URL only after a release that contains the file is published.

- `https://alchemy.new/?package=<org>/<project>` deploys the latest non-yanked version. Add `&version=<exact version>` to pin one.

Optional README badge:

```md
[![Deploy with alchemy.new](https://alchemy.new/deploy-with-alchemy.svg)](https://alchemy.new/?package=<org>/<project>)
```

## Upload

Ask this question after a release that contains the file is published.

> The release is ready. Upload this package to the alchemy.new registry for review?

- Yes: follow [references/upload.md](references/upload.md).
- No or later: stop. The release is enough for the deploy URL.

A submission names the package. alchemy.new checks the latest release when you submit: the release must ship a ready deploy artifact, and the manifest must pass the one-click rule. A failed check returns the reason. alchemy.new does not install guest dependencies.

Anyone can submit a compatible package. Only the alchemy.new review process can grant the verified badge. Do not set or promise verification.

## Compatibility

- Set `schemaVersion` to `1` and `$schema` to `https://alchemy.new/schema/project.json`.
- Publish every change that a deploy needs as a new release. alchemy.new never reads a branch.
- Declare only parameters that project code reads. Match environment variable names exactly.
- Use `paths` on a select when one detail has more than one implementation. Gate path-scoped secrets with `when`. Keep the default path one-click.
- Do not add an implementation path such as PlanetScale to `deployment.providers`. Providers stay `cloudflare`, `aws`, or `other`.
- Treat `Cloudflare.state()` as a project-owned choice. alchemy.new does not rewrite a stack's state layer.
- alchemy.new cannot build container images. Reference each Cloudflare Container's prebuilt image in a public registry with `image`, pinned by digest. alchemy.new copies it into the deployer's Cloudflare registry during the deploy. Follow [references/release.md](references/release.md#container-images).
- alchemy.new does not install guest dependencies. Release CI produces the ready artifact. A source tree plus a lockfile cannot deploy.
- Every package the stack imports at deploy time is in `dependencies` of the importing package. Release CI prunes dev dependencies, and alchemy.new installs nothing.
- Explain any manual setup that remains before the deployment can succeed.
