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-run | Write the scaffold and print the plan, run nothing |
--scaffold-only | Write the scaffold, print nothing else |
--skip-secret | Do not upload the provider key |
--yes | Do not ask for confirmation |
What it writes
| File | |
|---|---|
wrangler.toml | Worker name and vars |
src/worker.ts | The gateway entry point |
package.json | Dependencies and wrangler scripts |
tsconfig.json | Worker-targeted TypeScript config |
README.md | What 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',
})
A deployed Worker is public by default. Put it behind Cloudflare Access, mTLS, or an auth check in the Worker before sending it real traffic.
See Cloudflare for the details.