The best way to control Claude Code, Codex and more from any computer or phone

main
ts 10 lines 399 Bytes
Raw
1 import * as cf from "cloudflare:workers";
2 import type { WebsiteEnv } from "../alchemy.run.ts";
3
4 // In development mode with TanStack Start, `import { env } from "cloudflare:workers"` does not work at the top level.
5 // As a workaround, we use a proxy to access the env object.
6 export const env = new Proxy({} as WebsiteEnv, {
7 get(_, prop) {
8 return cf.env[prop as keyof typeof cf.env];
9 },
10 });