@builtbyfriends/bwf 0.0.0-stage → 1.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS_TEMPLATE.md +4 -0
- package/LICENSE +22 -0
- package/README.md +48 -2
- package/dist/account-cmd-Cj0I2_bJ.mjs +45 -0
- package/dist/agents-BLiMq9E1.mjs +113 -0
- package/dist/application-analysis-C9Ck2Yeg.mjs +1498 -0
- package/dist/application-routing-DbR-W5lG.mjs +25 -0
- package/dist/atomic-write-DA6eD1Kp.mjs +17 -0
- package/dist/auth-BKsUmWbT.d.mts +77 -0
- package/dist/auth-DkvoW5hB.mjs +33 -0
- package/dist/auth-aKyIWkdS.mjs +1 -0
- package/dist/auth-client-6-Ft9i9T.d.mts +5 -0
- package/dist/auth-client-DwCdwKbw.mjs +5 -0
- package/dist/auth-client-react-CJdeErvM.mjs +5 -0
- package/dist/auth-client-react-DvQLe5Zb.d.mts +5 -0
- package/dist/auth-link-D-DddkCQ.mjs +26 -0
- package/dist/auth-migrations-DDeifS3v.mjs +206 -0
- package/dist/auth-router-tWzIwf8f.mjs +66 -0
- package/dist/auth-xnkmpZUl.mjs +311 -0
- package/dist/base64-ikl9yBy3.mjs +15 -0
- package/dist/better-auth-shared-Br6TNaYJ.mjs +473 -0
- package/dist/better-auth-shared-CsBNvPOU.d.mts +56 -0
- package/dist/build-cmd-BnZezraT.mjs +153 -0
- package/dist/build-output-dir-Clj_unKN.mjs +402 -0
- package/dist/cancel-deploy-DKAj5U1Z.mjs +57 -0
- package/dist/cf-access-Bhz9wX6p.mjs +131 -0
- package/dist/cf-access-CUP5L08W.mjs +67 -0
- package/dist/cf-build-output-DA6uJomQ.mjs +1 -0
- package/dist/cf-build-output-DNQTwMNU.mjs +438 -0
- package/dist/cf-command-values-2kOtxMo1.mjs +26 -0
- package/dist/cf-config-migrate-COOCi4Ge.mjs +330 -0
- package/dist/cf-worker-settings-CIh4t_yG.mjs +41 -0
- package/dist/cli/cli.d.mts +1 -0
- package/dist/cli/cli.mjs +88 -0
- package/dist/cli/cloudflare-operation-process.d.mts +1 -0
- package/dist/cli/cloudflare-operation-process.mjs +1284 -0
- package/dist/cli/env-schema-probe.d.mts +43 -0
- package/dist/cli/env-schema-probe.mjs +165 -0
- package/dist/cli-main-HeXRQml6.mjs +1846 -0
- package/dist/client-D3D5RM5h.mjs +940 -0
- package/dist/client-VF2Nzc7Z.mjs +1 -0
- package/dist/cloudflare-auth-jb-1e43r.mjs +152 -0
- package/dist/cloudflare-cmd-B62t8Fm-.mjs +59 -0
- package/dist/cloudflare-config-i8yanry0.mjs +186 -0
- package/dist/cloudflare-connect-x7IsYghw.mjs +55 -0
- package/dist/cloudflare-operations-BeK7bhnP.mjs +627 -0
- package/dist/cloudflare-operations-C3Uu0Emj.mjs +1 -0
- package/dist/cloudflare-process-Cc6oiJqk.mjs +309 -0
- package/dist/cloudflare-user-output-CqONaAbP.mjs +19 -0
- package/dist/collect-8i0wU63d.mjs +1 -0
- package/dist/collect-C6Blu9yw.mjs +48 -0
- package/dist/config-CN_RFRkS.mjs +86 -0
- package/dist/config-D5G-Tx6o.mjs +1 -0
- package/dist/config-DOaFIK3w.mjs +88 -0
- package/dist/config-entry.d.mts +202 -0
- package/dist/config-entry.mjs +6 -0
- package/dist/config-tNx0HlFv.mjs +516 -0
- package/dist/connect-hLPNppu3.mjs +84 -0
- package/dist/create-project-B35ux-LA.mjs +126 -0
- package/dist/create-project-tJ1KwNss.mjs +1 -0
- package/dist/database-provider-DkZo4VwN.mjs +5 -0
- package/dist/database-provider.d.mts +25 -0
- package/dist/database-provider.mjs +1 -0
- package/dist/db-BH_md90k.mjs +1735 -0
- package/dist/delete-BSKI7V23.mjs +65 -0
- package/dist/deploy-C8KHBNsh.mjs +6512 -0
- package/dist/deploy-DCZBr7Ey.mjs +2 -0
- package/dist/deploy.d.mts +31 -0
- package/dist/deploy.mjs +118 -0
- package/dist/dev-inbox-I0nqTCdf.mjs +216 -0
- package/dist/discover-DJPmQcL5.mjs +36 -0
- package/dist/discover-EVuydEoM.mjs +1 -0
- package/dist/dist-B6eN80gc.mjs +1612 -0
- package/dist/dist-Cp4b1_T9.mjs +1 -0
- package/dist/dist-DMYe8CZJ.mjs +48 -0
- package/dist/dist-STQXl8ck.mjs +1878 -0
- package/dist/domain-C4ZhEiFG.mjs +149 -0
- package/dist/dotenv-4NdUCXbB.mjs +156 -0
- package/dist/drizzle-DqVFXtlc.mjs +306 -0
- package/dist/drizzle-Ds5P0n-S.mjs +1 -0
- package/dist/edge.d.mts +2 -0
- package/dist/edge.mjs +1 -0
- package/dist/email-B3TWga7x.mjs +742 -0
- package/dist/email-C_ATvNIG.mjs +2865 -0
- package/dist/email-cloudflare-DuAc9zny.mjs +854 -0
- package/dist/email-protocol-CZ0bAkI8.mjs +81 -0
- package/dist/env-CTAo8ifZ.mjs +73 -0
- package/dist/env-DUyTzroe.mjs +88 -0
- package/dist/env-Dl4Wggec.mjs +71 -0
- package/dist/env-helpers-BX0APszT.mjs +135 -0
- package/dist/env-helpers-U56xuFgL.d.mts +20 -0
- package/dist/env-mask-BsHxq3R8.mjs +46 -0
- package/dist/env-public-Cw_xPi1D.d.mts +119 -0
- package/dist/env-raw-Bo6TtrHU.mjs +41 -0
- package/dist/env-types-Bg-dTh8u.mjs +56 -0
- package/dist/env-validation-BufZConV.mjs +488 -0
- package/dist/env-validation-DPqDo4DU.mjs +1 -0
- package/dist/fetch-CBgyyhzm.d.mts +87 -0
- package/dist/fetch-error-DmlRM6e4.mjs +264 -0
- package/dist/fetch-stream-2GUN3YN1.mjs +102 -0
- package/dist/fetch-stream-bUXynOyZ.d.mts +32 -0
- package/dist/fetch-tpPiSK10.mjs +25 -0
- package/dist/gen-dc13IRXh.mjs +509 -0
- package/dist/gen-kQqhFyOP.mjs +1 -0
- package/dist/generate-BgtlYpKg.mjs +1 -0
- package/dist/generate-Da9mWKzU.mjs +80 -0
- package/dist/generated-wrangler-config-CoDaaFsA.mjs +17 -0
- package/dist/git-metadata-Cukp5kV5.mjs +82 -0
- package/dist/github-cmd-DT5Onu6E.mjs +690 -0
- package/dist/handler-CJ7DiiRF.mjs +161 -0
- package/dist/handler-CVsIfRv7.d.mts +279 -0
- package/dist/help-Bpv6Qeqn.mjs +1946 -0
- package/dist/help-CfZ4Bsw5.mjs +1 -0
- package/dist/inbound-CqubE-9T.d.mts +311 -0
- package/dist/inbound-lHugZPuK.mjs +509 -0
- package/dist/index.d.mts +64 -0
- package/dist/index.mjs +4163 -0
- package/dist/info-CLQoCenb.mjs +109 -0
- package/dist/init-DRUR0j8C.mjs +2486 -0
- package/dist/limits-CMmYT2l8.d.mts +16 -0
- package/dist/limits-D27Lp6FP.mjs +46 -0
- package/dist/link-DinwJnon.mjs +52 -0
- package/dist/list-B84t4BhW.mjs +130 -0
- package/dist/live-Dui0-aj_.d.mts +105 -0
- package/dist/live-saC8barp.mjs +410 -0
- package/dist/load-user-env-g0ahkZcj.mjs +34 -0
- package/dist/local-d1-C3EeOV7-.mjs +103 -0
- package/dist/log-JDnPc0cF.mjs +23 -0
- package/dist/login-Bl5lH8nH.mjs +87 -0
- package/dist/login-DoI7AsbY.mjs +1 -0
- package/dist/logs-CaT2N2f7.mjs +129 -0
- package/dist/migrate-CbGscX-V.mjs +125 -0
- package/dist/migrate-Ce3JKLVs.mjs +1 -0
- package/dist/migration-handler-22qiuWPq.mjs +469 -0
- package/dist/migration-handler-Bb2BJh6g.d.mts +38 -0
- package/dist/mime-BMUN_QKG.mjs +1004 -0
- package/dist/mysql-migration-sql-CNuBSqdx.mjs +239 -0
- package/dist/neon-CJzQSycr.mjs +52 -0
- package/dist/node-tfv-3v0V.mjs +64 -0
- package/dist/operator-ai-logging-Ay7M4KWw.mjs +121 -0
- package/dist/operator-args-BFg32YyY.mjs +722 -0
- package/dist/operator-auth-DdYZYEkO.mjs +47 -0
- package/dist/operator-client-DBujdELO.mjs +82 -0
- package/dist/operator-cmd-C73WWJBl.mjs +443 -0
- package/dist/operator-cmd-CdZytuAF.mjs +1 -0
- package/dist/output-Bb34lF0w.mjs +173 -0
- package/dist/output-CVolXKC1.mjs +1 -0
- package/dist/package-DO4d3Qz5.mjs +1444 -0
- package/dist/package-json-DvS6IFRv.mjs +43 -0
- package/dist/pg-DoyPxa_X.mjs +15 -0
- package/dist/picocolors-D1NxSLw-.mjs +71 -0
- package/dist/plan-BHNt1QhK.mjs +1 -0
- package/dist/plan-DX4_-OM5.mjs +58 -0
- package/dist/platform-args-NI_vfWvD.mjs +538 -0
- package/dist/platform-args-ZC1-A1N9.mjs +1 -0
- package/dist/platform-auth-config-d-lY5-aY.mjs +371 -0
- package/dist/platform-auth-protection-Dhw7lUCk.mjs +231 -0
- package/dist/platform-auth-recovery-DaCc0tlx.mjs +309 -0
- package/dist/platform-cmd-5Ry-C9im.mjs +193 -0
- package/dist/platform-cmd-5oZq91lI.mjs +1 -0
- package/dist/platform-discovery-Bxg9aZXU.mjs +40 -0
- package/dist/platform-domain-DLVdGvGG.mjs +256 -0
- package/dist/platform-lifecycle-CUgjipXO.mjs +1 -0
- package/dist/platform-lifecycle-fRt5VMls.mjs +8928 -0
- package/dist/platform-management-5hEsRfR2.mjs +1 -0
- package/dist/platform-management-Djh1hzLP.mjs +1607 -0
- package/dist/platform-plans-config-CkbUKFpm.mjs +447 -0
- package/dist/platform-recovery-Cghx7FCR.mjs +96 -0
- package/dist/platform-registry-x1m9HBxf.mjs +450 -0
- package/dist/platform-runtime-logs-kkoiYFpF.mjs +72 -0
- package/dist/platform-setup-SfwCwnZg.mjs +306 -0
- package/dist/prepare-B9mB47T5.mjs +84 -0
- package/dist/prepare-DNIq07so.mjs +13 -0
- package/dist/prepare-LHkyJqxi.mjs +1 -0
- package/dist/project-CC7eN00D.mjs +141 -0
- package/dist/project-DcSd4BeI.mjs +1 -0
- package/dist/project-cmd-DTF19-fC.mjs +109 -0
- package/dist/project-paths-iXHKRTTQ.mjs +159 -0
- package/dist/project-slug-BUy0lmyR.mjs +1 -0
- package/dist/project-slug-CO6ci9XG.mjs +7 -0
- package/dist/project-team-CvdLhDF2.mjs +129 -0
- package/dist/project-token-CwZdUEGu.mjs +70 -0
- package/dist/project-tsconfig-P9X952KG.mjs +98 -0
- package/dist/project-zero-trust-CKDoPdN1.mjs +64 -0
- package/dist/providers-Cd3c7wi0.mjs +64 -0
- package/dist/providers-Df69hb_X.d.mts +5 -0
- package/dist/provision-DGlFJ3T9.mjs +1 -0
- package/dist/provision-mYVLuQiy.mjs +1814 -0
- package/dist/queues-Bc3FsBQT.d.mts +5 -0
- package/dist/r2-conditions-DSLmkiR5.mjs +60 -0
- package/dist/requests-DNhfyF3l.mjs +52 -0
- package/dist/resolve-project-BCsAMDRA.mjs +47 -0
- package/dist/resolve-project-DhU9_lIo.mjs +1 -0
- package/dist/resource-name-DlJ9QXzg.mjs +10 -0
- package/dist/response-HmNjB30w.mjs +29 -0
- package/dist/rollback-BvCHol52.mjs +150 -0
- package/dist/rolldown-runtime-uD8oG6U2.mjs +24 -0
- package/dist/route-types-CRWhr93D.mjs +592 -0
- package/dist/route-url-BIDZT78M.mjs +58 -0
- package/dist/route-url-Bla3Upsy.d.mts +42 -0
- package/dist/routes-stub.d.mts +24 -0
- package/dist/routes-stub.mjs +1 -0
- package/dist/routing-assets-CSheDWWM.mjs +54 -0
- package/dist/rpc-DcByS_q0.d.mts +39 -0
- package/dist/rpc-DtxIN9Tv.mjs +19 -0
- package/dist/runner-CPerdjIl.mjs +163 -0
- package/dist/runner-CUNtS5x7.mjs +1 -0
- package/dist/runner-mysql-7aA5hGoM.mjs +145 -0
- package/dist/runner-mysql-DrMKw203.mjs +1 -0
- package/dist/runner-pg-2pjltt0t.mjs +1 -0
- package/dist/runner-pg-mYc75KfH.mjs +61 -0
- package/dist/runtime/ai.d.mts +50 -0
- package/dist/runtime/ai.mjs +455 -0
- package/dist/runtime/auth-client-react.d.mts +2 -0
- package/dist/runtime/auth-client-react.mjs +1 -0
- package/dist/runtime/auth-client.d.mts +2 -0
- package/dist/runtime/auth-client.mjs +1 -0
- package/dist/runtime/auth.d.mts +2 -0
- package/dist/runtime/auth.mjs +1 -0
- package/dist/runtime/better-auth-mysql.d.mts +5 -0
- package/dist/runtime/better-auth-mysql.mjs +21 -0
- package/dist/runtime/better-auth-pg.d.mts +5 -0
- package/dist/runtime/better-auth-pg.mjs +21 -0
- package/dist/runtime/better-auth.d.mts +6 -0
- package/dist/runtime/better-auth.mjs +22 -0
- package/dist/runtime/client-react.d.mts +5 -0
- package/dist/runtime/client-react.mjs +5 -0
- package/dist/runtime/client.d.mts +5 -0
- package/dist/runtime/client.mjs +5 -0
- package/dist/runtime/db-mysql.d.mts +2 -0
- package/dist/runtime/db-mysql.mjs +1 -0
- package/dist/runtime/db-pg.d.mts +2 -0
- package/dist/runtime/db-pg.mjs +1 -0
- package/dist/runtime/db.d.mts +17 -0
- package/dist/runtime/db.mjs +36 -0
- package/dist/runtime/drizzle-arktype.d.mts +1 -0
- package/dist/runtime/drizzle-arktype.mjs +2 -0
- package/dist/runtime/drizzle-valibot.d.mts +1 -0
- package/dist/runtime/drizzle-valibot.mjs +2 -0
- package/dist/runtime/drizzle-zod.d.mts +1 -0
- package/dist/runtime/drizzle-zod.mjs +2 -0
- package/dist/runtime/durable.d.mts +64 -0
- package/dist/runtime/durable.mjs +165 -0
- package/dist/runtime/email/testing.d.mts +108 -0
- package/dist/runtime/email/testing.mjs +268 -0
- package/dist/runtime/email-protocol.d.mts +25 -0
- package/dist/runtime/email-protocol.mjs +1 -0
- package/dist/runtime/email.d.mts +26 -0
- package/dist/runtime/email.mjs +524 -0
- package/dist/runtime/env-public-client.d.mts +19 -0
- package/dist/runtime/env-public-client.mjs +55 -0
- package/dist/runtime/env-public.d.mts +4 -0
- package/dist/runtime/env-public.mjs +277 -0
- package/dist/runtime/env.d.mts +12 -0
- package/dist/runtime/env.mjs +1 -0
- package/dist/runtime/fetch-server.d.mts +6 -0
- package/dist/runtime/fetch-server.mjs +29 -0
- package/dist/runtime/fetch-stream.d.mts +3 -0
- package/dist/runtime/fetch-stream.mjs +3 -0
- package/dist/runtime/fetch.d.mts +2 -0
- package/dist/runtime/fetch.mjs +3 -0
- package/dist/runtime/handler.d.mts +3 -0
- package/dist/runtime/handler.mjs +1 -0
- package/dist/runtime/kv.d.mts +45 -0
- package/dist/runtime/kv.mjs +103 -0
- package/dist/runtime/limits.d.mts +2 -0
- package/dist/runtime/limits.mjs +1 -0
- package/dist/runtime/live-client.d.mts +40 -0
- package/dist/runtime/live-client.mjs +282 -0
- package/dist/runtime/live-server.d.mts +11 -0
- package/dist/runtime/live-server.mjs +419 -0
- package/dist/runtime/live.d.mts +3 -0
- package/dist/runtime/live.mjs +1 -0
- package/dist/runtime/log.d.mts +24 -0
- package/dist/runtime/log.mjs +57 -0
- package/dist/runtime/migration-handler-mysql.d.mts +2 -0
- package/dist/runtime/migration-handler-mysql.mjs +111 -0
- package/dist/runtime/migration-handler-pg.d.mts +2 -0
- package/dist/runtime/migration-handler-pg.mjs +94 -0
- package/dist/runtime/migration-handler.d.mts +2 -0
- package/dist/runtime/migration-handler.mjs +1 -0
- package/dist/runtime/procedure.d.mts +27 -0
- package/dist/runtime/procedure.mjs +36 -0
- package/dist/runtime/procedures.d.mts +24 -0
- package/dist/runtime/procedures.mjs +56 -0
- package/dist/runtime/queues.d.mts +2 -0
- package/dist/runtime/queues.mjs +8 -0
- package/dist/runtime/remote/binding-handler.d.mts +11 -0
- package/dist/runtime/remote/binding-handler.mjs +227 -0
- package/dist/runtime/remote/index.d.mts +12 -0
- package/dist/runtime/remote/index.mjs +467 -0
- package/dist/runtime/response.d.mts +11 -0
- package/dist/runtime/response.mjs +1 -0
- package/dist/runtime/route-url.d.mts +2 -0
- package/dist/runtime/route-url.mjs +1 -0
- package/dist/runtime/routing.d.mts +53 -0
- package/dist/runtime/routing.mjs +425 -0
- package/dist/runtime/rpc-react.d.mts +16 -0
- package/dist/runtime/rpc-react.mjs +50 -0
- package/dist/runtime/rpc.d.mts +2 -0
- package/dist/runtime/rpc.mjs +1 -0
- package/dist/runtime/sandbox-container.d.mts +3 -0
- package/dist/runtime/sandbox-container.mjs +1 -0
- package/dist/runtime/sandbox.d.mts +5 -0
- package/dist/runtime/sandbox.mjs +196 -0
- package/dist/runtime/schema-d1.d.mts +1 -0
- package/dist/runtime/schema-d1.mjs +2 -0
- package/dist/runtime/schema-mysql.d.mts +1 -0
- package/dist/runtime/schema-mysql.mjs +2 -0
- package/dist/runtime/schema-pg.d.mts +1 -0
- package/dist/runtime/schema-pg.mjs +2 -0
- package/dist/runtime/seed.d.mts +34 -0
- package/dist/runtime/seed.mjs +5 -0
- package/dist/runtime/sse-client.d.mts +31 -0
- package/dist/runtime/sse-client.mjs +42 -0
- package/dist/runtime/sse.d.mts +32 -0
- package/dist/runtime/sse.mjs +1 -0
- package/dist/runtime/storage.d.mts +4 -0
- package/dist/runtime/storage.mjs +13 -0
- package/dist/runtime/validator.d.mts +2 -0
- package/dist/runtime/validator.mjs +1 -0
- package/dist/runtime/ws-server.d.mts +26 -0
- package/dist/runtime/ws-server.mjs +297 -0
- package/dist/runtime/ws.d.mts +2 -0
- package/dist/runtime/ws.mjs +108 -0
- package/dist/sandbox-CWDjoEG2.d.mts +50 -0
- package/dist/sandbox-container-BqamdFCx.d.mts +73 -0
- package/dist/sandbox-container-d1AHLpgn.mjs +291 -0
- package/dist/secret-DCF9RXTc.mjs +146 -0
- package/dist/skills-Dr3AjuBF.mjs +63 -0
- package/dist/sqlite-validation-CLJXXN93.mjs +24 -0
- package/dist/sse-CxR30yMF.mjs +174 -0
- package/dist/standard-schema-CuDawHOC.d.mts +40 -0
- package/dist/static-asset-marker-mWMX2dLa.mjs +38 -0
- package/dist/subcommand-prompt-B9yUo--u.mjs +370 -0
- package/dist/terminal-log-text-DNsWJREL.mjs +31 -0
- package/dist/types-D7-4tBu7.d.mts +1 -0
- package/dist/untrusted-env-lL7RkYiC.mjs +50 -0
- package/dist/validate-B-zsjhiz.mjs +162 -0
- package/dist/validate-DbqGdPPY.mjs +1 -0
- package/dist/validator-8-NZs2Xr.mjs +168 -0
- package/dist/version-metadata-DsSoNsKJ.mjs +23 -0
- package/dist/wrangler-DU784Dkf.mjs +1452 -0
- package/dist/wrangler-Rr9_76DQ.mjs +1 -0
- package/dist/ws-Q_osq9VK.d.mts +137 -0
- package/dist/yarn-pnp-DgWbE7z5.mjs +91 -0
- package/docs/guide/ai.md +273 -0
- package/docs/guide/app-types.md +101 -0
- package/docs/guide/auth.md +255 -0
- package/docs/guide/database/d1.md +86 -0
- package/docs/guide/database/mysql.md +72 -0
- package/docs/guide/database/postgresql.md +94 -0
- package/docs/guide/database.md +454 -0
- package/docs/guide/deployment.md +124 -0
- package/docs/guide/durable-state.md +192 -0
- package/docs/guide/edge/headers.md +47 -0
- package/docs/guide/edge/redirects.md +85 -0
- package/docs/guide/edge/rewrites.md +119 -0
- package/docs/guide/edge/static-assets.md +94 -0
- package/docs/guide/email/domains.md +119 -0
- package/docs/guide/email/receiving.md +142 -0
- package/docs/guide/email/sending.md +262 -0
- package/docs/guide/email.md +23 -0
- package/docs/guide/env-vars.md +115 -0
- package/docs/guide/index.md +37 -0
- package/docs/guide/jobs.md +80 -0
- package/docs/guide/kv.md +100 -0
- package/docs/guide/live.md +181 -0
- package/docs/guide/platform/administration/access.md +165 -0
- package/docs/guide/platform/administration/connected-apps.md +84 -0
- package/docs/guide/platform/administration/email.md +169 -0
- package/docs/guide/platform/administration/operations.md +100 -0
- package/docs/guide/platform/administration/plans.md +156 -0
- package/docs/guide/platform/administration/projects.md +74 -0
- package/docs/guide/platform/administration/zero-trust.md +205 -0
- package/docs/guide/platform/development/local.md +122 -0
- package/docs/guide/platform/development/runtime.md +115 -0
- package/docs/guide/platform/development/schema-ci.md +44 -0
- package/docs/guide/platform/installation/ci.md +62 -0
- package/docs/guide/platform/installation/credentials.md +140 -0
- package/docs/guide/platform/installation/domains.md +120 -0
- package/docs/guide/platform/installation/first-deployment.md +95 -0
- package/docs/guide/platform/installation/maintenance.md +250 -0
- package/docs/guide/platform/installation/prerequisites.md +176 -0
- package/docs/guide/platform/installation/setup.md +300 -0
- package/docs/guide/platform/installation/uninstall.md +110 -0
- package/docs/guide/platform-administration.md +19 -0
- package/docs/guide/platform-development.md +16 -0
- package/docs/guide/procedures.md +48 -0
- package/docs/guide/project-collaboration.md +99 -0
- package/docs/guide/queues.md +149 -0
- package/docs/guide/quickstart.md +129 -0
- package/docs/guide/remote-dev.md +67 -0
- package/docs/guide/sandboxes.md +134 -0
- package/docs/guide/self-hosted-platform.md +45 -0
- package/docs/guide/server-routing.md +283 -0
- package/docs/guide/sse.md +174 -0
- package/docs/guide/storage.md +82 -0
- package/docs/guide/testing.md +64 -0
- package/docs/guide/type-safety.md +270 -0
- package/docs/guide/typed-fetch.md +98 -0
- package/docs/guide/websockets.md +230 -0
- package/docs/index.md +102 -0
- package/docs/integrations/agents.md +38 -0
- package/docs/integrations/cloudflare.md +241 -0
- package/docs/integrations/hono.md +127 -0
- package/docs/reference/api/auth.md +195 -0
- package/docs/reference/api/client.md +90 -0
- package/docs/reference/api/database.md +118 -0
- package/docs/reference/api/deploy.md +63 -0
- package/docs/reference/api/durable.md +47 -0
- package/docs/reference/api/env.md +51 -0
- package/docs/reference/api/handlers.md +189 -0
- package/docs/reference/api/plugin.md +40 -0
- package/docs/reference/api/resources.md +116 -0
- package/docs/reference/api/rewrites.md +111 -0
- package/docs/reference/api/types.md +126 -0
- package/docs/reference/api.md +71 -0
- package/docs/reference/cli/auth.md +87 -0
- package/docs/reference/cli/database.md +159 -0
- package/docs/reference/cli/deploy.md +117 -0
- package/docs/reference/cli/domains.md +42 -0
- package/docs/reference/cli/email.md +145 -0
- package/docs/reference/cli/generate.md +113 -0
- package/docs/reference/cli/github.md +181 -0
- package/docs/reference/cli/platform-config.md +93 -0
- package/docs/reference/cli/platform-email.md +81 -0
- package/docs/reference/cli/platform-installation.md +166 -0
- package/docs/reference/cli/platform-operations.md +90 -0
- package/docs/reference/cli/platform-users.md +159 -0
- package/docs/reference/cli/platform-zero-trust.md +60 -0
- package/docs/reference/cli/platform.md +78 -0
- package/docs/reference/cli/project.md +208 -0
- package/docs/reference/cli/secrets.md +79 -0
- package/docs/reference/cli/setup.md +88 -0
- package/docs/reference/cli.md +115 -0
- package/docs/reference/config.md +478 -0
- package/docs/reference/resource-inference.md +72 -0
- package/docs/reference/structure.md +138 -0
- package/package.json +389 -3
- package/sandbox.Dockerfile +4 -0
- package/schema.json +353 -0
- package/skills/bwf/SKILL.md +100 -0
- package/skills/migrate-vite-cloudflare-to-bwf/SKILL.md +53 -0
- package/templates/assets/bwf.svg +5 -0
- package/templates/assets/icons.svg +49 -0
- package/templates/assets/react.svg +1 -0
- package/templates/assets/stack.svg +35 -0
|
@@ -0,0 +1,1946 @@
|
|
|
1
|
+
import { H as outro } from "./dist-STQXl8ck.mjs";
|
|
2
|
+
import { n as getOwnVersion } from "./agents-BLiMq9E1.mjs";
|
|
3
|
+
import { n as operatorGroups, t as operatorCommands } from "./operator-args-BFg32YyY.mjs";
|
|
4
|
+
import { d as helpLine, f as import_picocolors, g as sectionTitle, l as formatUrl, p as note, t as categoryTitle } from "./output-Bb34lF0w.mjs";
|
|
5
|
+
// src/cli/ascii.ts
|
|
6
|
+
const asciiArts = [
|
|
7
|
+
`
|
|
8
|
+
▄ ▄ ▄▄▄ ▄ ▐▌
|
|
9
|
+
█ █ █ █ ▄ ▐▌
|
|
10
|
+
▀▄▀ ▀▄▄▄▀ █ ▗▞▀▜▌
|
|
11
|
+
█ ▝▚▄▟▌`,
|
|
12
|
+
`
|
|
13
|
+
oo dP
|
|
14
|
+
88
|
|
15
|
+
dP .dP .d8888b. dP .d888b88
|
|
16
|
+
88 d8' 88' \`88 88 88' \`88
|
|
17
|
+
88 .88' 88. .88 88 88. .88
|
|
18
|
+
8888P' \`88888P' dP \`88888P8`,
|
|
19
|
+
`
|
|
20
|
+
_ __
|
|
21
|
+
_ ______ (__)___/ /
|
|
22
|
+
| | / / __ \\/ / __ /
|
|
23
|
+
| |/ / /_/ / / /_/ /
|
|
24
|
+
|___/\\____/_/\\__,_/`
|
|
25
|
+
];
|
|
26
|
+
// src/cli/help.ts
|
|
27
|
+
function operatorHelpTree() {
|
|
28
|
+
return Object.fromEntries(operatorGroups.map((group) => {
|
|
29
|
+
const commands = operatorCommands.filter((entry) => entry.group === group);
|
|
30
|
+
return [group, {
|
|
31
|
+
summary: `Administer platform ${group}. Operator credentials are separate from deployment credentials.`,
|
|
32
|
+
usage: [`bwf platform ${group} <command> [options]`],
|
|
33
|
+
commands: commands.map((entry) => ({
|
|
34
|
+
command: entry.action,
|
|
35
|
+
description: entry.description
|
|
36
|
+
})),
|
|
37
|
+
children: Object.fromEntries(commands.map((entry) => [entry.action, {
|
|
38
|
+
summary: `${entry.description}.`,
|
|
39
|
+
usage: entry.usage ?? [`bwf platform ${group} ${entry.action}${entry.positional?.map((name) => entry.optionalPositional ? ` [${name}]` : ` <${name}>`).join("") ?? ""} [options]`],
|
|
40
|
+
options: [
|
|
41
|
+
{
|
|
42
|
+
command: "--connection <slug-or-url>",
|
|
43
|
+
description: "Choose a registered connection; otherwise use BWF_API_URL or the active connection"
|
|
44
|
+
},
|
|
45
|
+
{
|
|
46
|
+
command: "--json",
|
|
47
|
+
description: "Write structured JSON to stdout (JSON Lines while following logs)"
|
|
48
|
+
},
|
|
49
|
+
...entry.method ? [
|
|
50
|
+
{
|
|
51
|
+
command: "--plan",
|
|
52
|
+
description: "Validate and preview without changing anything"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
command: "--yes",
|
|
56
|
+
description: "Apply after preview without prompting; required in unattended scripts"
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
command: "--timeout <seconds>",
|
|
60
|
+
description: "Mutation deadline (default 300 seconds; maximum 3600 seconds)"
|
|
61
|
+
}
|
|
62
|
+
] : [],
|
|
63
|
+
...[
|
|
64
|
+
"list",
|
|
65
|
+
"events",
|
|
66
|
+
"logs",
|
|
67
|
+
"attempts",
|
|
68
|
+
"shared-recipients"
|
|
69
|
+
].includes(entry.action) ? [{
|
|
70
|
+
command: "--limit <number>",
|
|
71
|
+
description: entry.action === "logs" && group !== "email" ? "Maximum 500 log records" : "Maximum 100 records per page"
|
|
72
|
+
}, ...entry.action !== "logs" || group === "email" ? [{
|
|
73
|
+
command: "--page <number>",
|
|
74
|
+
description: "One-based page number"
|
|
75
|
+
}] : []] : [],
|
|
76
|
+
...Object.entries(entry.values ?? {}).map(([flag, description]) => ({
|
|
77
|
+
command: `--${flag} <value>`,
|
|
78
|
+
description
|
|
79
|
+
})),
|
|
80
|
+
...Object.entries(entry.booleans ?? {}).map(([flag, description]) => ({
|
|
81
|
+
command: `--${flag}`,
|
|
82
|
+
description
|
|
83
|
+
}))
|
|
84
|
+
]
|
|
85
|
+
}]))
|
|
86
|
+
}];
|
|
87
|
+
}));
|
|
88
|
+
}
|
|
89
|
+
const HELP_TREE = {
|
|
90
|
+
connect: {
|
|
91
|
+
summary: "Connect this project to Cloudflare or an existing bwf platform. Platform hostnames default to HTTPS.",
|
|
92
|
+
usage: ["bwf connect [url] [--platform <cloudflare|nosam>] [--no-login]"],
|
|
93
|
+
options: [{
|
|
94
|
+
command: "--platform <cloudflare|nosam>",
|
|
95
|
+
description: "Choose the deployment destination"
|
|
96
|
+
}, {
|
|
97
|
+
command: "--no-login",
|
|
98
|
+
description: "Save a bwf connection without authenticating"
|
|
99
|
+
}],
|
|
100
|
+
examples: [
|
|
101
|
+
{
|
|
102
|
+
command: "bwf connect",
|
|
103
|
+
description: "Choose a destination and sign in"
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
command: "bwf connect platform.example.com",
|
|
107
|
+
description: "Join a bwf platform"
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
command: "bwf connect --platform cloudflare",
|
|
111
|
+
description: "Sign in and select a Cloudflare account"
|
|
112
|
+
}
|
|
113
|
+
]
|
|
114
|
+
},
|
|
115
|
+
init: {
|
|
116
|
+
summary: "Set up bwf in a new or existing project.",
|
|
117
|
+
usage: ["bwf init [options]"],
|
|
118
|
+
options: [
|
|
119
|
+
{
|
|
120
|
+
command: "--tsconfig",
|
|
121
|
+
description: "Update tsconfig.json and set up coding agents"
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
command: "--git",
|
|
125
|
+
description: "Initialize a Git repository without prompting"
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
command: "--no-git",
|
|
129
|
+
description: "Skip Git repository initialization"
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
command: "--toolchain <name>",
|
|
133
|
+
description: "Scaffold with vite-plus or vite"
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
command: "--framework <name>",
|
|
137
|
+
description: "Scaffold with react"
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
command: "--starter <name>",
|
|
141
|
+
description: "Scaffold the sqlite, postgresql, mysql, or static starter"
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
command: "--deploy <target>",
|
|
145
|
+
description: "Deploy to cloudflare, bwf, or none"
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
command: "--github",
|
|
149
|
+
description: "Create the GitHub Actions deploy workflow and set up coding agents"
|
|
150
|
+
}
|
|
151
|
+
],
|
|
152
|
+
examples: [
|
|
153
|
+
{
|
|
154
|
+
command: "bwf init",
|
|
155
|
+
description: "Scaffold or configure the current project"
|
|
156
|
+
},
|
|
157
|
+
{
|
|
158
|
+
command: "bwf init --toolchain vite-plus --framework react --starter sqlite --deploy none",
|
|
159
|
+
description: "Scaffold without prompts"
|
|
160
|
+
},
|
|
161
|
+
{
|
|
162
|
+
command: "bwf init --github",
|
|
163
|
+
description: "Scaffold the GitHub Actions deploy workflow"
|
|
164
|
+
}
|
|
165
|
+
]
|
|
166
|
+
},
|
|
167
|
+
migrate: {
|
|
168
|
+
summary: "Update project configuration.",
|
|
169
|
+
usage: ["bwf migrate"],
|
|
170
|
+
examples: [{
|
|
171
|
+
command: "bwf migrate",
|
|
172
|
+
description: "Update project configuration"
|
|
173
|
+
}]
|
|
174
|
+
},
|
|
175
|
+
deploy: {
|
|
176
|
+
summary: "Build and deploy. Offers to link an existing Cloudflare Worker when no destination is configured.",
|
|
177
|
+
usage: ["bwf deploy [options]"],
|
|
178
|
+
options: [
|
|
179
|
+
{
|
|
180
|
+
command: "--project <name>",
|
|
181
|
+
description: "Deploy target project name"
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
command: "--dir <path>",
|
|
185
|
+
description: "Deploy a static directory and skip build"
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
command: "--spa",
|
|
189
|
+
description: "Use SPA mode for static deploys"
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
command: "--skip-build",
|
|
193
|
+
description: "Skip the build step and use existing output (static deploys on Cloudflare)"
|
|
194
|
+
},
|
|
195
|
+
{
|
|
196
|
+
command: "--skip-migrations",
|
|
197
|
+
description: "Deploy without applying application or authentication database migrations"
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
command: "--platform <cloudflare|nosam>",
|
|
201
|
+
description: "Override the platform saved by bwf init"
|
|
202
|
+
},
|
|
203
|
+
{
|
|
204
|
+
command: "--require-email",
|
|
205
|
+
description: "Fail instead of deploying without email when the mail domain is not set up (with --platform cloudflare)"
|
|
206
|
+
},
|
|
207
|
+
{
|
|
208
|
+
command: "--provision",
|
|
209
|
+
description: "Run resource provisioning again, for example to enable D1 read replication (with --platform cloudflare)"
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
command: "--atomic",
|
|
213
|
+
description: "Publish a Durable Object Worker without pre-traffic staging (Cloudflare only)"
|
|
214
|
+
},
|
|
215
|
+
{
|
|
216
|
+
command: "--debug",
|
|
217
|
+
description: "Mirror the deploy log to stderr (always written to ~/.bwf/logs)"
|
|
218
|
+
}
|
|
219
|
+
],
|
|
220
|
+
examples: [
|
|
221
|
+
{
|
|
222
|
+
command: "bwf deploy",
|
|
223
|
+
description: "Deploy the linked project"
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
command: "bwf deploy --project my-app",
|
|
227
|
+
description: "Deploy to a specific project"
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
command: "bwf deploy --dir dist --spa",
|
|
231
|
+
description: "Deploy a static SPA directory"
|
|
232
|
+
},
|
|
233
|
+
{
|
|
234
|
+
command: "bwf deploy --platform cloudflare",
|
|
235
|
+
description: "Deploy to your own Cloudflare account"
|
|
236
|
+
}
|
|
237
|
+
]
|
|
238
|
+
},
|
|
239
|
+
auth: {
|
|
240
|
+
summary: "Authenticate with this project’s saved Cloudflare or bwf destination. Without one, choose interactively or pass --platform.",
|
|
241
|
+
usage: ["bwf auth <login|status|logout> [--platform cloudflare|nosam]"],
|
|
242
|
+
commands: [
|
|
243
|
+
{
|
|
244
|
+
command: "login",
|
|
245
|
+
description: "Sign in to the selected destination"
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
command: "status",
|
|
249
|
+
description: "Show the selected destination’s identity"
|
|
250
|
+
},
|
|
251
|
+
{
|
|
252
|
+
command: "logout",
|
|
253
|
+
description: "Sign out of the selected destination"
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
options: [{
|
|
257
|
+
command: "--platform <cloudflare|nosam>",
|
|
258
|
+
description: "Choose the destination explicitly"
|
|
259
|
+
}],
|
|
260
|
+
children: {
|
|
261
|
+
login: basicSubcommand("Sign in to the selected destination.", "bwf auth login [--platform cloudflare|nosam]"),
|
|
262
|
+
status: basicSubcommand("Show the selected destination’s identity.", "bwf auth status [--platform cloudflare|nosam]"),
|
|
263
|
+
logout: basicSubcommand("Sign out of the selected destination.", "bwf auth logout [--platform cloudflare|nosam]")
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
account: {
|
|
267
|
+
summary: "Manage your bwf platform account.",
|
|
268
|
+
usage: ["bwf account <command>"],
|
|
269
|
+
commands: [
|
|
270
|
+
{
|
|
271
|
+
command: "login",
|
|
272
|
+
description: "Log in with an enabled platform login method"
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
command: "link [connection-id]",
|
|
276
|
+
description: "Link another login method to your account"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
command: "logout",
|
|
280
|
+
description: "Log out and remove credentials"
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
command: "whoami",
|
|
284
|
+
description: "Show the logged-in username"
|
|
285
|
+
},
|
|
286
|
+
{
|
|
287
|
+
command: "token",
|
|
288
|
+
description: "Copy auth token to clipboard"
|
|
289
|
+
}
|
|
290
|
+
],
|
|
291
|
+
children: {
|
|
292
|
+
login: basicSubcommand("Log in with an enabled platform login method.", "bwf account login"),
|
|
293
|
+
link: basicSubcommand("Sign in again, then verify and link another login method to your existing account.", "bwf account link [connection-id]"),
|
|
294
|
+
logout: basicSubcommand("Log out and remove credentials.", "bwf account logout"),
|
|
295
|
+
whoami: basicSubcommand("Show the logged-in username.", "bwf account whoami"),
|
|
296
|
+
token: basicSubcommand("Copy auth token to clipboard.", "bwf account token")
|
|
297
|
+
}
|
|
298
|
+
},
|
|
299
|
+
cloudflare: {
|
|
300
|
+
summary: "Manage Cloudflare authentication used by bwf.",
|
|
301
|
+
usage: ["bwf cloudflare <command>"],
|
|
302
|
+
commands: [
|
|
303
|
+
{
|
|
304
|
+
command: "login",
|
|
305
|
+
description: "Sign in or switch users with browser OAuth"
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
command: "status",
|
|
309
|
+
description: "Show identity, authentication, and the deployment account"
|
|
310
|
+
},
|
|
311
|
+
{
|
|
312
|
+
command: "logout",
|
|
313
|
+
description: "Remove the local browser session"
|
|
314
|
+
}
|
|
315
|
+
],
|
|
316
|
+
children: {
|
|
317
|
+
login: basicSubcommand("Sign in again or switch Cloudflare users with browser OAuth.", "bwf cloudflare login"),
|
|
318
|
+
status: basicSubcommand("Show Cloudflare identity, authentication, accessible accounts, and the pinned deployment account.", "bwf cloudflare status"),
|
|
319
|
+
logout: basicSubcommand("Remove the local browser session.", "bwf cloudflare logout")
|
|
320
|
+
}
|
|
321
|
+
},
|
|
322
|
+
platform: {
|
|
323
|
+
summary: "Install bwf platforms and administer users, projects, access, and operations. Use `bwf connect` to join one.",
|
|
324
|
+
usage: ["bwf platform <command>"],
|
|
325
|
+
commands: [
|
|
326
|
+
...operatorGroups.map((group) => ({
|
|
327
|
+
command: `${group} <command>`,
|
|
328
|
+
description: `Administer platform ${group}`
|
|
329
|
+
})),
|
|
330
|
+
{
|
|
331
|
+
command: "config auth [command]",
|
|
332
|
+
description: "Configure login methods, company protection, and provider recovery"
|
|
333
|
+
},
|
|
334
|
+
{
|
|
335
|
+
command: "config plans [command]",
|
|
336
|
+
description: "Manage plans, account limits, and the default plan"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
command: "list",
|
|
340
|
+
description: "List installed and connected platforms"
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
command: "use [id]",
|
|
344
|
+
description: "Select the default bwf platform"
|
|
345
|
+
},
|
|
346
|
+
{
|
|
347
|
+
command: "status [id]",
|
|
348
|
+
description: "Inspect a platform and its health"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
command: "discover",
|
|
352
|
+
description: "Recover installations from a Cloudflare account"
|
|
353
|
+
},
|
|
354
|
+
{
|
|
355
|
+
command: "domain set <domain>",
|
|
356
|
+
description: "Add an application domain to a test platform"
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
command: "install",
|
|
360
|
+
description: "Install a bwf platform in Cloudflare"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
command: "upgrade [id]",
|
|
364
|
+
description: "Upgrade an installed bwf platform"
|
|
365
|
+
},
|
|
366
|
+
{
|
|
367
|
+
command: "rollback [id]",
|
|
368
|
+
description: "Restore a compatible earlier platform runtime"
|
|
369
|
+
},
|
|
370
|
+
{
|
|
371
|
+
command: "repair [id]",
|
|
372
|
+
description: "Reconcile an installed bwf platform or its unfinished login setup"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
command: "disable [id]",
|
|
376
|
+
description: "Disable traffic without deleting data"
|
|
377
|
+
},
|
|
378
|
+
{
|
|
379
|
+
command: "enable [id]",
|
|
380
|
+
description: "Restore traffic for a disabled platform"
|
|
381
|
+
},
|
|
382
|
+
{
|
|
383
|
+
command: "uninstall [id]",
|
|
384
|
+
description: "Safely remove an installed bwf platform"
|
|
385
|
+
}
|
|
386
|
+
],
|
|
387
|
+
children: {
|
|
388
|
+
...operatorHelpTree(),
|
|
389
|
+
config: {
|
|
390
|
+
summary: "Configure platform settings.",
|
|
391
|
+
usage: ["bwf platform config <auth|plans> [command] [options]"],
|
|
392
|
+
children: {
|
|
393
|
+
plans: {
|
|
394
|
+
summary: "Manage plans and limits. Without a command, opens interactive configuration.",
|
|
395
|
+
usage: ["bwf platform config plans [show|add|set|reset|archive|restore|remove|default|sync] [plan-id] [options]"],
|
|
396
|
+
commands: [
|
|
397
|
+
{
|
|
398
|
+
command: "show [id]",
|
|
399
|
+
description: "Show the catalog or one plan and its account count"
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
command: "add <id> --copy <id> --name <name>",
|
|
403
|
+
description: "Copy an existing plan with a new stable ID"
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
command: "set <id>",
|
|
407
|
+
description: "Edit a plan name, limits, build size, or AI Gateway logging default"
|
|
408
|
+
},
|
|
409
|
+
{
|
|
410
|
+
command: "reset <id>",
|
|
411
|
+
description: "Restore a built-in plan’s original limits and build size"
|
|
412
|
+
},
|
|
413
|
+
{
|
|
414
|
+
command: "archive <id>",
|
|
415
|
+
description: "Keep current accounts while stopping new assignments"
|
|
416
|
+
},
|
|
417
|
+
{
|
|
418
|
+
command: "restore <id>",
|
|
419
|
+
description: "Allow assignments to an archived plan again"
|
|
420
|
+
},
|
|
421
|
+
{
|
|
422
|
+
command: "remove <id>",
|
|
423
|
+
description: "Remove an unused plan or move its accounts to a replacement"
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
command: "default <id>",
|
|
427
|
+
description: "Choose the plan new accounts receive"
|
|
428
|
+
},
|
|
429
|
+
{
|
|
430
|
+
command: "sync",
|
|
431
|
+
description: "Continue pending account limit and AI logging updates"
|
|
432
|
+
}
|
|
433
|
+
],
|
|
434
|
+
options: [
|
|
435
|
+
{
|
|
436
|
+
command: "--connection <slug-or-url>",
|
|
437
|
+
description: "Select a registered platform"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
command: "--file <path>",
|
|
441
|
+
description: "Read plan settings, partial limits, and aiLogging from JSON"
|
|
442
|
+
},
|
|
443
|
+
{
|
|
444
|
+
command: "--name <name>",
|
|
445
|
+
description: "Set the display name when adding or editing"
|
|
446
|
+
},
|
|
447
|
+
{
|
|
448
|
+
command: "--copy <id>",
|
|
449
|
+
description: "Copy this plan when adding a new one"
|
|
450
|
+
},
|
|
451
|
+
{
|
|
452
|
+
command: "--replacement <id>",
|
|
453
|
+
description: "Move accounts and any default before removing a plan"
|
|
454
|
+
},
|
|
455
|
+
{
|
|
456
|
+
command: "--plan",
|
|
457
|
+
description: "Preview the change and affected accounts"
|
|
458
|
+
},
|
|
459
|
+
{
|
|
460
|
+
command: "--yes",
|
|
461
|
+
description: "Apply without prompting"
|
|
462
|
+
},
|
|
463
|
+
{
|
|
464
|
+
command: "--json",
|
|
465
|
+
description: "Print structured output"
|
|
466
|
+
}
|
|
467
|
+
]
|
|
468
|
+
},
|
|
469
|
+
auth: {
|
|
470
|
+
summary: "Manage login methods and independent platform protection. Without a command, opens interactive configuration.",
|
|
471
|
+
usage: ["bwf platform config auth [list|show|initialize|add|configure|test|enable|disable|link|admission|protection|recover] [method-or-action] [options]"],
|
|
472
|
+
commands: [
|
|
473
|
+
{
|
|
474
|
+
command: "list",
|
|
475
|
+
description: "List configured login methods and platform protection"
|
|
476
|
+
},
|
|
477
|
+
{
|
|
478
|
+
command: "show <id>",
|
|
479
|
+
description: "Inspect a login method without displaying secrets"
|
|
480
|
+
},
|
|
481
|
+
{
|
|
482
|
+
command: "initialize",
|
|
483
|
+
description: "Import existing login settings before first configuration"
|
|
484
|
+
},
|
|
485
|
+
{
|
|
486
|
+
command: "add <github|google|oidc|cloudflare-access>",
|
|
487
|
+
description: "Configure a new login method"
|
|
488
|
+
},
|
|
489
|
+
{
|
|
490
|
+
command: "configure <id>",
|
|
491
|
+
description: "Stage an update to a login method"
|
|
492
|
+
},
|
|
493
|
+
{
|
|
494
|
+
command: "test <id>",
|
|
495
|
+
description: "Verify a login configuration in the browser"
|
|
496
|
+
},
|
|
497
|
+
{
|
|
498
|
+
command: "enable <id>",
|
|
499
|
+
description: "Enable a successfully tested configuration"
|
|
500
|
+
},
|
|
501
|
+
{
|
|
502
|
+
command: "disable <id>",
|
|
503
|
+
description: "Disable a method and revoke its human sessions"
|
|
504
|
+
},
|
|
505
|
+
{
|
|
506
|
+
command: "link <id>",
|
|
507
|
+
description: "Explicitly link a tested identity to your account"
|
|
508
|
+
},
|
|
509
|
+
{
|
|
510
|
+
command: "admission",
|
|
511
|
+
description: "Choose invited, company-approved, or public signup"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
command: "protection <enable|disable|show>",
|
|
515
|
+
description: "Create or connect Access protection independently from login"
|
|
516
|
+
},
|
|
517
|
+
{
|
|
518
|
+
command: "recover <id>",
|
|
519
|
+
description: "Recover an existing administrator using installation authority"
|
|
520
|
+
}
|
|
521
|
+
],
|
|
522
|
+
options: [
|
|
523
|
+
{
|
|
524
|
+
command: "--connection <slug-or-url>",
|
|
525
|
+
description: "Select a registered platform"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
command: "--installation <id>",
|
|
529
|
+
description: "Select recovery authority for protection or provider recovery"
|
|
530
|
+
},
|
|
531
|
+
{
|
|
532
|
+
command: "--id <id>",
|
|
533
|
+
description: "Name a new OIDC or Access connection"
|
|
534
|
+
},
|
|
535
|
+
{
|
|
536
|
+
command: "--file <path>",
|
|
537
|
+
description: "Read nonsecret configuration from JSON"
|
|
538
|
+
},
|
|
539
|
+
{
|
|
540
|
+
command: "--client-secret-env <name>",
|
|
541
|
+
description: "Read the client secret from an environment variable"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
command: "--test-id <id>",
|
|
545
|
+
description: "Use a completed test for enable or link"
|
|
546
|
+
},
|
|
547
|
+
{
|
|
548
|
+
command: "--plan",
|
|
549
|
+
description: "Validate and preview a change"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
command: "--yes",
|
|
553
|
+
description: "Apply without prompting"
|
|
554
|
+
},
|
|
555
|
+
{
|
|
556
|
+
command: "--json",
|
|
557
|
+
description: "Print structured output"
|
|
558
|
+
}
|
|
559
|
+
]
|
|
560
|
+
}
|
|
561
|
+
}
|
|
562
|
+
},
|
|
563
|
+
domain: {
|
|
564
|
+
summary: "Add an application domain while keeping existing workers.dev URLs.",
|
|
565
|
+
usage: ["bwf platform domain set <domain> [options]"],
|
|
566
|
+
children: { set: {
|
|
567
|
+
summary: "Set up DNS and verify HTTPS before making an application domain canonical. Rerun to resume.",
|
|
568
|
+
usage: ["bwf platform domain set <domain> [options]"],
|
|
569
|
+
options: [
|
|
570
|
+
{
|
|
571
|
+
command: "--installation <id>",
|
|
572
|
+
description: "Choose an installed platform; otherwise select interactively"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
command: "--zone <domain>",
|
|
576
|
+
description: "Containing Cloudflare zone; detected when it already exists"
|
|
577
|
+
},
|
|
578
|
+
{
|
|
579
|
+
command: "--dedicated-zone",
|
|
580
|
+
description: "Add catch-all routes for a zone dedicated to this platform"
|
|
581
|
+
},
|
|
582
|
+
{
|
|
583
|
+
command: "--plan",
|
|
584
|
+
description: "Preview without making changes"
|
|
585
|
+
},
|
|
586
|
+
{
|
|
587
|
+
command: "--yes",
|
|
588
|
+
description: "Apply without an interactive confirmation"
|
|
589
|
+
}
|
|
590
|
+
]
|
|
591
|
+
} }
|
|
592
|
+
},
|
|
593
|
+
list: basicSubcommand("List installed and connected platforms.", "bwf platform list"),
|
|
594
|
+
use: basicSubcommand("Select the default bwf platform by installation slug, name, saved ID, or API URL.", "bwf platform use [id]"),
|
|
595
|
+
status: basicSubcommand("Inspect a platform and its health.", "bwf platform status [id]"),
|
|
596
|
+
discover: {
|
|
597
|
+
summary: "Recover owned platform installations from Cloudflare.",
|
|
598
|
+
usage: ["bwf platform discover [--account <id>] [--installation <id-or-name>]"],
|
|
599
|
+
options: [{
|
|
600
|
+
command: "--account <id>",
|
|
601
|
+
description: "Cloudflare account id"
|
|
602
|
+
}, {
|
|
603
|
+
command: "--installation <id-or-name>",
|
|
604
|
+
description: "Recover only one installation from a shared account"
|
|
605
|
+
}]
|
|
606
|
+
},
|
|
607
|
+
install: {
|
|
608
|
+
summary: "Install or resume a bwf platform with a domain, or workers.dev for testing.",
|
|
609
|
+
usage: ["bwf platform install [options]"],
|
|
610
|
+
options: [
|
|
611
|
+
{
|
|
612
|
+
command: "--auth-config <path>",
|
|
613
|
+
description: "Read login methods and signup policy from nonsecret JSON with environment secret references"
|
|
614
|
+
},
|
|
615
|
+
{
|
|
616
|
+
command: "--login-methods <methods>",
|
|
617
|
+
description: "Comma-separated github, google, oidc, or cloudflare-access login methods"
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
command: "--access-protection",
|
|
621
|
+
description: "Protect platform UI and APIs with Cloudflare Access"
|
|
622
|
+
},
|
|
623
|
+
{
|
|
624
|
+
command: "--no-access-protection",
|
|
625
|
+
description: "Skip Cloudflare Access protection"
|
|
626
|
+
},
|
|
627
|
+
{
|
|
628
|
+
command: "--app-access <public|platform|custom>",
|
|
629
|
+
description: "Choose public apps, reuse platform Access, or select separate app policies"
|
|
630
|
+
},
|
|
631
|
+
{
|
|
632
|
+
command: "--hyperdrive <create|id>",
|
|
633
|
+
description: "Create Hyperdrive or use the specified existing configuration"
|
|
634
|
+
},
|
|
635
|
+
{
|
|
636
|
+
command: "--name <slug>",
|
|
637
|
+
description: "Installation name"
|
|
638
|
+
},
|
|
639
|
+
{
|
|
640
|
+
command: "--workers-dev",
|
|
641
|
+
description: "Use workers.dev for testing. Add a domain later."
|
|
642
|
+
},
|
|
643
|
+
{
|
|
644
|
+
command: "--display-name <name>",
|
|
645
|
+
description: "Human-readable platform name"
|
|
646
|
+
},
|
|
647
|
+
{
|
|
648
|
+
command: "--account <id>",
|
|
649
|
+
description: "Cloudflare account id"
|
|
650
|
+
},
|
|
651
|
+
{
|
|
652
|
+
command: "--application-domain <domain>",
|
|
653
|
+
description: "Base domain for applications"
|
|
654
|
+
},
|
|
655
|
+
{
|
|
656
|
+
command: "--zone <domain>",
|
|
657
|
+
description: "Cloudflare zone containing the app domain"
|
|
658
|
+
},
|
|
659
|
+
{
|
|
660
|
+
command: "--dedicated-zone",
|
|
661
|
+
description: "Allow zone-wide application catch-all routes"
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
command: "--no-dedicated-zone",
|
|
665
|
+
description: "Skip zone-wide application catch-all routes"
|
|
666
|
+
},
|
|
667
|
+
{
|
|
668
|
+
command: "--custom-domains",
|
|
669
|
+
description: "Let projects add their own domains (requires --dedicated-zone)"
|
|
670
|
+
},
|
|
671
|
+
{
|
|
672
|
+
command: "--control-plane-domain <domain>",
|
|
673
|
+
description: "Optional API hostname"
|
|
674
|
+
},
|
|
675
|
+
{
|
|
676
|
+
command: "--no-control-plane-domain",
|
|
677
|
+
description: "Use the default workers.dev API hostname"
|
|
678
|
+
},
|
|
679
|
+
{
|
|
680
|
+
command: "--dashboard-url <origin>",
|
|
681
|
+
description: "HTTPS origin of a separately deployed dashboard"
|
|
682
|
+
},
|
|
683
|
+
{
|
|
684
|
+
command: "--plan",
|
|
685
|
+
description: "Print the exact plan without changing Cloudflare"
|
|
686
|
+
},
|
|
687
|
+
{
|
|
688
|
+
command: "--resume",
|
|
689
|
+
description: "Resume the matching local installation"
|
|
690
|
+
},
|
|
691
|
+
{
|
|
692
|
+
command: "--runtime <path>",
|
|
693
|
+
description: "Deploy an integrity-checked runtime directory instead of the package"
|
|
694
|
+
},
|
|
695
|
+
{
|
|
696
|
+
command: "--runtime-logs <full|minimal>",
|
|
697
|
+
description: "minimal keeps request URLs, console and exception messages out of runtime logs"
|
|
698
|
+
},
|
|
699
|
+
{
|
|
700
|
+
command: "--yes",
|
|
701
|
+
description: "Acknowledge changes without an interactive prompt"
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
command: "--storage-location <hint|automatic>",
|
|
705
|
+
description: "Default R2 location hint for new project buckets (apac, eeur, enam, weur, wnam, oc)"
|
|
706
|
+
}
|
|
707
|
+
]
|
|
708
|
+
},
|
|
709
|
+
upgrade: lifecycleHelp("upgrade", "Upgrade an installed platform without deleting resources."),
|
|
710
|
+
rollback: {
|
|
711
|
+
summary: "Restore a compatible earlier runtime without reversing database migrations.",
|
|
712
|
+
usage: ["bwf platform rollback [id] --runtime <earlier-path> [--from-runtime <current-path>] [--plan] [--yes]"],
|
|
713
|
+
options: [
|
|
714
|
+
{
|
|
715
|
+
command: "--runtime <path>",
|
|
716
|
+
description: "Earlier compatible runtime to restore"
|
|
717
|
+
},
|
|
718
|
+
{
|
|
719
|
+
command: "--from-runtime <path>",
|
|
720
|
+
description: "Current installed runtime when it differs from the packaged runtime"
|
|
721
|
+
},
|
|
722
|
+
{
|
|
723
|
+
command: "--plan",
|
|
724
|
+
description: "Print the exact plan without making changes"
|
|
725
|
+
},
|
|
726
|
+
{
|
|
727
|
+
command: "--yes",
|
|
728
|
+
description: "Acknowledge non-interactive Cloudflare changes"
|
|
729
|
+
}
|
|
730
|
+
]
|
|
731
|
+
},
|
|
732
|
+
repair: lifecycleHelp("repair", "Reconcile drift using the installation ownership manifest, or change the login settings while first administrator setup is pending."),
|
|
733
|
+
disable: lifecycleHelp("disable", "Disable platform traffic without deleting data."),
|
|
734
|
+
enable: lifecycleHelp("enable", "Restore configured traffic for a disabled platform."),
|
|
735
|
+
uninstall: {
|
|
736
|
+
summary: "Safely remove installer-owned platform resources.",
|
|
737
|
+
usage: ["bwf platform uninstall [id] [options]"],
|
|
738
|
+
options: [
|
|
739
|
+
{
|
|
740
|
+
command: "--plan",
|
|
741
|
+
description: "Print the exact deletion and retention plan"
|
|
742
|
+
},
|
|
743
|
+
{
|
|
744
|
+
command: "--yes",
|
|
745
|
+
description: "Acknowledge changes without an interactive prompt"
|
|
746
|
+
},
|
|
747
|
+
{
|
|
748
|
+
command: "--purge-data",
|
|
749
|
+
description: "Delete installer-owned data even when it contains apps"
|
|
750
|
+
},
|
|
751
|
+
{
|
|
752
|
+
command: "--purge-resources",
|
|
753
|
+
description: "Delete every resource the installation created (includes --purge-data); keeps zones, adopted resources, and PostgreSQL"
|
|
754
|
+
},
|
|
755
|
+
{
|
|
756
|
+
command: "--keep-zone",
|
|
757
|
+
description: "Deprecated. Has no effect: uninstall always keeps zones"
|
|
758
|
+
}
|
|
759
|
+
]
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
},
|
|
763
|
+
project: {
|
|
764
|
+
summary: "Manage bwf projects and deployments.",
|
|
765
|
+
usage: ["bwf project <command>"],
|
|
766
|
+
commands: [
|
|
767
|
+
{
|
|
768
|
+
command: "status [name]",
|
|
769
|
+
description: "Show deployments for a project"
|
|
770
|
+
},
|
|
771
|
+
{
|
|
772
|
+
command: "link [name]",
|
|
773
|
+
description: "Link this directory to a project"
|
|
774
|
+
},
|
|
775
|
+
{
|
|
776
|
+
command: "list",
|
|
777
|
+
description: "List your projects"
|
|
778
|
+
},
|
|
779
|
+
{
|
|
780
|
+
command: "token <command>",
|
|
781
|
+
description: "Manage project-scoped CI deploy credentials"
|
|
782
|
+
},
|
|
783
|
+
{
|
|
784
|
+
command: "team <command>",
|
|
785
|
+
description: "Manage members and project invitations"
|
|
786
|
+
},
|
|
787
|
+
{
|
|
788
|
+
command: "zero-trust <command>",
|
|
789
|
+
description: "Inspect or override Cloudflare Zero Trust protection"
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
command: "logs",
|
|
793
|
+
description: "Show runtime logs from the deployed project"
|
|
794
|
+
},
|
|
795
|
+
{
|
|
796
|
+
command: "requests",
|
|
797
|
+
description: "Show request-level traffic (status, method, timing)"
|
|
798
|
+
},
|
|
799
|
+
{
|
|
800
|
+
command: "rollback [deployId]",
|
|
801
|
+
description: "Roll back to a previous deployment"
|
|
802
|
+
},
|
|
803
|
+
{
|
|
804
|
+
command: "cancel [deployId]",
|
|
805
|
+
description: "Cancel an active deployment"
|
|
806
|
+
},
|
|
807
|
+
{
|
|
808
|
+
command: "delete [name]",
|
|
809
|
+
description: "Delete a project and all its resources"
|
|
810
|
+
}
|
|
811
|
+
],
|
|
812
|
+
children: {
|
|
813
|
+
status: basicSubcommand("Show deployments for a project.", "bwf project status [name]", "bwf project status my-app"),
|
|
814
|
+
link: basicSubcommand("Link this directory to a bwf project.", "bwf project link [name]", "bwf project link my-app"),
|
|
815
|
+
list: basicSubcommand("List your projects.", "bwf project list"),
|
|
816
|
+
token: {
|
|
817
|
+
summary: "Manage revocable, project-scoped credentials for CI deploys.",
|
|
818
|
+
usage: ["bwf project token <create|list|renew|revoke> [options]"],
|
|
819
|
+
options: [
|
|
820
|
+
{
|
|
821
|
+
command: "--project <name>",
|
|
822
|
+
description: "Project name override"
|
|
823
|
+
},
|
|
824
|
+
{
|
|
825
|
+
command: "--name <label>",
|
|
826
|
+
description: "Credential label (create only)"
|
|
827
|
+
},
|
|
828
|
+
{
|
|
829
|
+
command: "--expires-in <days>",
|
|
830
|
+
description: "Expiry from 1 to 90 days"
|
|
831
|
+
},
|
|
832
|
+
{
|
|
833
|
+
command: "--json",
|
|
834
|
+
description: "Print machine-readable output"
|
|
835
|
+
}
|
|
836
|
+
],
|
|
837
|
+
examples: [{
|
|
838
|
+
command: "bwf project token create --name github-actions --expires-in 30",
|
|
839
|
+
description: "Create a CI deploy credential"
|
|
840
|
+
}, {
|
|
841
|
+
command: "bwf project token revoke <id>",
|
|
842
|
+
description: "Revoke a credential now"
|
|
843
|
+
}]
|
|
844
|
+
},
|
|
845
|
+
team: {
|
|
846
|
+
summary: "Manage members and invitations for bwf platform projects.",
|
|
847
|
+
usage: ["bwf project team <command>"],
|
|
848
|
+
commands: [
|
|
849
|
+
{
|
|
850
|
+
command: "list",
|
|
851
|
+
description: "List project members and roles"
|
|
852
|
+
},
|
|
853
|
+
{
|
|
854
|
+
command: "invite <email>",
|
|
855
|
+
description: "Invite a registered user by email"
|
|
856
|
+
},
|
|
857
|
+
{
|
|
858
|
+
command: "invitations",
|
|
859
|
+
description: "List invitations sent for a project"
|
|
860
|
+
},
|
|
861
|
+
{
|
|
862
|
+
command: "role <user-id> <role>",
|
|
863
|
+
description: "Change a member's role"
|
|
864
|
+
},
|
|
865
|
+
{
|
|
866
|
+
command: "remove <user-id>",
|
|
867
|
+
description: "Remove a project member"
|
|
868
|
+
},
|
|
869
|
+
{
|
|
870
|
+
command: "revoke <invitation-id>",
|
|
871
|
+
description: "Revoke a project invitation"
|
|
872
|
+
},
|
|
873
|
+
{
|
|
874
|
+
command: "leave",
|
|
875
|
+
description: "Leave a shared project"
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
command: "pending",
|
|
879
|
+
description: "List invitations awaiting your response"
|
|
880
|
+
},
|
|
881
|
+
{
|
|
882
|
+
command: "accept <invitation-id>",
|
|
883
|
+
description: "Accept your invitation"
|
|
884
|
+
},
|
|
885
|
+
{
|
|
886
|
+
command: "decline <invitation-id>",
|
|
887
|
+
description: "Decline your invitation"
|
|
888
|
+
}
|
|
889
|
+
],
|
|
890
|
+
children: {
|
|
891
|
+
list: withProjectOption("List project members and roles.", "bwf project team list [options]"),
|
|
892
|
+
invite: {
|
|
893
|
+
summary: "Invite an existing bwf platform user by registered email address.",
|
|
894
|
+
usage: ["bwf project team invite <email> --role <role> [options]"],
|
|
895
|
+
options: [{
|
|
896
|
+
command: "--role <role>",
|
|
897
|
+
description: "reader, collaborator, or admin"
|
|
898
|
+
}, {
|
|
899
|
+
command: "--project <name>",
|
|
900
|
+
description: "Project name override"
|
|
901
|
+
}]
|
|
902
|
+
},
|
|
903
|
+
invitations: withProjectOption("List invitations sent for a project.", "bwf project team invitations [options]"),
|
|
904
|
+
role: withProjectOption("Change a member's role to reader, collaborator, or admin.", "bwf project team role <user-id> <role> [options]"),
|
|
905
|
+
remove: withProjectOption("Remove a member from the project.", "bwf project team remove <user-id> [options]"),
|
|
906
|
+
revoke: withProjectOption("Revoke a pending project invitation.", "bwf project team revoke <invitation-id> [options]"),
|
|
907
|
+
leave: withProjectOption("Leave a shared project.", "bwf project team leave [options]"),
|
|
908
|
+
pending: basicSubcommand("List invitations on the active platform connection (BWF_API_URL overrides it).", "bwf project team pending"),
|
|
909
|
+
accept: basicSubcommand("Accept your invitation on the active platform connection, preserving project links.", "bwf project team accept <invitation-id>"),
|
|
910
|
+
decline: basicSubcommand("Decline your invitation on the active platform connection (BWF_API_URL overrides it).", "bwf project team decline <invitation-id>")
|
|
911
|
+
}
|
|
912
|
+
},
|
|
913
|
+
"zero-trust": {
|
|
914
|
+
summary: "Inspect and manage Zero Trust protection for a bwf platform project.",
|
|
915
|
+
usage: ["bwf project zero-trust <status|protect|public|reconcile> [options]"],
|
|
916
|
+
commands: [
|
|
917
|
+
{
|
|
918
|
+
command: "status",
|
|
919
|
+
description: "Show desired and effective protection state"
|
|
920
|
+
},
|
|
921
|
+
{
|
|
922
|
+
command: "protect",
|
|
923
|
+
description: "Protect the project"
|
|
924
|
+
},
|
|
925
|
+
{
|
|
926
|
+
command: "public",
|
|
927
|
+
description: "Make the project public"
|
|
928
|
+
},
|
|
929
|
+
{
|
|
930
|
+
command: "reconcile",
|
|
931
|
+
description: "Repair Cloudflare Access configuration drift"
|
|
932
|
+
}
|
|
933
|
+
],
|
|
934
|
+
options: [{
|
|
935
|
+
command: "--project <name>",
|
|
936
|
+
description: "Project name override"
|
|
937
|
+
}],
|
|
938
|
+
children: Object.fromEntries([
|
|
939
|
+
"status",
|
|
940
|
+
"protect",
|
|
941
|
+
"public",
|
|
942
|
+
"reconcile"
|
|
943
|
+
].map((action) => [action, withProjectOption(action === "status" ? "Show desired and effective Zero Trust protection." : action === "protect" ? "Protect the project with the platform Access policy." : action === "public" ? "Make the project public with a managed Access bypass." : "Repair Cloudflare Access configuration drift for the project.", `bwf project zero-trust ${action} [options]`)]))
|
|
944
|
+
},
|
|
945
|
+
logs: {
|
|
946
|
+
summary: "Show runtime logs from the deployed project.",
|
|
947
|
+
usage: ["bwf project logs [options]"],
|
|
948
|
+
options: [
|
|
949
|
+
{
|
|
950
|
+
command: "--filter <text>",
|
|
951
|
+
description: "Substring search over log messages"
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
command: "--level <level>",
|
|
955
|
+
description: "Filter by level: error|warn|info|log|debug|all (default: all)"
|
|
956
|
+
},
|
|
957
|
+
{
|
|
958
|
+
command: "--range <range>",
|
|
959
|
+
description: "Time range to query (default: 1h)"
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
command: "--deployment <id>",
|
|
963
|
+
description: "Limit logs to one deployment"
|
|
964
|
+
}
|
|
965
|
+
],
|
|
966
|
+
examples: [
|
|
967
|
+
{
|
|
968
|
+
command: "bwf project logs --range 30m",
|
|
969
|
+
description: "Show recent project logs"
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
command: "bwf project logs --level error",
|
|
973
|
+
description: "Show only error-level entries and exceptions"
|
|
974
|
+
},
|
|
975
|
+
{
|
|
976
|
+
command: "bwf project logs --filter websocket",
|
|
977
|
+
description: "Substring search over log messages"
|
|
978
|
+
}
|
|
979
|
+
]
|
|
980
|
+
},
|
|
981
|
+
requests: {
|
|
982
|
+
summary: "Show request-level traffic (status, method, type, timing). Surfaces 5xx that the edge router generated itself and requests to static/SPA projects that never invoke a worker — neither of which appears in `project logs`.",
|
|
983
|
+
usage: ["bwf project requests [options]"],
|
|
984
|
+
options: [{
|
|
985
|
+
command: "--status <filter>",
|
|
986
|
+
description: "Filter by status: a class like 5xx or an exact code like 500"
|
|
987
|
+
}, {
|
|
988
|
+
command: "--range <range>",
|
|
989
|
+
description: "Time range to query (default: 1h)"
|
|
990
|
+
}],
|
|
991
|
+
examples: [{
|
|
992
|
+
command: "bwf project requests --status 5xx",
|
|
993
|
+
description: "Show recent server-error responses, including edge-generated ones"
|
|
994
|
+
}, {
|
|
995
|
+
command: "bwf project requests --range 24h",
|
|
996
|
+
description: "Show all request traffic in the last day"
|
|
997
|
+
}]
|
|
998
|
+
},
|
|
999
|
+
rollback: {
|
|
1000
|
+
summary: "Roll back to a previous deployment.",
|
|
1001
|
+
usage: ["bwf project rollback [deployId] [--platform cloudflare]"],
|
|
1002
|
+
options: [{
|
|
1003
|
+
command: "--platform cloudflare",
|
|
1004
|
+
description: "Roll back the Cloudflare Worker after a one-off Cloudflare deploy"
|
|
1005
|
+
}]
|
|
1006
|
+
},
|
|
1007
|
+
cancel: basicSubcommand("Cancel an active deployment.", "bwf project cancel [deployId]"),
|
|
1008
|
+
delete: {
|
|
1009
|
+
summary: "Delete a project and all its resources.",
|
|
1010
|
+
usage: ["bwf project delete [name] [options]"],
|
|
1011
|
+
options: [{
|
|
1012
|
+
command: "--force, -f",
|
|
1013
|
+
description: "Delete without confirmation"
|
|
1014
|
+
}],
|
|
1015
|
+
examples: [{
|
|
1016
|
+
command: "bwf project delete my-app",
|
|
1017
|
+
description: "Delete a project"
|
|
1018
|
+
}]
|
|
1019
|
+
}
|
|
1020
|
+
}
|
|
1021
|
+
},
|
|
1022
|
+
secret: {
|
|
1023
|
+
summary: "Manage production secrets for bwf projects.",
|
|
1024
|
+
usage: ["bwf secret <command>"],
|
|
1025
|
+
commands: [
|
|
1026
|
+
{
|
|
1027
|
+
command: "list",
|
|
1028
|
+
description: "List project secrets"
|
|
1029
|
+
},
|
|
1030
|
+
{
|
|
1031
|
+
command: "put <name>",
|
|
1032
|
+
description: "Set a project secret"
|
|
1033
|
+
},
|
|
1034
|
+
{
|
|
1035
|
+
command: "delete <name>",
|
|
1036
|
+
description: "Delete a project secret"
|
|
1037
|
+
},
|
|
1038
|
+
{
|
|
1039
|
+
command: "sync <file>",
|
|
1040
|
+
description: "Sync secrets from a dotenv file"
|
|
1041
|
+
}
|
|
1042
|
+
],
|
|
1043
|
+
children: {
|
|
1044
|
+
list: withProjectOption("List project secrets.", "bwf secret list [options]"),
|
|
1045
|
+
put: withProjectOption("Set a project secret.", "bwf secret put <name> [options]"),
|
|
1046
|
+
delete: withProjectOption("Delete a project secret.", "bwf secret delete <name> [options]"),
|
|
1047
|
+
sync: {
|
|
1048
|
+
summary: "Sync secrets from a dotenv file.",
|
|
1049
|
+
usage: ["bwf secret sync <file> [options]"],
|
|
1050
|
+
options: [{
|
|
1051
|
+
command: "--project <name>",
|
|
1052
|
+
description: "Project name override"
|
|
1053
|
+
}, {
|
|
1054
|
+
command: "--yes",
|
|
1055
|
+
description: "Skip confirmation (required in CI and non-interactive shells)"
|
|
1056
|
+
}]
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
},
|
|
1060
|
+
domain: {
|
|
1061
|
+
summary: "Configure custom domains for bwf projects.",
|
|
1062
|
+
usage: ["bwf domain <command>"],
|
|
1063
|
+
commands: [
|
|
1064
|
+
{
|
|
1065
|
+
command: "add <hostname>",
|
|
1066
|
+
description: "Add a custom domain"
|
|
1067
|
+
},
|
|
1068
|
+
{
|
|
1069
|
+
command: "delete <hostname>",
|
|
1070
|
+
description: "Remove a custom domain"
|
|
1071
|
+
},
|
|
1072
|
+
{
|
|
1073
|
+
command: "list",
|
|
1074
|
+
description: "List custom domains and status"
|
|
1075
|
+
},
|
|
1076
|
+
{
|
|
1077
|
+
command: "status <hostname>",
|
|
1078
|
+
description: "Check domain verification status"
|
|
1079
|
+
}
|
|
1080
|
+
],
|
|
1081
|
+
children: {
|
|
1082
|
+
add: withProjectOption("Add a custom domain.", "bwf domain add <hostname> [options]"),
|
|
1083
|
+
delete: withProjectOption("Remove a custom domain.", "bwf domain delete <hostname> [options]"),
|
|
1084
|
+
list: withProjectOption("List custom domains and status.", "bwf domain list [options]"),
|
|
1085
|
+
status: {
|
|
1086
|
+
summary: "Check domain verification status. Prints a rolled-up state with a one-line diagnostic.",
|
|
1087
|
+
usage: ["bwf domain status <hostname> [options]"],
|
|
1088
|
+
options: [{
|
|
1089
|
+
command: "--project <name>",
|
|
1090
|
+
description: "Project name override"
|
|
1091
|
+
}, {
|
|
1092
|
+
command: "--verbose",
|
|
1093
|
+
description: "Also print the raw multi-line status breakdown"
|
|
1094
|
+
}]
|
|
1095
|
+
}
|
|
1096
|
+
}
|
|
1097
|
+
},
|
|
1098
|
+
email: {
|
|
1099
|
+
summary: "Inspect email activity, manage verified recipients, and send and receive at your own domain.",
|
|
1100
|
+
usage: ["bwf email <command>"],
|
|
1101
|
+
commands: [
|
|
1102
|
+
{
|
|
1103
|
+
command: "usage",
|
|
1104
|
+
description: "Show monthly outbound/inbound counts and quota"
|
|
1105
|
+
},
|
|
1106
|
+
{
|
|
1107
|
+
command: "logs",
|
|
1108
|
+
description: "Show recent email delivery activity"
|
|
1109
|
+
},
|
|
1110
|
+
{
|
|
1111
|
+
command: "destinations",
|
|
1112
|
+
description: "List verified recipient addresses"
|
|
1113
|
+
},
|
|
1114
|
+
{
|
|
1115
|
+
command: "allow <address>",
|
|
1116
|
+
description: "Add a recipient and trigger CF verification"
|
|
1117
|
+
},
|
|
1118
|
+
{
|
|
1119
|
+
command: "disallow <address>",
|
|
1120
|
+
description: "Remove a recipient from the allowlist"
|
|
1121
|
+
},
|
|
1122
|
+
{
|
|
1123
|
+
command: "alias [name]",
|
|
1124
|
+
description: "Show the shared mail address, or set a shorter permanent name for it"
|
|
1125
|
+
},
|
|
1126
|
+
{
|
|
1127
|
+
command: "domain <add|status|list|sync|rotate-secret|remove>",
|
|
1128
|
+
description: "Send and receive at your own domain on a Cloudflare zone"
|
|
1129
|
+
},
|
|
1130
|
+
{
|
|
1131
|
+
command: "status --platform cloudflare",
|
|
1132
|
+
description: "Show the email setup state and address map on your own account"
|
|
1133
|
+
},
|
|
1134
|
+
{
|
|
1135
|
+
command: "setup --platform cloudflare",
|
|
1136
|
+
description: "Set email up on your own Cloudflare account (one confirmation)"
|
|
1137
|
+
}
|
|
1138
|
+
],
|
|
1139
|
+
children: {
|
|
1140
|
+
usage: withProjectOption("Show monthly outbound/inbound counts and quota.", "bwf email usage [options]"),
|
|
1141
|
+
logs: {
|
|
1142
|
+
summary: "Show recent email delivery activity.",
|
|
1143
|
+
usage: ["bwf email logs [options]"],
|
|
1144
|
+
options: [{
|
|
1145
|
+
command: "--project <name>",
|
|
1146
|
+
description: "Project name override"
|
|
1147
|
+
}, {
|
|
1148
|
+
command: "--limit <n>",
|
|
1149
|
+
description: "How many entries to show (positive integer)"
|
|
1150
|
+
}]
|
|
1151
|
+
},
|
|
1152
|
+
destinations: withProjectOption("List verified recipient addresses.", "bwf email destinations [options]"),
|
|
1153
|
+
allow: withProjectOption("Add a recipient and trigger a Cloudflare verification email.", "bwf email allow <address> [options]"),
|
|
1154
|
+
disallow: withProjectOption("Remove a recipient from the verified allowlist.", "bwf email disallow <address> [options]"),
|
|
1155
|
+
alias: {
|
|
1156
|
+
summary: "Show the project address on the shared mail domain, or give it a shorter name. The alias is permanent; the slug address keeps working.",
|
|
1157
|
+
usage: ["bwf email alias [options]", "bwf email alias <name> [options]"],
|
|
1158
|
+
options: [{
|
|
1159
|
+
command: "--project <name>",
|
|
1160
|
+
description: "Project name override"
|
|
1161
|
+
}, {
|
|
1162
|
+
command: "--yes",
|
|
1163
|
+
description: "Set the alias without asking (it cannot be changed)"
|
|
1164
|
+
}]
|
|
1165
|
+
},
|
|
1166
|
+
domain: {
|
|
1167
|
+
summary: "Send and receive at your own domain on a Cloudflare zone.",
|
|
1168
|
+
usage: ["bwf email domain <verb> [<domain>] [options]"],
|
|
1169
|
+
commands: [
|
|
1170
|
+
{
|
|
1171
|
+
command: "add <domain>",
|
|
1172
|
+
description: "Register the domain with a scoped Cloudflare API token"
|
|
1173
|
+
},
|
|
1174
|
+
{
|
|
1175
|
+
command: "status <domain>",
|
|
1176
|
+
description: "Show inbound, outbound, management, and operation readiness"
|
|
1177
|
+
},
|
|
1178
|
+
{
|
|
1179
|
+
command: "list",
|
|
1180
|
+
description: "List registered email domains"
|
|
1181
|
+
},
|
|
1182
|
+
{
|
|
1183
|
+
command: "rotate-secret <domain>",
|
|
1184
|
+
description: "Rotate the shared zone ingress secret with a deployment probe"
|
|
1185
|
+
},
|
|
1186
|
+
{
|
|
1187
|
+
command: "sync <domain>",
|
|
1188
|
+
description: "Reconcile the zone connection and refresh readiness"
|
|
1189
|
+
},
|
|
1190
|
+
{
|
|
1191
|
+
command: "remove <domain>",
|
|
1192
|
+
description: "Disable the domain assignment and reconcile shared resources"
|
|
1193
|
+
}
|
|
1194
|
+
],
|
|
1195
|
+
options: [{
|
|
1196
|
+
command: "--project <name>",
|
|
1197
|
+
description: "Project name override"
|
|
1198
|
+
}],
|
|
1199
|
+
children: {
|
|
1200
|
+
add: {
|
|
1201
|
+
summary: "Register a Cloudflare zone apex you own for sending and receiving.",
|
|
1202
|
+
usage: ["bwf email domain add <domain> [options]"],
|
|
1203
|
+
options: [{
|
|
1204
|
+
command: "--project <name>",
|
|
1205
|
+
description: "Project name override"
|
|
1206
|
+
}]
|
|
1207
|
+
},
|
|
1208
|
+
status: withProjectOption("Show a registered domain and its recorded readiness.", "bwf email domain status <domain> [options]"),
|
|
1209
|
+
list: withProjectOption("List registered email domains.", "bwf email domain list [options]"),
|
|
1210
|
+
"rotate-secret": withProjectOption("Rotate the shared zone ingress secret and verify the deployed generation.", "bwf email domain rotate-secret <domain> [options]"),
|
|
1211
|
+
sync: withProjectOption("Reconcile the zone connection and refresh readiness.", "bwf email domain sync <domain> [options]"),
|
|
1212
|
+
remove: withProjectOption("Disable the domain assignment and reconcile shared resources.", "bwf email domain remove <domain> [options]")
|
|
1213
|
+
}
|
|
1214
|
+
},
|
|
1215
|
+
status: {
|
|
1216
|
+
summary: "Show the email setup state and address map. Exit 1 when not ready.",
|
|
1217
|
+
usage: ["bwf email status --platform cloudflare"],
|
|
1218
|
+
options: [{
|
|
1219
|
+
command: "--platform cloudflare",
|
|
1220
|
+
description: "Your own Cloudflare account (required; on the bwf platform use `bwf email usage`)"
|
|
1221
|
+
}]
|
|
1222
|
+
},
|
|
1223
|
+
setup: {
|
|
1224
|
+
summary: "Set email up on your own Cloudflare account: enable Email Routing, onboard Email Sending, and record send_email + addresses in the Cloudflare config managed by bwf. Asks once before changing the account.",
|
|
1225
|
+
usage: ["bwf email setup --platform cloudflare"],
|
|
1226
|
+
options: [{
|
|
1227
|
+
command: "--platform cloudflare",
|
|
1228
|
+
description: "Your own Cloudflare account (required; the bwf platform needs no setup)"
|
|
1229
|
+
}]
|
|
1230
|
+
}
|
|
1231
|
+
}
|
|
1232
|
+
},
|
|
1233
|
+
github: {
|
|
1234
|
+
summary: "Connect a GitHub repository for automatic deploys.",
|
|
1235
|
+
usage: ["bwf github <command>"],
|
|
1236
|
+
commands: [
|
|
1237
|
+
{
|
|
1238
|
+
command: "install",
|
|
1239
|
+
description: "Open the GitHub App install page in your browser"
|
|
1240
|
+
},
|
|
1241
|
+
{
|
|
1242
|
+
command: "installations",
|
|
1243
|
+
description: "List your GitHub App installations"
|
|
1244
|
+
},
|
|
1245
|
+
{
|
|
1246
|
+
command: "connect [project]",
|
|
1247
|
+
description: "Connect a repository to a project for auto-deploy"
|
|
1248
|
+
},
|
|
1249
|
+
{
|
|
1250
|
+
command: "update [project]",
|
|
1251
|
+
description: "Update an existing connection's branch, build executor, or deploy workflow"
|
|
1252
|
+
},
|
|
1253
|
+
{
|
|
1254
|
+
command: "status [project]",
|
|
1255
|
+
description: "Show a project's GitHub connection (repo, branch, executor, workflow)"
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
command: "disconnect [project]",
|
|
1259
|
+
description: "Disconnect a project from its GitHub repository"
|
|
1260
|
+
},
|
|
1261
|
+
{
|
|
1262
|
+
command: "link",
|
|
1263
|
+
description: "Link your GitHub account to bwf"
|
|
1264
|
+
},
|
|
1265
|
+
{
|
|
1266
|
+
command: "join",
|
|
1267
|
+
description: "Join your organization's shared GitHub App installations"
|
|
1268
|
+
}
|
|
1269
|
+
],
|
|
1270
|
+
children: {
|
|
1271
|
+
install: basicSubcommand("Open the GitHub App install page in your browser.", "bwf github install"),
|
|
1272
|
+
installations: basicSubcommand("List your GitHub App installations.", "bwf github installations"),
|
|
1273
|
+
link: basicSubcommand("Link your GitHub account to bwf.", "bwf github link"),
|
|
1274
|
+
join: basicSubcommand("Join your organization's shared GitHub App installations.", "bwf github join"),
|
|
1275
|
+
connect: {
|
|
1276
|
+
summary: "Connect a repository to a project for automatic deploys.",
|
|
1277
|
+
usage: ["bwf github connect [project] [options]"],
|
|
1278
|
+
options: [
|
|
1279
|
+
{
|
|
1280
|
+
command: "--project <name>",
|
|
1281
|
+
description: "Project name (alias for positional)"
|
|
1282
|
+
},
|
|
1283
|
+
{
|
|
1284
|
+
command: "--installation <id>",
|
|
1285
|
+
description: "GitHub App installation ID"
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
command: "--repo <owner/repo>",
|
|
1289
|
+
description: "Repository full name (owner/repo)"
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
command: "--branch <name>",
|
|
1293
|
+
description: "Branch to deploy from (required in non-interactive mode)"
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
command: "--executor <type>",
|
|
1297
|
+
description: "Build executor: container (default) | github_actions; prompted interactively when omitted"
|
|
1298
|
+
},
|
|
1299
|
+
{
|
|
1300
|
+
command: "--workflow <path>",
|
|
1301
|
+
description: "Authorized deploy workflow file (default .github/workflows/bwf-deploy.yml); prompted interactively when using github_actions"
|
|
1302
|
+
}
|
|
1303
|
+
],
|
|
1304
|
+
examples: [
|
|
1305
|
+
{
|
|
1306
|
+
command: "bwf github connect [project]",
|
|
1307
|
+
description: "Connect a repository to a project"
|
|
1308
|
+
},
|
|
1309
|
+
{
|
|
1310
|
+
command: "bwf github connect my-app --installation 42 --repo owner/repo --branch main",
|
|
1311
|
+
description: "Non-interactive connect (all flags explicit)"
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
command: "bwf github connect my-app --repo owner/repo --branch main --executor github_actions",
|
|
1315
|
+
description: "Non-interactive connect using the GitHub Actions executor"
|
|
1316
|
+
}
|
|
1317
|
+
]
|
|
1318
|
+
},
|
|
1319
|
+
update: {
|
|
1320
|
+
summary: "Update an existing connection's branch, build executor, or deploy workflow.",
|
|
1321
|
+
usage: ["bwf github update [project] [options]"],
|
|
1322
|
+
options: [
|
|
1323
|
+
{
|
|
1324
|
+
command: "--project <name>",
|
|
1325
|
+
description: "Project name (alias for positional)"
|
|
1326
|
+
},
|
|
1327
|
+
{
|
|
1328
|
+
command: "--branch <name>",
|
|
1329
|
+
description: "New branch to deploy from"
|
|
1330
|
+
},
|
|
1331
|
+
{
|
|
1332
|
+
command: "--executor <type>",
|
|
1333
|
+
description: "New build executor: container | github_actions; prompted interactively when omitted"
|
|
1334
|
+
},
|
|
1335
|
+
{
|
|
1336
|
+
command: "--workflow <path>",
|
|
1337
|
+
description: "New authorized deploy workflow file under .github/workflows/; prompted interactively when using github_actions"
|
|
1338
|
+
}
|
|
1339
|
+
],
|
|
1340
|
+
examples: [{
|
|
1341
|
+
command: "bwf github update my-app --executor github_actions",
|
|
1342
|
+
description: "Switch an existing connection to the GitHub Actions executor"
|
|
1343
|
+
}, {
|
|
1344
|
+
command: "bwf github update my-app --branch release",
|
|
1345
|
+
description: "Change the deploy branch"
|
|
1346
|
+
}]
|
|
1347
|
+
},
|
|
1348
|
+
status: {
|
|
1349
|
+
summary: "Show a project's GitHub connection settings.",
|
|
1350
|
+
usage: ["bwf github status [project] [options]"],
|
|
1351
|
+
options: [{
|
|
1352
|
+
command: "--project <name>",
|
|
1353
|
+
description: "Project name (alias for positional)"
|
|
1354
|
+
}],
|
|
1355
|
+
examples: [{
|
|
1356
|
+
command: "bwf github status",
|
|
1357
|
+
description: "Show the linked project's connection"
|
|
1358
|
+
}, {
|
|
1359
|
+
command: "bwf github status my-app",
|
|
1360
|
+
description: "Show a specific project connection"
|
|
1361
|
+
}]
|
|
1362
|
+
},
|
|
1363
|
+
disconnect: {
|
|
1364
|
+
summary: "Disconnect a project from its GitHub repository.",
|
|
1365
|
+
usage: ["bwf github disconnect [project] [options]"],
|
|
1366
|
+
options: [{
|
|
1367
|
+
command: "--project <name>",
|
|
1368
|
+
description: "Project name (alias for positional)"
|
|
1369
|
+
}, {
|
|
1370
|
+
command: "--yes",
|
|
1371
|
+
description: "Skip the confirmation prompt (required in non-interactive shells)"
|
|
1372
|
+
}],
|
|
1373
|
+
examples: [{
|
|
1374
|
+
command: "bwf github disconnect",
|
|
1375
|
+
description: "Disconnect the linked project's repository"
|
|
1376
|
+
}, {
|
|
1377
|
+
command: "bwf github disconnect my-app --yes",
|
|
1378
|
+
description: "Disconnect a specific project without confirmation"
|
|
1379
|
+
}]
|
|
1380
|
+
}
|
|
1381
|
+
}
|
|
1382
|
+
},
|
|
1383
|
+
build: {
|
|
1384
|
+
summary: "Inspect remote builds.",
|
|
1385
|
+
usage: ["bwf build <command>"],
|
|
1386
|
+
commands: [{
|
|
1387
|
+
command: "logs [build]",
|
|
1388
|
+
description: "Stream, tail, or download logs for a build"
|
|
1389
|
+
}],
|
|
1390
|
+
children: { logs: {
|
|
1391
|
+
summary: "Stream, tail, or download logs for a build.",
|
|
1392
|
+
usage: ["bwf build logs [build] [options]"],
|
|
1393
|
+
options: [
|
|
1394
|
+
{
|
|
1395
|
+
command: "--follow, -f",
|
|
1396
|
+
description: "Live-tail until the build finishes"
|
|
1397
|
+
},
|
|
1398
|
+
{
|
|
1399
|
+
command: "--output <file>, -o",
|
|
1400
|
+
description: "Write logs to a file instead of stdout"
|
|
1401
|
+
},
|
|
1402
|
+
{
|
|
1403
|
+
command: "--project <slug>, -p",
|
|
1404
|
+
description: "Target project (else linked / BWF_PROJECT)"
|
|
1405
|
+
}
|
|
1406
|
+
],
|
|
1407
|
+
examples: [
|
|
1408
|
+
{
|
|
1409
|
+
command: "bwf build logs",
|
|
1410
|
+
description: "Print the latest build's logs"
|
|
1411
|
+
},
|
|
1412
|
+
{
|
|
1413
|
+
command: "bwf build logs -f",
|
|
1414
|
+
description: "Follow the latest build until it finishes"
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
command: "bwf build logs bld_123 -o build.log",
|
|
1418
|
+
description: "Download a build's logs to a file"
|
|
1419
|
+
}
|
|
1420
|
+
]
|
|
1421
|
+
} }
|
|
1422
|
+
},
|
|
1423
|
+
db: {
|
|
1424
|
+
summary: "Manage local and remote database state.",
|
|
1425
|
+
usage: ["bwf db <command>"],
|
|
1426
|
+
commands: [
|
|
1427
|
+
{
|
|
1428
|
+
command: "push",
|
|
1429
|
+
description: "Push schema to the development database without migration files"
|
|
1430
|
+
},
|
|
1431
|
+
{
|
|
1432
|
+
command: "generate",
|
|
1433
|
+
description: "Generate SQL migrations from schema changes"
|
|
1434
|
+
},
|
|
1435
|
+
{
|
|
1436
|
+
command: "status",
|
|
1437
|
+
description: "Show migration status (local and remote)"
|
|
1438
|
+
},
|
|
1439
|
+
{
|
|
1440
|
+
command: "reset",
|
|
1441
|
+
description: "Reset local DB and re-run migrations"
|
|
1442
|
+
},
|
|
1443
|
+
{
|
|
1444
|
+
command: "seed",
|
|
1445
|
+
description: "Reset local DB, run migrations, and seed"
|
|
1446
|
+
},
|
|
1447
|
+
{
|
|
1448
|
+
command: "execute <sql>",
|
|
1449
|
+
description: "Run SQL against the database (--remote for deployed)"
|
|
1450
|
+
},
|
|
1451
|
+
{
|
|
1452
|
+
command: "migrate",
|
|
1453
|
+
description: "Apply pending migrations"
|
|
1454
|
+
},
|
|
1455
|
+
{
|
|
1456
|
+
command: "studio",
|
|
1457
|
+
description: "Open Drizzle Studio (--remote for deployed PostgreSQL/MySQL)"
|
|
1458
|
+
},
|
|
1459
|
+
{
|
|
1460
|
+
command: "export",
|
|
1461
|
+
description: "Export local database as SQL"
|
|
1462
|
+
},
|
|
1463
|
+
{
|
|
1464
|
+
command: "connect",
|
|
1465
|
+
description: "Connect or provision an external database"
|
|
1466
|
+
},
|
|
1467
|
+
{
|
|
1468
|
+
command: "set-url",
|
|
1469
|
+
description: "Update the external database URL"
|
|
1470
|
+
},
|
|
1471
|
+
{
|
|
1472
|
+
command: "restore",
|
|
1473
|
+
description: "Restore the deployed D1 database to an earlier point (direct Cloudflare)"
|
|
1474
|
+
},
|
|
1475
|
+
{
|
|
1476
|
+
command: "rename-migrations",
|
|
1477
|
+
description: "Rename migrations to timestamp format"
|
|
1478
|
+
}
|
|
1479
|
+
],
|
|
1480
|
+
children: {
|
|
1481
|
+
push: basicSubcommand("Push schema to the development database without migration files.", "bwf db push"),
|
|
1482
|
+
generate: basicSubcommand("Generate SQL migrations from schema changes.", "bwf db generate"),
|
|
1483
|
+
status: basicSubcommand("Show migration status for local and remote DBs.", "bwf db status"),
|
|
1484
|
+
reset: {
|
|
1485
|
+
summary: "Reset local DB and re-run migrations.",
|
|
1486
|
+
usage: ["bwf db reset [options]"],
|
|
1487
|
+
options: [{
|
|
1488
|
+
command: "--yes",
|
|
1489
|
+
description: "Skip the prompt for a non-local PostgreSQL/MySQL database"
|
|
1490
|
+
}]
|
|
1491
|
+
},
|
|
1492
|
+
seed: {
|
|
1493
|
+
summary: "Reset local DB, run migrations, and seed data.",
|
|
1494
|
+
usage: ["bwf db seed [options]"],
|
|
1495
|
+
options: [{
|
|
1496
|
+
command: "--file <path>",
|
|
1497
|
+
description: "Seed from a specific file"
|
|
1498
|
+
}, {
|
|
1499
|
+
command: "--yes",
|
|
1500
|
+
description: "Skip the prompt for a non-local PostgreSQL/MySQL database"
|
|
1501
|
+
}]
|
|
1502
|
+
},
|
|
1503
|
+
execute: {
|
|
1504
|
+
summary: "Run SQL against the database (local by default; use --remote for the deployed database).",
|
|
1505
|
+
usage: ["bwf db execute <sql>", "bwf db execute --file <path>"],
|
|
1506
|
+
options: [{
|
|
1507
|
+
command: "--file <path>",
|
|
1508
|
+
description: "Run SQL from a file instead"
|
|
1509
|
+
}, {
|
|
1510
|
+
command: "--remote",
|
|
1511
|
+
description: "Run against the deployed database (D1 via proxy; PostgreSQL via direct connection)"
|
|
1512
|
+
}],
|
|
1513
|
+
examples: [
|
|
1514
|
+
{
|
|
1515
|
+
command: "bwf db execute \"select * from users\"",
|
|
1516
|
+
description: "Run inline SQL"
|
|
1517
|
+
},
|
|
1518
|
+
{
|
|
1519
|
+
command: "bwf db execute --file query.sql",
|
|
1520
|
+
description: "Run SQL from a file"
|
|
1521
|
+
},
|
|
1522
|
+
{
|
|
1523
|
+
command: "bwf db execute --remote \"select count(*) from users\"",
|
|
1524
|
+
description: "Query the deployed database"
|
|
1525
|
+
}
|
|
1526
|
+
]
|
|
1527
|
+
},
|
|
1528
|
+
migrate: {
|
|
1529
|
+
summary: "Apply pending migrations.",
|
|
1530
|
+
usage: ["bwf db migrate [options]"],
|
|
1531
|
+
options: [{
|
|
1532
|
+
command: "--remote",
|
|
1533
|
+
description: "Apply to the remote database"
|
|
1534
|
+
}]
|
|
1535
|
+
},
|
|
1536
|
+
studio: {
|
|
1537
|
+
summary: "Open Drizzle Studio against the database (local by default; use --remote for the deployed PostgreSQL or MySQL database).",
|
|
1538
|
+
usage: ["bwf db studio [options]"],
|
|
1539
|
+
options: [{
|
|
1540
|
+
command: "--remote",
|
|
1541
|
+
description: "Open Studio against the deployed PostgreSQL or MySQL database (not D1)"
|
|
1542
|
+
}],
|
|
1543
|
+
examples: [{
|
|
1544
|
+
command: "bwf db studio",
|
|
1545
|
+
description: "Open Studio for the local database"
|
|
1546
|
+
}, {
|
|
1547
|
+
command: "bwf db studio --remote",
|
|
1548
|
+
description: "Open Studio against the deployed PostgreSQL or MySQL database"
|
|
1549
|
+
}]
|
|
1550
|
+
},
|
|
1551
|
+
export: {
|
|
1552
|
+
summary: "Export local database contents as SQL.",
|
|
1553
|
+
usage: ["bwf db export [options]"],
|
|
1554
|
+
options: [
|
|
1555
|
+
{
|
|
1556
|
+
command: "--output <path>",
|
|
1557
|
+
description: "Export to a specific file path"
|
|
1558
|
+
},
|
|
1559
|
+
{
|
|
1560
|
+
command: "--no-data",
|
|
1561
|
+
description: "Schema only (no INSERT statements)"
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
command: "--no-schema",
|
|
1565
|
+
description: "Data only (no CREATE TABLE)"
|
|
1566
|
+
},
|
|
1567
|
+
{
|
|
1568
|
+
command: "--table <name>",
|
|
1569
|
+
description: "Export a single table"
|
|
1570
|
+
}
|
|
1571
|
+
]
|
|
1572
|
+
},
|
|
1573
|
+
connect: {
|
|
1574
|
+
summary: "Connect or provision an external PostgreSQL/MySQL database.",
|
|
1575
|
+
usage: ["bwf db connect [connection-string]", "bwf db connect --provider <name-or-module> [options]"],
|
|
1576
|
+
options: [
|
|
1577
|
+
{
|
|
1578
|
+
command: "--provider <name-or-module>",
|
|
1579
|
+
description: "Provision with an adapter"
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
command: "--name <name>",
|
|
1583
|
+
description: "Provider project/database name"
|
|
1584
|
+
},
|
|
1585
|
+
{
|
|
1586
|
+
command: "--region <region>",
|
|
1587
|
+
description: "Provider region identifier"
|
|
1588
|
+
},
|
|
1589
|
+
{
|
|
1590
|
+
command: "--local-only",
|
|
1591
|
+
description: "Do not sync a linked bwf project"
|
|
1592
|
+
}
|
|
1593
|
+
],
|
|
1594
|
+
examples: [{
|
|
1595
|
+
command: "bwf db connect \"postgresql://user:pass@host/db\"",
|
|
1596
|
+
description: "Connect an existing database"
|
|
1597
|
+
}, {
|
|
1598
|
+
command: "bwf db connect --provider neon --name my-app",
|
|
1599
|
+
description: "Provision a Neon database using NEON_API_KEY"
|
|
1600
|
+
}]
|
|
1601
|
+
},
|
|
1602
|
+
"set-url": basicSubcommand("Update the external database connection string for deployment.", "bwf db set-url"),
|
|
1603
|
+
restore: {
|
|
1604
|
+
summary: "Restore the deployed D1 database of a direct Cloudflare deploy to an earlier point. Discards every later write.",
|
|
1605
|
+
usage: ["bwf db restore --bookmark <bookmark> [--platform cloudflare] [--yes]", "bwf db restore --timestamp <iso-time> [--platform cloudflare] [--yes]"],
|
|
1606
|
+
options: [
|
|
1607
|
+
{
|
|
1608
|
+
command: "--bookmark <bookmark>",
|
|
1609
|
+
description: "Restore point printed by deploy"
|
|
1610
|
+
},
|
|
1611
|
+
{
|
|
1612
|
+
command: "--timestamp <iso-time>",
|
|
1613
|
+
description: "Time with Z or an offset (7 days back on Workers Free, 30 on Paid)"
|
|
1614
|
+
},
|
|
1615
|
+
{
|
|
1616
|
+
command: "--platform cloudflare",
|
|
1617
|
+
description: "Restore after a one-off deploy with --platform cloudflare"
|
|
1618
|
+
},
|
|
1619
|
+
{
|
|
1620
|
+
command: "--yes",
|
|
1621
|
+
description: "Skip the confirmation prompt (required without a TTY)"
|
|
1622
|
+
}
|
|
1623
|
+
],
|
|
1624
|
+
examples: [{
|
|
1625
|
+
command: "bwf db restore --bookmark 00000085-0000024c-00004ef2-0a83ea2f",
|
|
1626
|
+
description: "Undo the migrations of a deploy"
|
|
1627
|
+
}, {
|
|
1628
|
+
command: "bwf db restore --timestamp 2026-10-16T09:30:00Z",
|
|
1629
|
+
description: "Restore the database to a time"
|
|
1630
|
+
}]
|
|
1631
|
+
},
|
|
1632
|
+
"rename-migrations": basicSubcommand("Rename migrations to timestamp-based format.", "bwf db rename-migrations")
|
|
1633
|
+
}
|
|
1634
|
+
},
|
|
1635
|
+
env: {
|
|
1636
|
+
summary: "Validate env.ts and generate environment types.",
|
|
1637
|
+
usage: ["bwf env <command>"],
|
|
1638
|
+
commands: [{
|
|
1639
|
+
command: "check",
|
|
1640
|
+
description: "Validate local .env or remote secret names"
|
|
1641
|
+
}, {
|
|
1642
|
+
command: "types",
|
|
1643
|
+
description: "Regenerate .bwf/env.d.ts from env.ts"
|
|
1644
|
+
}],
|
|
1645
|
+
children: {
|
|
1646
|
+
check: {
|
|
1647
|
+
summary: "Validate local .env or required remote secret names.",
|
|
1648
|
+
usage: ["bwf env check [options]"],
|
|
1649
|
+
options: [{
|
|
1650
|
+
command: "--remote",
|
|
1651
|
+
description: "Check required server keys as remote secrets"
|
|
1652
|
+
}]
|
|
1653
|
+
},
|
|
1654
|
+
types: basicSubcommand("Regenerate .bwf/env.d.ts from env.ts.", "bwf env types")
|
|
1655
|
+
}
|
|
1656
|
+
},
|
|
1657
|
+
gen: {
|
|
1658
|
+
summary: "Scaffold routes, models, and background jobs.",
|
|
1659
|
+
usage: ["bwf gen <command>"],
|
|
1660
|
+
commands: [
|
|
1661
|
+
{
|
|
1662
|
+
command: "model <name> [cols...]",
|
|
1663
|
+
description: "Scaffold a Drizzle table, API routes, and DB types"
|
|
1664
|
+
},
|
|
1665
|
+
{
|
|
1666
|
+
command: "migration <name>",
|
|
1667
|
+
description: "Generate an empty migration file"
|
|
1668
|
+
},
|
|
1669
|
+
{
|
|
1670
|
+
command: "route <path>",
|
|
1671
|
+
description: "Generate a route with handler exports"
|
|
1672
|
+
},
|
|
1673
|
+
{
|
|
1674
|
+
command: "middleware <name>",
|
|
1675
|
+
description: "Generate a numbered middleware file"
|
|
1676
|
+
},
|
|
1677
|
+
{
|
|
1678
|
+
command: "cron <name>",
|
|
1679
|
+
description: "Generate a cron job file"
|
|
1680
|
+
},
|
|
1681
|
+
{
|
|
1682
|
+
command: "queue <name>",
|
|
1683
|
+
description: "Generate a queue consumer file"
|
|
1684
|
+
}
|
|
1685
|
+
],
|
|
1686
|
+
children: {
|
|
1687
|
+
model: {
|
|
1688
|
+
summary: "Scaffold a Drizzle table, list/create/get API routes, and database types.",
|
|
1689
|
+
usage: ["bwf gen model <name> [columns...]"],
|
|
1690
|
+
examples: [{
|
|
1691
|
+
command: "bwf gen model post title:string body:text",
|
|
1692
|
+
description: "Create a model"
|
|
1693
|
+
}]
|
|
1694
|
+
},
|
|
1695
|
+
migration: basicSubcommand("Generate an empty migration file.", "bwf gen migration <name>"),
|
|
1696
|
+
route: {
|
|
1697
|
+
summary: "Generate a route with handler exports.",
|
|
1698
|
+
usage: ["bwf gen route <path> [options]"],
|
|
1699
|
+
options: [{
|
|
1700
|
+
command: "--methods <list>",
|
|
1701
|
+
description: "Comma-separated methods (default: get)"
|
|
1702
|
+
}],
|
|
1703
|
+
examples: [{
|
|
1704
|
+
command: "bwf gen route api/posts --methods get,post",
|
|
1705
|
+
description: "Create a route"
|
|
1706
|
+
}]
|
|
1707
|
+
},
|
|
1708
|
+
middleware: basicSubcommand("Generate a numbered middleware file.", "bwf gen middleware <name>"),
|
|
1709
|
+
cron: basicSubcommand("Generate a cron job file.", "bwf gen cron <name>"),
|
|
1710
|
+
queue: basicSubcommand("Generate a queue consumer file.", "bwf gen queue <name>"),
|
|
1711
|
+
procedure: basicSubcommand("Generate a procedure, such as contacts.get.", "bwf gen procedure <file.name>")
|
|
1712
|
+
}
|
|
1713
|
+
},
|
|
1714
|
+
info: {
|
|
1715
|
+
summary: "Inspect persistent resource names in this project without deploying.",
|
|
1716
|
+
usage: ["bwf info [--json]"],
|
|
1717
|
+
options: [{
|
|
1718
|
+
command: "--json",
|
|
1719
|
+
description: "Write structured JSON to stdout"
|
|
1720
|
+
}],
|
|
1721
|
+
examples: [{
|
|
1722
|
+
command: "bwf info",
|
|
1723
|
+
description: "Find names to preserve before moving persistent definitions"
|
|
1724
|
+
}]
|
|
1725
|
+
},
|
|
1726
|
+
prepare: {
|
|
1727
|
+
summary: "Generate .bwf artifacts without starting Vite.",
|
|
1728
|
+
usage: ["bwf prepare"],
|
|
1729
|
+
examples: [{
|
|
1730
|
+
command: "bwf prepare",
|
|
1731
|
+
description: "Refresh generated project types"
|
|
1732
|
+
}]
|
|
1733
|
+
}
|
|
1734
|
+
};
|
|
1735
|
+
function basicSubcommand(summary, usage, example) {
|
|
1736
|
+
return {
|
|
1737
|
+
summary,
|
|
1738
|
+
usage: [usage],
|
|
1739
|
+
examples: example ? [{
|
|
1740
|
+
command: example,
|
|
1741
|
+
description: summary
|
|
1742
|
+
}] : void 0
|
|
1743
|
+
};
|
|
1744
|
+
}
|
|
1745
|
+
function withProjectOption(summary, usage) {
|
|
1746
|
+
return {
|
|
1747
|
+
summary,
|
|
1748
|
+
usage: [usage],
|
|
1749
|
+
options: [{
|
|
1750
|
+
command: "--project <name>",
|
|
1751
|
+
description: "Project name override"
|
|
1752
|
+
}]
|
|
1753
|
+
};
|
|
1754
|
+
}
|
|
1755
|
+
function lifecycleHelp(command, summary) {
|
|
1756
|
+
return {
|
|
1757
|
+
summary,
|
|
1758
|
+
usage: [`bwf platform ${command} [id] [--plan]${command === "disable" ? "" : " [--runtime <path>]"}${command === "upgrade" || command === "repair" ? " [--dashboard-url <origin>] [--custom-domains] [--accept-outside-changes]" : ""}${command === "upgrade" ? " [--runtime-logs <full|minimal>] [--storage-location <hint|automatic>]" : ""}${command === "repair" ? " [--auth-config <path>]" : ""} [--yes]`],
|
|
1759
|
+
options: [
|
|
1760
|
+
{
|
|
1761
|
+
command: "--plan",
|
|
1762
|
+
description: "Print the exact plan without making changes"
|
|
1763
|
+
},
|
|
1764
|
+
...command === "disable" ? [] : [{
|
|
1765
|
+
command: "--runtime <path>",
|
|
1766
|
+
description: "Deploy an integrity-checked runtime directory instead of the package"
|
|
1767
|
+
}],
|
|
1768
|
+
...command === "upgrade" || command === "repair" ? [
|
|
1769
|
+
{
|
|
1770
|
+
command: "--dashboard-url <origin>",
|
|
1771
|
+
description: "Configure a separately deployed dashboard; omission keeps its saved origin"
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
command: "--custom-domains",
|
|
1775
|
+
description: "Turn on project custom domains; omission keeps the saved setting"
|
|
1776
|
+
},
|
|
1777
|
+
{
|
|
1778
|
+
command: "--accept-outside-changes",
|
|
1779
|
+
description: "Replace changes made to the platform Workers outside bwf, without a terminal. It prints them first. Use it only after you reviewed them"
|
|
1780
|
+
}
|
|
1781
|
+
] : [],
|
|
1782
|
+
...command === "upgrade" ? [{
|
|
1783
|
+
command: "--runtime-logs <full|minimal>",
|
|
1784
|
+
description: "minimal keeps request URLs, console and exception messages out of runtime logs; omission keeps the saved setting"
|
|
1785
|
+
}, {
|
|
1786
|
+
command: "--storage-location <hint|automatic>",
|
|
1787
|
+
description: "Default R2 location hint for new project buckets; automatic clears it, omission keeps it"
|
|
1788
|
+
}] : [],
|
|
1789
|
+
...command === "repair" ? [{
|
|
1790
|
+
command: "--auth-config <path>",
|
|
1791
|
+
description: "While first administrator setup is pending, replace its login settings (install file format)"
|
|
1792
|
+
}] : [],
|
|
1793
|
+
{
|
|
1794
|
+
command: "--yes",
|
|
1795
|
+
description: "Acknowledge non-interactive Cloudflare changes"
|
|
1796
|
+
}
|
|
1797
|
+
]
|
|
1798
|
+
};
|
|
1799
|
+
}
|
|
1800
|
+
function printGlobalHelp() {
|
|
1801
|
+
printBwfHeader();
|
|
1802
|
+
note([
|
|
1803
|
+
globalCommandLine(["init"], "bwf init"),
|
|
1804
|
+
...globalOptionLines(["init"]),
|
|
1805
|
+
"",
|
|
1806
|
+
globalCommandLine(["migrate"], "bwf migrate"),
|
|
1807
|
+
"",
|
|
1808
|
+
globalCommandLine(["info"], "bwf info [--json]"),
|
|
1809
|
+
"",
|
|
1810
|
+
globalCommandLine(["connect"], "bwf connect [url]"),
|
|
1811
|
+
...globalOptionLines(["connect"]),
|
|
1812
|
+
"",
|
|
1813
|
+
globalCommandLine(["deploy"], "bwf deploy"),
|
|
1814
|
+
...globalOptionLines(["deploy"]),
|
|
1815
|
+
"",
|
|
1816
|
+
...globalCommandGroup("auth"),
|
|
1817
|
+
"",
|
|
1818
|
+
...globalCommandGroup("account"),
|
|
1819
|
+
"",
|
|
1820
|
+
...globalCommandGroup("cloudflare"),
|
|
1821
|
+
"",
|
|
1822
|
+
...globalCommandGroup("platform"),
|
|
1823
|
+
"",
|
|
1824
|
+
...globalCommandGroup("project"),
|
|
1825
|
+
"",
|
|
1826
|
+
categoryTitle("secrets"),
|
|
1827
|
+
...globalCommandLines("secret"),
|
|
1828
|
+
"",
|
|
1829
|
+
...globalCommandGroup("domain"),
|
|
1830
|
+
"",
|
|
1831
|
+
...globalCommandGroup("email"),
|
|
1832
|
+
"",
|
|
1833
|
+
...globalCommandGroup("github"),
|
|
1834
|
+
"",
|
|
1835
|
+
...globalCommandGroup("build"),
|
|
1836
|
+
"",
|
|
1837
|
+
categoryTitle("database"),
|
|
1838
|
+
...globalCommandLines("db", {
|
|
1839
|
+
execute: "execute <sql>",
|
|
1840
|
+
export: "export [--output <path>]",
|
|
1841
|
+
seed: "seed [--file <path>]",
|
|
1842
|
+
restore: "restore --bookmark <b>"
|
|
1843
|
+
}),
|
|
1844
|
+
...globalOptionLines(["db", "execute"]),
|
|
1845
|
+
...globalOptionLines(["db", "export"]),
|
|
1846
|
+
"",
|
|
1847
|
+
...globalCommandGroup("env"),
|
|
1848
|
+
...globalOptionLines(["env", "check"]),
|
|
1849
|
+
"",
|
|
1850
|
+
categoryTitle("codegen"),
|
|
1851
|
+
globalCommandLine(["prepare"], "bwf prepare"),
|
|
1852
|
+
...globalCommandLines("gen", { route: "route <path> [--methods]" }),
|
|
1853
|
+
"",
|
|
1854
|
+
categoryTitle("help"),
|
|
1855
|
+
helpLine("bwf help <command>", "Show command-specific help"),
|
|
1856
|
+
helpLine("bwf <command> --help", "Show command-specific help")
|
|
1857
|
+
].join("\n"), sectionTitle("Commands"));
|
|
1858
|
+
note([helpLine("BWF_TOKEN", "Auth token (or use `bwf account login`)"), helpLine("BWF_PROJECT", "Deploy target project name override")].join("\n"), sectionTitle("Environment"));
|
|
1859
|
+
outro(formatUrl("https://void.cloud"));
|
|
1860
|
+
}
|
|
1861
|
+
function printBwfHeader() {
|
|
1862
|
+
const version = getOwnVersion();
|
|
1863
|
+
const art = asciiArts[Math.floor(Math.random() * asciiArts.length)];
|
|
1864
|
+
console.log(import_picocolors.default.blue(`${art} v${version}\n`));
|
|
1865
|
+
}
|
|
1866
|
+
function getHelpPath(args) {
|
|
1867
|
+
if (args.length === 0) return null;
|
|
1868
|
+
const command = args[0];
|
|
1869
|
+
if (command === "help") return args.slice(1);
|
|
1870
|
+
if (command === "--help" || command === "-h") return [];
|
|
1871
|
+
if (args[1] === "help") return [command, ...args.slice(2)];
|
|
1872
|
+
const helpIndex = args.findIndex((arg) => arg === "--help" || arg === "-h");
|
|
1873
|
+
if (helpIndex === -1) return null;
|
|
1874
|
+
return getKnownHelpPrefix(args.slice(0, helpIndex));
|
|
1875
|
+
}
|
|
1876
|
+
function printHelpPage(path) {
|
|
1877
|
+
const page = findHelpPage(path);
|
|
1878
|
+
if (!page) throw new Error(`Unknown help topic: ${formatHelpPath(path)}`);
|
|
1879
|
+
const lines = [
|
|
1880
|
+
page.summary,
|
|
1881
|
+
"",
|
|
1882
|
+
categoryTitle("Usage"),
|
|
1883
|
+
...page.usage.map((usage) => ` ${usage}`)
|
|
1884
|
+
];
|
|
1885
|
+
appendHelpSection(lines, "Commands", page.commands);
|
|
1886
|
+
appendHelpSection(lines, "Options", page.options);
|
|
1887
|
+
appendHelpSection(lines, "Examples", page.examples);
|
|
1888
|
+
if (page.commands) lines.push("", `Run \`bwf help ${path.join(" ")} <command>\` for command-specific help.`);
|
|
1889
|
+
note(lines.join("\n"), sectionTitle(`bwf ${path.join(" ")}`));
|
|
1890
|
+
}
|
|
1891
|
+
function appendHelpSection(lines, title, entries) {
|
|
1892
|
+
if (!entries || entries.length === 0) return;
|
|
1893
|
+
lines.push("", categoryTitle(title));
|
|
1894
|
+
for (const entry of entries) lines.push(helpLine(entry.command, entry.description));
|
|
1895
|
+
}
|
|
1896
|
+
function globalCommandGroup(group) {
|
|
1897
|
+
return [categoryTitle(group), ...globalCommandLines(group)];
|
|
1898
|
+
}
|
|
1899
|
+
function globalCommandLines(group, commandOverrides) {
|
|
1900
|
+
return (requiredPage([group]).commands ?? []).map((command) => helpLine(`bwf ${group} ${commandOverrides?.[command.command.split(" ")[0]] ?? command.command}`, command.description));
|
|
1901
|
+
}
|
|
1902
|
+
function globalCommandLine(path, command) {
|
|
1903
|
+
return helpLine(command, formatGlobalDescription(requiredPage(path).summary));
|
|
1904
|
+
}
|
|
1905
|
+
function globalOptionLines(path) {
|
|
1906
|
+
return (requiredPage(path).options ?? []).map((option) => helpLine(` ${option.command}`, option.description));
|
|
1907
|
+
}
|
|
1908
|
+
function requiredPage(path) {
|
|
1909
|
+
const page = findHelpPage(path);
|
|
1910
|
+
if (!page) throw new Error(`Missing help page: ${formatHelpPath(path)}`);
|
|
1911
|
+
return page;
|
|
1912
|
+
}
|
|
1913
|
+
function formatGlobalDescription(summary) {
|
|
1914
|
+
return summary.replace(/\.$/, "");
|
|
1915
|
+
}
|
|
1916
|
+
function findHelpPage(path) {
|
|
1917
|
+
let tree = HELP_TREE;
|
|
1918
|
+
let page = null;
|
|
1919
|
+
for (const part of path) {
|
|
1920
|
+
const node = tree?.[part];
|
|
1921
|
+
if (!node) return null;
|
|
1922
|
+
page = node;
|
|
1923
|
+
tree = node.children;
|
|
1924
|
+
}
|
|
1925
|
+
return page;
|
|
1926
|
+
}
|
|
1927
|
+
function getKnownHelpPrefix(args) {
|
|
1928
|
+
let tree = HELP_TREE;
|
|
1929
|
+
const path = [];
|
|
1930
|
+
for (const arg of args) {
|
|
1931
|
+
if (arg.startsWith("-")) break;
|
|
1932
|
+
const node = tree?.[arg];
|
|
1933
|
+
if (!node) {
|
|
1934
|
+
if (path.length === 0) return [arg];
|
|
1935
|
+
if (tree) return [...path, arg];
|
|
1936
|
+
break;
|
|
1937
|
+
}
|
|
1938
|
+
path.push(arg);
|
|
1939
|
+
tree = node.children;
|
|
1940
|
+
}
|
|
1941
|
+
return path;
|
|
1942
|
+
}
|
|
1943
|
+
function formatHelpPath(path) {
|
|
1944
|
+
return path.length === 0 ? "help" : path.join(" ");
|
|
1945
|
+
}
|
|
1946
|
+
export { printHelpPage as i, printBwfHeader as n, printGlobalHelp as r, getHelpPath as t };
|