meted deploy

Deploy the gateway into your own Cloudflare account.

meted deploy

Scaffolds a Cloudflare Worker into your repository, prints the plan, and asks before running anything.

Application

Your Cloudflare Worker

Meted Sufficiency Engine

LLM Provider

The gateway and the Sufficiency Engine run in your Cloudflare account. The Worker forwards each request to the provider base URL you configure. Meted deploys nothing to infrastructure it controls.

Options

Flag
--dir <path>Where to scaffold. Default meted-cloudflare
--name <name>Worker name
--dry-runWrite the scaffold and print the plan, run nothing
--scaffold-onlyWrite the scaffold, print nothing else
--skip-secretDo not upload the provider key
--yesDo not ask for confirmation

What it writes

File
wrangler.tomlWorker name and vars
src/worker.tsThe gateway entry point
package.jsonDependencies and wrangler scripts
tsconfig.jsonWorker-targeted TypeScript config
README.mdWhat lives where, and the commands

wrangler.toml, src/worker.ts and package.json are never overwritten once they exist.

The plan

Plan

  1. Upload OPENAI_API_KEY as a Cloudflare secret
     npx wrangler secret put OPENAI_API_KEY  (value piped from your environment, never printed)
  2. Deploy the Worker
     npx wrangler deploy

  Working directory: meted-cloudflare/
  Mode on deploy:    observe

This deploys to your Cloudflare account and may create billable resources.
Run these steps now? [y/N]

If a step fails, nothing after it runs, and the output names where to pick up.

Preview deployment

meted deploy --dry-run

Writes the scaffold, prints the plan and runs nothing. Review src/worker.ts and wrangler.toml before running the plan.

In CI

meted deploy --yes --skip-secret

Without a TTY and without --yes, meted deploy exits 1 with Refusing to deploy without confirmation. Set the secret separately, once, with wrangler secret put.

After deploying

const client = new OpenAI({
  baseURL: 'https://meted-gateway.<your-subdomain>.workers.dev/v1',
})

See Cloudflare for the details.

Was this page helpful?