mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 05:01:03 +03:00
..
2026-11-05 17:07:10 -05:00
2026-11-05 17:07:10 -05:00
2026-11-05 16:50:49 -05:00
2026-11-05 16:50:49 -05:00
2026-11-05 17:07:10 -05:00
2026-11-05 16:50:49 -05:00
2026-11-05 17:07:10 -05:00
2026-11-05 16:50:49 -05:00
2026-11-05 16:50:49 -05:00
2026-11-05 16:50:49 -05:00
opencode.ai
The opencode.ai website, deployed as one Cloudflare Worker with the cf CLI:
site/: the site (David Hill's design): home, product pages, brand, press, legal, changelog and the 404, in 18 languages. SolidStart; seesite/README.md,site/DESIGN.mdandsite/MEDIA.md.src/: the V2 docs under/v2(Astro). Onlybaseinastro.config.tsknows the subpath; the docs feature is self-contained undersrc/docs/.textjs/: the font page's Text.js apps, built intosite/public/textjs/.worker.ts: sends/v2*to the docs server and everything else to the site server.cloudflare.config.ts: the Worker, its bindings and its routes, for--mode dev(dev.opencode.ai) and production (opencode.ai).
Development
bun dev # the docs, on :3000
bun dev:site # the site, on :3001 (heavy media is proxied from dev.opencode.ai/files)
Build and deploy
bun run build -- --mode dev # docs + site into .cloudflare/output (Build Output Specification)
bun run deploy:dev # build, then cf deploy --prebuilt --mode dev
CI deploys on pushes to dev and production (.github/workflows/deploy-www.yml). Production keeps only its /v2* route until productionOwnsRoot in cloudflare.config.ts is switched on.
Verification
bun typecheck
bun test
bun run build -- --mode dev